From 0bd2bc7259a94f571234368299d318e2052770fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Fri, 6 Dec 2024 11:40:01 +0100 Subject: [PATCH 01/10] Add featureLevel CTS option --- src/common/framework/test_config.ts | 6 ++++++ src/common/runtime/cmdline.ts | 8 +++++++- src/common/runtime/helper/options.ts | 13 ++++++++++++- src/common/runtime/helper/utils_worker.ts | 6 ++++-- src/common/runtime/server.ts | 8 +++++++- src/common/runtime/standalone.ts | 5 +++-- src/webgpu/gpu_test.ts | 4 ++-- src/webgpu/util/device_pool.ts | 4 +++- 8 files changed, 44 insertions(+), 10 deletions(-) diff --git a/src/common/framework/test_config.ts b/src/common/framework/test_config.ts index 072aaf736027..56af6938c36e 100644 --- a/src/common/framework/test_config.ts +++ b/src/common/framework/test_config.ts @@ -34,6 +34,11 @@ export type TestConfig = { */ unrollConstEvalLoops: boolean; + /** + * Feature level for the adapter request. + */ + featureLevel: string | null; + /** * Whether or not we're running in compatibility mode. */ @@ -57,6 +62,7 @@ export const globalTestConfig: TestConfig = { testHeartbeatCallback: () => {}, noRaceWithRejectOnTimeout: false, unrollConstEvalLoops: false, + featureLevel: null, compatibility: false, forceFallbackAdapter: false, logToWebSocket: false, diff --git a/src/common/runtime/cmdline.ts b/src/common/runtime/cmdline.ts index c1e0c28d17c1..e5d9b8cc036b 100644 --- a/src/common/runtime/cmdline.ts +++ b/src/common/runtime/cmdline.ts @@ -105,6 +105,7 @@ for (let i = 0; i < sys.args.length; ++i) { globalTestConfig.unrollConstEvalLoops = true; } else if (a === '--compat') { globalTestConfig.compatibility = true; + globalTestConfig.featureLevel = 'compatibility'; } else if (a === '--force-fallback-adapter') { globalTestConfig.forceFallbackAdapter = true; } else if (a === '--log-to-websocket') { @@ -120,9 +121,14 @@ for (let i = 0; i < sys.args.length; ++i) { let codeCoverage: CodeCoverageProvider | undefined = undefined; -if (globalTestConfig.compatibility || globalTestConfig.forceFallbackAdapter) { +if ( + globalTestConfig.featureLevel || + globalTestConfig.compatibility || + globalTestConfig.forceFallbackAdapter +) { // MAINTENANCE_TODO: remove the cast once compatibilityMode is officially added setDefaultRequestAdapterOptions({ + featureLevel: globalTestConfig.featureLevel, compatibilityMode: globalTestConfig.compatibility, forceFallbackAdapter: globalTestConfig.forceFallbackAdapter, } as GPURequestAdapterOptions); diff --git a/src/common/runtime/helper/options.ts b/src/common/runtime/helper/options.ts index 4a82c7d2928e..29db2455f85f 100644 --- a/src/common/runtime/helper/options.ts +++ b/src/common/runtime/helper/options.ts @@ -51,6 +51,7 @@ export function optionWorkerMode( export interface CTSOptions { worker: WorkerMode | null; debug: boolean; + featureLevel: 'core' | 'compatibility' | null; compatibility: boolean; forceFallbackAdapter: boolean; unrollConstEvalLoops: boolean; @@ -61,6 +62,7 @@ export interface CTSOptions { export const kDefaultCTSOptions: CTSOptions = { worker: null, debug: true, + featureLevel: null, compatibility: false, forceFallbackAdapter: false, unrollConstEvalLoops: false, @@ -98,7 +100,16 @@ export const kCTSOptionsInfo: OptionsInfos = { ], }, debug: { description: 'show more info' }, - compatibility: { description: 'run in compatibility mode' }, + featureLevel: { + description: 'set feature level for some tests', + parser: optionString, + selectValueDescriptions: [ + { value: null, description: 'default' }, + { value: 'core', description: 'core' }, + { value: 'compatibility', description: 'compatibility' }, + ], + }, + compatibility: { description: 'run in compatibility mode (non-standard)' }, forceFallbackAdapter: { description: 'pass forceFallbackAdapter: true to requestAdapter' }, unrollConstEvalLoops: { description: 'unroll const eval loops in WGSL' }, powerPreference: { diff --git a/src/common/runtime/helper/utils_worker.ts b/src/common/runtime/helper/utils_worker.ts index 13880635bca7..ce6c2faf9288 100644 --- a/src/common/runtime/helper/utils_worker.ts +++ b/src/common/runtime/helper/utils_worker.ts @@ -15,16 +15,18 @@ export interface WorkerTestRunRequest { * Set config environment for workers with ctsOptions and return a Logger. */ export function setupWorkerEnvironment(ctsOptions: CTSOptions): Logger { - const { powerPreference, compatibility } = ctsOptions; + const { featureLevel, powerPreference, compatibility } = ctsOptions; globalTestConfig.enableDebugLogs = ctsOptions.debug; globalTestConfig.unrollConstEvalLoops = ctsOptions.unrollConstEvalLoops; + globalTestConfig.featureLevel = featureLevel; globalTestConfig.compatibility = compatibility; globalTestConfig.logToWebSocket = ctsOptions.logToWebSocket; const log = new Logger(); - if (powerPreference || compatibility) { + if (featureLevel || powerPreference || compatibility) { setDefaultRequestAdapterOptions({ + ...(featureLevel && { featureLevel }), ...(powerPreference && { powerPreference }), // MAINTENANCE_TODO: Change this to whatever the option ends up being ...(compatibility && { compatibilityMode: true }), diff --git a/src/common/runtime/server.ts b/src/common/runtime/server.ts index 38ad04479430..637df588be2d 100644 --- a/src/common/runtime/server.ts +++ b/src/common/runtime/server.ts @@ -92,6 +92,7 @@ for (let i = 0; i < sys.args.length; ++i) { Colors.enabled = true; } else if (a === '--compat') { globalTestConfig.compatibility = true; + globalTestConfig.featureLevel = 'compatibility'; } else if (a === '--coverage') { emitCoverage = true; } else if (a === '--force-fallback-adapter') { @@ -119,9 +120,14 @@ for (let i = 0; i < sys.args.length; ++i) { let codeCoverage: CodeCoverageProvider | undefined = undefined; -if (globalTestConfig.compatibility || globalTestConfig.forceFallbackAdapter) { +if ( + globalTestConfig.featureLevel || + globalTestConfig.compatibility || + globalTestConfig.forceFallbackAdapter +) { // MAINTENANCE_TODO: remove the cast once compatibilityMode is officially added setDefaultRequestAdapterOptions({ + featureLevel: globalTestConfig.featureLevel, compatibilityMode: globalTestConfig.compatibility, forceFallbackAdapter: globalTestConfig.forceFallbackAdapter, } as GPURequestAdapterOptions); diff --git a/src/common/runtime/standalone.ts b/src/common/runtime/standalone.ts index 0305031cc790..06ddfa17aecc 100644 --- a/src/common/runtime/standalone.ts +++ b/src/common/runtime/standalone.ts @@ -48,7 +48,7 @@ const { queries: qs, options } = parseSearchParamLikeWithOptions( kStandaloneOptionsInfos, window.location.search || rootQuerySpec ); -const { runnow, powerPreference, compatibility, forceFallbackAdapter } = options; +const { runnow, featureLevel, powerPreference, compatibility, forceFallbackAdapter } = options; globalTestConfig.enableDebugLogs = options.debug; globalTestConfig.unrollConstEvalLoops = options.unrollConstEvalLoops; globalTestConfig.compatibility = compatibility; @@ -81,8 +81,9 @@ stopButtonElem.addEventListener('click', () => { stopRequested = true; }); -if (powerPreference || compatibility || forceFallbackAdapter) { +if (featureLevel || powerPreference || compatibility || forceFallbackAdapter) { setDefaultRequestAdapterOptions({ + ...(featureLevel && { featureLevel }), ...(powerPreference && { powerPreference }), // MAINTENANCE_TODO: Change this to whatever the option ends up being ...(compatibility && { compatibilityMode: true }), diff --git a/src/webgpu/gpu_test.ts b/src/webgpu/gpu_test.ts index d6d6626109d4..295774eb98f2 100644 --- a/src/webgpu/gpu_test.ts +++ b/src/webgpu/gpu_test.ts @@ -129,7 +129,7 @@ export class GPUTestSubcaseBatchState extends SubcaseBatchState { } get isCompatibility() { - return globalTestConfig.compatibility; + return globalTestConfig.compatibility || globalTestConfig.featureLevel === 'compatibility'; } getDefaultLimits() { @@ -366,7 +366,7 @@ export class GPUTestBase extends Fixture { } get isCompatibility() { - return globalTestConfig.compatibility; + return globalTestConfig.compatibility || globalTestConfig.featureLevel === 'compatibility'; } getDefaultLimits() { diff --git a/src/webgpu/util/device_pool.ts b/src/webgpu/util/device_pool.ts index 20db6afd1b2e..20b58b983b35 100644 --- a/src/webgpu/util/device_pool.ts +++ b/src/webgpu/util/device_pool.ts @@ -245,9 +245,11 @@ function canonicalizeDescriptor( const limitsCanonicalized: Record = {}; // MAINTENANCE_TODO: Remove cast when @webgpu/types includes compatibilityMode const adapterOptions = getDefaultRequestAdapterOptions() as unknown as { + featureLevel?: string; compatibilityMode?: boolean; }; - const featureLevel = adapterOptions?.compatibilityMode ? 'compatibility' : 'core'; + const featureLevel = + adapterOptions?.featureLevel || adapterOptions?.compatibilityMode ? 'compatibility' : 'core'; const defaultLimits = getDefaultLimits(featureLevel); if (desc.requiredLimits) { for (const limit of kLimits) { From a952b0e0a6625762ae07647719c7289190f2ff75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Fri, 6 Dec 2024 11:49:48 +0100 Subject: [PATCH 02/10] Regenerate cache --- src/resources/cache/hashes.json | 220 +++++++++--------- .../cache/webgpu/shader/execution/bitcast.bin | Bin 2239856 -> 2239856 bytes 2 files changed, 110 insertions(+), 110 deletions(-) diff --git a/src/resources/cache/hashes.json b/src/resources/cache/hashes.json index e2224325944f..8460394236b7 100644 --- a/src/resources/cache/hashes.json +++ b/src/resources/cache/hashes.json @@ -1,112 +1,112 @@ { - "webgpu/shader/execution/binary/af_addition.bin": "d0c1b760", - "webgpu/shader/execution/binary/af_logical.bin": "ca60ce77", - "webgpu/shader/execution/binary/af_division.bin": "47ae1ca1", - "webgpu/shader/execution/binary/af_matrix_addition.bin": "afaf9bae", - "webgpu/shader/execution/binary/af_matrix_subtraction.bin": "42433bf3", - "webgpu/shader/execution/binary/af_multiplication.bin": "babfc501", - "webgpu/shader/execution/binary/af_remainder.bin": "19995293", - "webgpu/shader/execution/binary/af_subtraction.bin": "62f090b9", - "webgpu/shader/execution/binary/f16_addition.bin": "540ae334", - "webgpu/shader/execution/binary/f16_logical.bin": "c1f09c30", - "webgpu/shader/execution/binary/f16_division.bin": "b4eabc05", - "webgpu/shader/execution/binary/f16_matrix_addition.bin": "6b9113b", - "webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "a7362ff1", - "webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "4ac4e5bb", - "webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "93d4d43a", - "webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "beed89d5", - "webgpu/shader/execution/binary/f16_multiplication.bin": "6b5f0d51", - "webgpu/shader/execution/binary/f16_remainder.bin": "a1f499b3", - "webgpu/shader/execution/binary/f16_subtraction.bin": "61a571d5", - "webgpu/shader/execution/binary/f32_addition.bin": "fa6cc596", - "webgpu/shader/execution/binary/f32_logical.bin": "2b155b60", - "webgpu/shader/execution/binary/f32_division.bin": "243c9ce6", - "webgpu/shader/execution/binary/f32_matrix_addition.bin": "d3bc6ed6", - "webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "2a4c1527", - "webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "d695442", - "webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "b306b19", - "webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "aac6cbfd", - "webgpu/shader/execution/binary/f32_multiplication.bin": "a21303f5", - "webgpu/shader/execution/binary/f32_remainder.bin": "79e462a1", - "webgpu/shader/execution/binary/f32_subtraction.bin": "4e6bbf38", - "webgpu/shader/execution/binary/i32_arithmetic.bin": "167760cc", - "webgpu/shader/execution/binary/i32_comparison.bin": "6a9f856a", - "webgpu/shader/execution/binary/u32_arithmetic.bin": "ac424b44", - "webgpu/shader/execution/binary/u32_comparison.bin": "a9e71302", - "webgpu/shader/execution/abs.bin": "a42729c4", - "webgpu/shader/execution/acos.bin": "664a5662", - "webgpu/shader/execution/acosh.bin": "d3fb8eb0", - "webgpu/shader/execution/asin.bin": "5a4f5b9e", - "webgpu/shader/execution/asinh.bin": "3ce3fe4d", - "webgpu/shader/execution/atan.bin": "759d432", - "webgpu/shader/execution/atan2.bin": "95008607", - "webgpu/shader/execution/atanh.bin": "569bd1b6", - "webgpu/shader/execution/bitcast.bin": "4329e501", - "webgpu/shader/execution/ceil.bin": "55cc76e5", - "webgpu/shader/execution/clamp.bin": "d580a273", - "webgpu/shader/execution/cos.bin": "3107bc4b", - "webgpu/shader/execution/cosh.bin": "d36c86cc", - "webgpu/shader/execution/cross.bin": "e48c39ba", - "webgpu/shader/execution/degrees.bin": "f74b63d2", - "webgpu/shader/execution/determinant.bin": "f07e1160", - "webgpu/shader/execution/distance.bin": "93156a89", - "webgpu/shader/execution/dot.bin": "4e2fe407", - "webgpu/shader/execution/exp.bin": "3b269b18", - "webgpu/shader/execution/exp2.bin": "7aeeeaf6", - "webgpu/shader/execution/faceForward.bin": "451ffbd8", - "webgpu/shader/execution/floor.bin": "37131d74", - "webgpu/shader/execution/fma.bin": "30111350", - "webgpu/shader/execution/fract.bin": "5ef13392", - "webgpu/shader/execution/frexp.bin": "da764bc0", - "webgpu/shader/execution/inverseSqrt.bin": "6ff34703", - "webgpu/shader/execution/ldexp.bin": "5016cec9", - "webgpu/shader/execution/length.bin": "f236d2e7", - "webgpu/shader/execution/log.bin": "1c54f128", - "webgpu/shader/execution/log2.bin": "e44e2370", - "webgpu/shader/execution/max.bin": "eb4c1901", - "webgpu/shader/execution/min.bin": "f8c70a2b", - "webgpu/shader/execution/mix.bin": "df3b3f62", - "webgpu/shader/execution/modf.bin": "b600b26f", - "webgpu/shader/execution/normalize.bin": "7af3a3d2", - "webgpu/shader/execution/pack2x16float.bin": "7c67b10e", - "webgpu/shader/execution/pow.bin": "ee37f4ba", - "webgpu/shader/execution/quantizeToF16.bin": "a7a65754", - "webgpu/shader/execution/radians.bin": "51d423b9", - "webgpu/shader/execution/reflect.bin": "3ba4eda6", - "webgpu/shader/execution/refract.bin": "13fc4914", - "webgpu/shader/execution/round.bin": "9155b88b", - "webgpu/shader/execution/saturate.bin": "73cecf71", - "webgpu/shader/execution/sign.bin": "68d61a83", - "webgpu/shader/execution/sin.bin": "44219876", - "webgpu/shader/execution/sinh.bin": "158d261d", - "webgpu/shader/execution/smoothstep.bin": "7129c56b", - "webgpu/shader/execution/sqrt.bin": "9aaaf8aa", - "webgpu/shader/execution/step.bin": "85858027", - "webgpu/shader/execution/tan.bin": "dbbda634", - "webgpu/shader/execution/tanh.bin": "8c540d5c", - "webgpu/shader/execution/transpose.bin": "a676fc9a", - "webgpu/shader/execution/trunc.bin": "35ab398d", - "webgpu/shader/execution/unpack2x16float.bin": "eb9294c9", - "webgpu/shader/execution/unpack2x16snorm.bin": "7208eb73", - "webgpu/shader/execution/unpack2x16unorm.bin": "20d9669b", - "webgpu/shader/execution/unpack4x8snorm.bin": "c77e1a72", - "webgpu/shader/execution/unpack4x8unorm.bin": "d80caf66", - "webgpu/shader/execution/unary/af_arithmetic.bin": "963c3185", - "webgpu/shader/execution/unary/af_assignment.bin": "9e8a3b3f", - "webgpu/shader/execution/unary/bool_conversion.bin": "eee7a40c", - "webgpu/shader/execution/unary/f16_arithmetic.bin": "aaea9f75", - "webgpu/shader/execution/unary/f16_conversion.bin": "5b26998a", - "webgpu/shader/execution/unary/f32_arithmetic.bin": "65dfc2ac", - "webgpu/shader/execution/unary/f32_conversion.bin": "cd874be3", - "webgpu/shader/execution/unary/i32_arithmetic.bin": "af4c0e43", - "webgpu/shader/execution/unary/i32_conversion.bin": "5b6e4d9", - "webgpu/shader/execution/unary/u32_conversion.bin": "229649a6", - "webgpu/shader/execution/unary/ai_assignment.bin": "8efcf261", - "webgpu/shader/execution/binary/ai_arithmetic.bin": "a57ee284", - "webgpu/shader/execution/unary/ai_arithmetic.bin": "948016b6", - "webgpu/shader/execution/binary/af_matrix_matrix_multiplication.bin": "52c24212", - "webgpu/shader/execution/binary/af_matrix_scalar_multiplication.bin": "256556e1", - "webgpu/shader/execution/binary/af_matrix_vector_multiplication.bin": "38085521", - "webgpu/shader/execution/derivatives.bin": "f38a38ff", - "webgpu/shader/execution/fwidth.bin": "4e9fc55d" + "webgpu/shader/execution/binary/af_addition.bin": "d126a06f", + "webgpu/shader/execution/binary/af_logical.bin": "23f9e15d", + "webgpu/shader/execution/binary/af_division.bin": "7b551725", + "webgpu/shader/execution/binary/af_matrix_addition.bin": "113e055a", + "webgpu/shader/execution/binary/af_matrix_subtraction.bin": "7dd10a27", + "webgpu/shader/execution/binary/af_multiplication.bin": "691477b1", + "webgpu/shader/execution/binary/af_remainder.bin": "6dd06861", + "webgpu/shader/execution/binary/af_subtraction.bin": "84044d0e", + "webgpu/shader/execution/binary/f16_addition.bin": "78304704", + "webgpu/shader/execution/binary/f16_logical.bin": "878ff844", + "webgpu/shader/execution/binary/f16_division.bin": "19bb337a", + "webgpu/shader/execution/binary/f16_matrix_addition.bin": "151038f5", + "webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "a2776492", + "webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "c1721985", + "webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "4455a13", + "webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "d32b37d7", + "webgpu/shader/execution/binary/f16_multiplication.bin": "a5b7bdd5", + "webgpu/shader/execution/binary/f16_remainder.bin": "fc7f9cb8", + "webgpu/shader/execution/binary/f16_subtraction.bin": "a67eece7", + "webgpu/shader/execution/binary/f32_addition.bin": "3b586e41", + "webgpu/shader/execution/binary/f32_logical.bin": "eb4699ff", + "webgpu/shader/execution/binary/f32_division.bin": "fe2968fc", + "webgpu/shader/execution/binary/f32_matrix_addition.bin": "840c2385", + "webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "ae06c87a", + "webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "5db70464", + "webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "5efd12bf", + "webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "3fd6f431", + "webgpu/shader/execution/binary/f32_multiplication.bin": "de2137d5", + "webgpu/shader/execution/binary/f32_remainder.bin": "4de16df5", + "webgpu/shader/execution/binary/f32_subtraction.bin": "332bf33e", + "webgpu/shader/execution/binary/i32_arithmetic.bin": "7940a32", + "webgpu/shader/execution/binary/i32_comparison.bin": "67480b07", + "webgpu/shader/execution/binary/u32_arithmetic.bin": "f6360410", + "webgpu/shader/execution/binary/u32_comparison.bin": "6c9782a4", + "webgpu/shader/execution/abs.bin": "cf2e7867", + "webgpu/shader/execution/acos.bin": "75943511", + "webgpu/shader/execution/acosh.bin": "bdf26855", + "webgpu/shader/execution/asin.bin": "8669e486", + "webgpu/shader/execution/asinh.bin": "44803d", + "webgpu/shader/execution/atan.bin": "24efb9c4", + "webgpu/shader/execution/atan2.bin": "5ac1d122", + "webgpu/shader/execution/atanh.bin": "29a3e597", + "webgpu/shader/execution/bitcast.bin": "f7f6db6b", + "webgpu/shader/execution/ceil.bin": "7673a369", + "webgpu/shader/execution/clamp.bin": "5b9617a0", + "webgpu/shader/execution/cos.bin": "6ef11b2a", + "webgpu/shader/execution/cosh.bin": "7d3d99b1", + "webgpu/shader/execution/cross.bin": "637da2ad", + "webgpu/shader/execution/degrees.bin": "c239f5c", + "webgpu/shader/execution/determinant.bin": "d644eb18", + "webgpu/shader/execution/distance.bin": "ca1f94f9", + "webgpu/shader/execution/dot.bin": "7583c22f", + "webgpu/shader/execution/exp.bin": "6aecad97", + "webgpu/shader/execution/exp2.bin": "d20f07a1", + "webgpu/shader/execution/faceForward.bin": "477dea5f", + "webgpu/shader/execution/floor.bin": "917d43ac", + "webgpu/shader/execution/fma.bin": "e1060653", + "webgpu/shader/execution/fract.bin": "4c0f0db4", + "webgpu/shader/execution/frexp.bin": "52e30e77", + "webgpu/shader/execution/inverseSqrt.bin": "538293f", + "webgpu/shader/execution/ldexp.bin": "e4754f2d", + "webgpu/shader/execution/length.bin": "ad573029", + "webgpu/shader/execution/log.bin": "4cb6c66e", + "webgpu/shader/execution/log2.bin": "c6ff71a0", + "webgpu/shader/execution/max.bin": "cd0d314f", + "webgpu/shader/execution/min.bin": "78b5e6cb", + "webgpu/shader/execution/mix.bin": "a1f98f4c", + "webgpu/shader/execution/modf.bin": "911995f4", + "webgpu/shader/execution/normalize.bin": "1ea8e60c", + "webgpu/shader/execution/pack2x16float.bin": "6d6b6a30", + "webgpu/shader/execution/pow.bin": "50661a5f", + "webgpu/shader/execution/quantizeToF16.bin": "adf6801d", + "webgpu/shader/execution/radians.bin": "9a1c4d6b", + "webgpu/shader/execution/reflect.bin": "6b6f69ee", + "webgpu/shader/execution/refract.bin": "1dad6938", + "webgpu/shader/execution/round.bin": "e176d8a3", + "webgpu/shader/execution/saturate.bin": "30960728", + "webgpu/shader/execution/sign.bin": "a5f17e71", + "webgpu/shader/execution/sin.bin": "333ca23a", + "webgpu/shader/execution/sinh.bin": "a8ddce15", + "webgpu/shader/execution/smoothstep.bin": "a1b8f9c4", + "webgpu/shader/execution/sqrt.bin": "f616520b", + "webgpu/shader/execution/step.bin": "f778f694", + "webgpu/shader/execution/tan.bin": "3fd2c8", + "webgpu/shader/execution/tanh.bin": "c41dcd42", + "webgpu/shader/execution/transpose.bin": "e1a596e4", + "webgpu/shader/execution/trunc.bin": "b8de63db", + "webgpu/shader/execution/unpack2x16float.bin": "fed2127d", + "webgpu/shader/execution/unpack2x16snorm.bin": "8fdac08e", + "webgpu/shader/execution/unpack2x16unorm.bin": "c0198260", + "webgpu/shader/execution/unpack4x8snorm.bin": "1142beee", + "webgpu/shader/execution/unpack4x8unorm.bin": "44af9384", + "webgpu/shader/execution/unary/af_arithmetic.bin": "ed5281f2", + "webgpu/shader/execution/unary/af_assignment.bin": "60cb6114", + "webgpu/shader/execution/unary/bool_conversion.bin": "20fa4ffa", + "webgpu/shader/execution/unary/f16_arithmetic.bin": "211d5d52", + "webgpu/shader/execution/unary/f16_conversion.bin": "f28acaf1", + "webgpu/shader/execution/unary/f32_arithmetic.bin": "d34cb33a", + "webgpu/shader/execution/unary/f32_conversion.bin": "bbf29e1f", + "webgpu/shader/execution/unary/i32_arithmetic.bin": "e837977d", + "webgpu/shader/execution/unary/i32_conversion.bin": "f694c71", + "webgpu/shader/execution/unary/u32_conversion.bin": "3e48de23", + "webgpu/shader/execution/unary/ai_assignment.bin": "f09b8905", + "webgpu/shader/execution/binary/ai_arithmetic.bin": "c6fb4383", + "webgpu/shader/execution/unary/ai_arithmetic.bin": "ca367c55", + "webgpu/shader/execution/binary/af_matrix_matrix_multiplication.bin": "689d799d", + "webgpu/shader/execution/binary/af_matrix_scalar_multiplication.bin": "4b220ac9", + "webgpu/shader/execution/binary/af_matrix_vector_multiplication.bin": "2f8c324d", + "webgpu/shader/execution/derivatives.bin": "30427688", + "webgpu/shader/execution/fwidth.bin": "51a94600" } \ No newline at end of file diff --git a/src/resources/cache/webgpu/shader/execution/bitcast.bin b/src/resources/cache/webgpu/shader/execution/bitcast.bin index e743a092553e897f77d4826fafa162220d4fddde..9a0dd012e550b258eb213524f98ca038ca122b21 100644 GIT binary patch delta 152 zcmWN=yAgsw6hP5g{wV0mM-f4=1Ye5=5RsT~2@V;35K_g)MBX!V>^3UPd6Mt%tv^Nv uBZ>}Pdh{7EWW<;U9+@!ZiDznFm@#L;l2_hX@y?nLHf;H1$9^<K7L{YdKH= delta 151 zcmWN=w-JLt6hOhjgD}Digb`}tx2OOj=1NgUFGQ4ZF$uh#S-mfY=6@AauAh=wi9wSV pZ8~)6(PzL1Lq?35@X3@Ja~3RFvF3{nTfW(`=fII4PMebNao)1UH!}bL From 9a7c460350ea34c4605a8f1dfd0d3cb3d442bbb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Tue, 10 Dec 2024 10:35:55 +0100 Subject: [PATCH 03/10] Request adapters using featureLevel:compatibility --- src/common/framework/test_config.ts | 6 - src/common/runtime/cmdline.ts | 8 +- src/common/runtime/helper/options.ts | 13 +- src/common/runtime/helper/utils_worker.ts | 6 +- src/common/runtime/server.ts | 9 +- src/common/runtime/standalone.ts | 5 +- src/common/util/navigator_gpu.ts | 4 + src/resources/cache/hashes.json | 220 +++++++++++----------- src/webgpu/gpu_test.ts | 4 +- src/webgpu/util/device_pool.ts | 4 +- 10 files changed, 125 insertions(+), 154 deletions(-) diff --git a/src/common/framework/test_config.ts b/src/common/framework/test_config.ts index 56af6938c36e..072aaf736027 100644 --- a/src/common/framework/test_config.ts +++ b/src/common/framework/test_config.ts @@ -34,11 +34,6 @@ export type TestConfig = { */ unrollConstEvalLoops: boolean; - /** - * Feature level for the adapter request. - */ - featureLevel: string | null; - /** * Whether or not we're running in compatibility mode. */ @@ -62,7 +57,6 @@ export const globalTestConfig: TestConfig = { testHeartbeatCallback: () => {}, noRaceWithRejectOnTimeout: false, unrollConstEvalLoops: false, - featureLevel: null, compatibility: false, forceFallbackAdapter: false, logToWebSocket: false, diff --git a/src/common/runtime/cmdline.ts b/src/common/runtime/cmdline.ts index e5d9b8cc036b..c1e0c28d17c1 100644 --- a/src/common/runtime/cmdline.ts +++ b/src/common/runtime/cmdline.ts @@ -105,7 +105,6 @@ for (let i = 0; i < sys.args.length; ++i) { globalTestConfig.unrollConstEvalLoops = true; } else if (a === '--compat') { globalTestConfig.compatibility = true; - globalTestConfig.featureLevel = 'compatibility'; } else if (a === '--force-fallback-adapter') { globalTestConfig.forceFallbackAdapter = true; } else if (a === '--log-to-websocket') { @@ -121,14 +120,9 @@ for (let i = 0; i < sys.args.length; ++i) { let codeCoverage: CodeCoverageProvider | undefined = undefined; -if ( - globalTestConfig.featureLevel || - globalTestConfig.compatibility || - globalTestConfig.forceFallbackAdapter -) { +if (globalTestConfig.compatibility || globalTestConfig.forceFallbackAdapter) { // MAINTENANCE_TODO: remove the cast once compatibilityMode is officially added setDefaultRequestAdapterOptions({ - featureLevel: globalTestConfig.featureLevel, compatibilityMode: globalTestConfig.compatibility, forceFallbackAdapter: globalTestConfig.forceFallbackAdapter, } as GPURequestAdapterOptions); diff --git a/src/common/runtime/helper/options.ts b/src/common/runtime/helper/options.ts index 29db2455f85f..4a82c7d2928e 100644 --- a/src/common/runtime/helper/options.ts +++ b/src/common/runtime/helper/options.ts @@ -51,7 +51,6 @@ export function optionWorkerMode( export interface CTSOptions { worker: WorkerMode | null; debug: boolean; - featureLevel: 'core' | 'compatibility' | null; compatibility: boolean; forceFallbackAdapter: boolean; unrollConstEvalLoops: boolean; @@ -62,7 +61,6 @@ export interface CTSOptions { export const kDefaultCTSOptions: CTSOptions = { worker: null, debug: true, - featureLevel: null, compatibility: false, forceFallbackAdapter: false, unrollConstEvalLoops: false, @@ -100,16 +98,7 @@ export const kCTSOptionsInfo: OptionsInfos = { ], }, debug: { description: 'show more info' }, - featureLevel: { - description: 'set feature level for some tests', - parser: optionString, - selectValueDescriptions: [ - { value: null, description: 'default' }, - { value: 'core', description: 'core' }, - { value: 'compatibility', description: 'compatibility' }, - ], - }, - compatibility: { description: 'run in compatibility mode (non-standard)' }, + compatibility: { description: 'run in compatibility mode' }, forceFallbackAdapter: { description: 'pass forceFallbackAdapter: true to requestAdapter' }, unrollConstEvalLoops: { description: 'unroll const eval loops in WGSL' }, powerPreference: { diff --git a/src/common/runtime/helper/utils_worker.ts b/src/common/runtime/helper/utils_worker.ts index ce6c2faf9288..13880635bca7 100644 --- a/src/common/runtime/helper/utils_worker.ts +++ b/src/common/runtime/helper/utils_worker.ts @@ -15,18 +15,16 @@ export interface WorkerTestRunRequest { * Set config environment for workers with ctsOptions and return a Logger. */ export function setupWorkerEnvironment(ctsOptions: CTSOptions): Logger { - const { featureLevel, powerPreference, compatibility } = ctsOptions; + const { powerPreference, compatibility } = ctsOptions; globalTestConfig.enableDebugLogs = ctsOptions.debug; globalTestConfig.unrollConstEvalLoops = ctsOptions.unrollConstEvalLoops; - globalTestConfig.featureLevel = featureLevel; globalTestConfig.compatibility = compatibility; globalTestConfig.logToWebSocket = ctsOptions.logToWebSocket; const log = new Logger(); - if (featureLevel || powerPreference || compatibility) { + if (powerPreference || compatibility) { setDefaultRequestAdapterOptions({ - ...(featureLevel && { featureLevel }), ...(powerPreference && { powerPreference }), // MAINTENANCE_TODO: Change this to whatever the option ends up being ...(compatibility && { compatibilityMode: true }), diff --git a/src/common/runtime/server.ts b/src/common/runtime/server.ts index 637df588be2d..7ebd1aade478 100644 --- a/src/common/runtime/server.ts +++ b/src/common/runtime/server.ts @@ -92,7 +92,6 @@ for (let i = 0; i < sys.args.length; ++i) { Colors.enabled = true; } else if (a === '--compat') { globalTestConfig.compatibility = true; - globalTestConfig.featureLevel = 'compatibility'; } else if (a === '--coverage') { emitCoverage = true; } else if (a === '--force-fallback-adapter') { @@ -120,14 +119,10 @@ for (let i = 0; i < sys.args.length; ++i) { let codeCoverage: CodeCoverageProvider | undefined = undefined; -if ( - globalTestConfig.featureLevel || - globalTestConfig.compatibility || - globalTestConfig.forceFallbackAdapter -) { +console.log("server"); +if (globalTestConfig.compatibility || globalTestConfig.forceFallbackAdapter) { // MAINTENANCE_TODO: remove the cast once compatibilityMode is officially added setDefaultRequestAdapterOptions({ - featureLevel: globalTestConfig.featureLevel, compatibilityMode: globalTestConfig.compatibility, forceFallbackAdapter: globalTestConfig.forceFallbackAdapter, } as GPURequestAdapterOptions); diff --git a/src/common/runtime/standalone.ts b/src/common/runtime/standalone.ts index 06ddfa17aecc..0305031cc790 100644 --- a/src/common/runtime/standalone.ts +++ b/src/common/runtime/standalone.ts @@ -48,7 +48,7 @@ const { queries: qs, options } = parseSearchParamLikeWithOptions( kStandaloneOptionsInfos, window.location.search || rootQuerySpec ); -const { runnow, featureLevel, powerPreference, compatibility, forceFallbackAdapter } = options; +const { runnow, powerPreference, compatibility, forceFallbackAdapter } = options; globalTestConfig.enableDebugLogs = options.debug; globalTestConfig.unrollConstEvalLoops = options.unrollConstEvalLoops; globalTestConfig.compatibility = compatibility; @@ -81,9 +81,8 @@ stopButtonElem.addEventListener('click', () => { stopRequested = true; }); -if (featureLevel || powerPreference || compatibility || forceFallbackAdapter) { +if (powerPreference || compatibility || forceFallbackAdapter) { setDefaultRequestAdapterOptions({ - ...(featureLevel && { featureLevel }), ...(powerPreference && { powerPreference }), // MAINTENANCE_TODO: Change this to whatever the option ends up being ...(compatibility && { compatibilityMode: true }), diff --git a/src/common/util/navigator_gpu.ts b/src/common/util/navigator_gpu.ts index 4e58797097ed..e54edf6ad594 100644 --- a/src/common/util/navigator_gpu.ts +++ b/src/common/util/navigator_gpu.ts @@ -43,6 +43,10 @@ export function setDefaultRequestAdapterOptions(options: GPURequestAdapterOption throw new Error('must call setDefaultRequestAdapterOptions before getGPU'); } defaultRequestAdapterOptions = { ...options }; + // MAINTENANCE_TODO: remove this once compatibilityMode is removed. + defaultRequestAdapterOptions.featureLevel = + 'compatibilityMode' in options && options.compatibilityMode ? 'compatibility' : 'core'; + } export function getDefaultRequestAdapterOptions() { diff --git a/src/resources/cache/hashes.json b/src/resources/cache/hashes.json index 8460394236b7..e2224325944f 100644 --- a/src/resources/cache/hashes.json +++ b/src/resources/cache/hashes.json @@ -1,112 +1,112 @@ { - "webgpu/shader/execution/binary/af_addition.bin": "d126a06f", - "webgpu/shader/execution/binary/af_logical.bin": "23f9e15d", - "webgpu/shader/execution/binary/af_division.bin": "7b551725", - "webgpu/shader/execution/binary/af_matrix_addition.bin": "113e055a", - "webgpu/shader/execution/binary/af_matrix_subtraction.bin": "7dd10a27", - "webgpu/shader/execution/binary/af_multiplication.bin": "691477b1", - "webgpu/shader/execution/binary/af_remainder.bin": "6dd06861", - "webgpu/shader/execution/binary/af_subtraction.bin": "84044d0e", - "webgpu/shader/execution/binary/f16_addition.bin": "78304704", - "webgpu/shader/execution/binary/f16_logical.bin": "878ff844", - "webgpu/shader/execution/binary/f16_division.bin": "19bb337a", - "webgpu/shader/execution/binary/f16_matrix_addition.bin": "151038f5", - "webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "a2776492", - "webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "c1721985", - "webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "4455a13", - "webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "d32b37d7", - "webgpu/shader/execution/binary/f16_multiplication.bin": "a5b7bdd5", - "webgpu/shader/execution/binary/f16_remainder.bin": "fc7f9cb8", - "webgpu/shader/execution/binary/f16_subtraction.bin": "a67eece7", - "webgpu/shader/execution/binary/f32_addition.bin": "3b586e41", - "webgpu/shader/execution/binary/f32_logical.bin": "eb4699ff", - "webgpu/shader/execution/binary/f32_division.bin": "fe2968fc", - "webgpu/shader/execution/binary/f32_matrix_addition.bin": "840c2385", - "webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "ae06c87a", - "webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "5db70464", - "webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "5efd12bf", - "webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "3fd6f431", - "webgpu/shader/execution/binary/f32_multiplication.bin": "de2137d5", - "webgpu/shader/execution/binary/f32_remainder.bin": "4de16df5", - "webgpu/shader/execution/binary/f32_subtraction.bin": "332bf33e", - "webgpu/shader/execution/binary/i32_arithmetic.bin": "7940a32", - "webgpu/shader/execution/binary/i32_comparison.bin": "67480b07", - "webgpu/shader/execution/binary/u32_arithmetic.bin": "f6360410", - "webgpu/shader/execution/binary/u32_comparison.bin": "6c9782a4", - "webgpu/shader/execution/abs.bin": "cf2e7867", - "webgpu/shader/execution/acos.bin": "75943511", - "webgpu/shader/execution/acosh.bin": "bdf26855", - "webgpu/shader/execution/asin.bin": "8669e486", - "webgpu/shader/execution/asinh.bin": "44803d", - "webgpu/shader/execution/atan.bin": "24efb9c4", - "webgpu/shader/execution/atan2.bin": "5ac1d122", - "webgpu/shader/execution/atanh.bin": "29a3e597", - "webgpu/shader/execution/bitcast.bin": "f7f6db6b", - "webgpu/shader/execution/ceil.bin": "7673a369", - "webgpu/shader/execution/clamp.bin": "5b9617a0", - "webgpu/shader/execution/cos.bin": "6ef11b2a", - "webgpu/shader/execution/cosh.bin": "7d3d99b1", - "webgpu/shader/execution/cross.bin": "637da2ad", - "webgpu/shader/execution/degrees.bin": "c239f5c", - "webgpu/shader/execution/determinant.bin": "d644eb18", - "webgpu/shader/execution/distance.bin": "ca1f94f9", - "webgpu/shader/execution/dot.bin": "7583c22f", - "webgpu/shader/execution/exp.bin": "6aecad97", - "webgpu/shader/execution/exp2.bin": "d20f07a1", - "webgpu/shader/execution/faceForward.bin": "477dea5f", - "webgpu/shader/execution/floor.bin": "917d43ac", - "webgpu/shader/execution/fma.bin": "e1060653", - "webgpu/shader/execution/fract.bin": "4c0f0db4", - "webgpu/shader/execution/frexp.bin": "52e30e77", - "webgpu/shader/execution/inverseSqrt.bin": "538293f", - "webgpu/shader/execution/ldexp.bin": "e4754f2d", - "webgpu/shader/execution/length.bin": "ad573029", - "webgpu/shader/execution/log.bin": "4cb6c66e", - "webgpu/shader/execution/log2.bin": "c6ff71a0", - "webgpu/shader/execution/max.bin": "cd0d314f", - "webgpu/shader/execution/min.bin": "78b5e6cb", - "webgpu/shader/execution/mix.bin": "a1f98f4c", - "webgpu/shader/execution/modf.bin": "911995f4", - "webgpu/shader/execution/normalize.bin": "1ea8e60c", - "webgpu/shader/execution/pack2x16float.bin": "6d6b6a30", - "webgpu/shader/execution/pow.bin": "50661a5f", - "webgpu/shader/execution/quantizeToF16.bin": "adf6801d", - "webgpu/shader/execution/radians.bin": "9a1c4d6b", - "webgpu/shader/execution/reflect.bin": "6b6f69ee", - "webgpu/shader/execution/refract.bin": "1dad6938", - "webgpu/shader/execution/round.bin": "e176d8a3", - "webgpu/shader/execution/saturate.bin": "30960728", - "webgpu/shader/execution/sign.bin": "a5f17e71", - "webgpu/shader/execution/sin.bin": "333ca23a", - "webgpu/shader/execution/sinh.bin": "a8ddce15", - "webgpu/shader/execution/smoothstep.bin": "a1b8f9c4", - "webgpu/shader/execution/sqrt.bin": "f616520b", - "webgpu/shader/execution/step.bin": "f778f694", - "webgpu/shader/execution/tan.bin": "3fd2c8", - "webgpu/shader/execution/tanh.bin": "c41dcd42", - "webgpu/shader/execution/transpose.bin": "e1a596e4", - "webgpu/shader/execution/trunc.bin": "b8de63db", - "webgpu/shader/execution/unpack2x16float.bin": "fed2127d", - "webgpu/shader/execution/unpack2x16snorm.bin": "8fdac08e", - "webgpu/shader/execution/unpack2x16unorm.bin": "c0198260", - "webgpu/shader/execution/unpack4x8snorm.bin": "1142beee", - "webgpu/shader/execution/unpack4x8unorm.bin": "44af9384", - "webgpu/shader/execution/unary/af_arithmetic.bin": "ed5281f2", - "webgpu/shader/execution/unary/af_assignment.bin": "60cb6114", - "webgpu/shader/execution/unary/bool_conversion.bin": "20fa4ffa", - "webgpu/shader/execution/unary/f16_arithmetic.bin": "211d5d52", - "webgpu/shader/execution/unary/f16_conversion.bin": "f28acaf1", - "webgpu/shader/execution/unary/f32_arithmetic.bin": "d34cb33a", - "webgpu/shader/execution/unary/f32_conversion.bin": "bbf29e1f", - "webgpu/shader/execution/unary/i32_arithmetic.bin": "e837977d", - "webgpu/shader/execution/unary/i32_conversion.bin": "f694c71", - "webgpu/shader/execution/unary/u32_conversion.bin": "3e48de23", - "webgpu/shader/execution/unary/ai_assignment.bin": "f09b8905", - "webgpu/shader/execution/binary/ai_arithmetic.bin": "c6fb4383", - "webgpu/shader/execution/unary/ai_arithmetic.bin": "ca367c55", - "webgpu/shader/execution/binary/af_matrix_matrix_multiplication.bin": "689d799d", - "webgpu/shader/execution/binary/af_matrix_scalar_multiplication.bin": "4b220ac9", - "webgpu/shader/execution/binary/af_matrix_vector_multiplication.bin": "2f8c324d", - "webgpu/shader/execution/derivatives.bin": "30427688", - "webgpu/shader/execution/fwidth.bin": "51a94600" + "webgpu/shader/execution/binary/af_addition.bin": "d0c1b760", + "webgpu/shader/execution/binary/af_logical.bin": "ca60ce77", + "webgpu/shader/execution/binary/af_division.bin": "47ae1ca1", + "webgpu/shader/execution/binary/af_matrix_addition.bin": "afaf9bae", + "webgpu/shader/execution/binary/af_matrix_subtraction.bin": "42433bf3", + "webgpu/shader/execution/binary/af_multiplication.bin": "babfc501", + "webgpu/shader/execution/binary/af_remainder.bin": "19995293", + "webgpu/shader/execution/binary/af_subtraction.bin": "62f090b9", + "webgpu/shader/execution/binary/f16_addition.bin": "540ae334", + "webgpu/shader/execution/binary/f16_logical.bin": "c1f09c30", + "webgpu/shader/execution/binary/f16_division.bin": "b4eabc05", + "webgpu/shader/execution/binary/f16_matrix_addition.bin": "6b9113b", + "webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "a7362ff1", + "webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "4ac4e5bb", + "webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "93d4d43a", + "webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "beed89d5", + "webgpu/shader/execution/binary/f16_multiplication.bin": "6b5f0d51", + "webgpu/shader/execution/binary/f16_remainder.bin": "a1f499b3", + "webgpu/shader/execution/binary/f16_subtraction.bin": "61a571d5", + "webgpu/shader/execution/binary/f32_addition.bin": "fa6cc596", + "webgpu/shader/execution/binary/f32_logical.bin": "2b155b60", + "webgpu/shader/execution/binary/f32_division.bin": "243c9ce6", + "webgpu/shader/execution/binary/f32_matrix_addition.bin": "d3bc6ed6", + "webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "2a4c1527", + "webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "d695442", + "webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "b306b19", + "webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "aac6cbfd", + "webgpu/shader/execution/binary/f32_multiplication.bin": "a21303f5", + "webgpu/shader/execution/binary/f32_remainder.bin": "79e462a1", + "webgpu/shader/execution/binary/f32_subtraction.bin": "4e6bbf38", + "webgpu/shader/execution/binary/i32_arithmetic.bin": "167760cc", + "webgpu/shader/execution/binary/i32_comparison.bin": "6a9f856a", + "webgpu/shader/execution/binary/u32_arithmetic.bin": "ac424b44", + "webgpu/shader/execution/binary/u32_comparison.bin": "a9e71302", + "webgpu/shader/execution/abs.bin": "a42729c4", + "webgpu/shader/execution/acos.bin": "664a5662", + "webgpu/shader/execution/acosh.bin": "d3fb8eb0", + "webgpu/shader/execution/asin.bin": "5a4f5b9e", + "webgpu/shader/execution/asinh.bin": "3ce3fe4d", + "webgpu/shader/execution/atan.bin": "759d432", + "webgpu/shader/execution/atan2.bin": "95008607", + "webgpu/shader/execution/atanh.bin": "569bd1b6", + "webgpu/shader/execution/bitcast.bin": "4329e501", + "webgpu/shader/execution/ceil.bin": "55cc76e5", + "webgpu/shader/execution/clamp.bin": "d580a273", + "webgpu/shader/execution/cos.bin": "3107bc4b", + "webgpu/shader/execution/cosh.bin": "d36c86cc", + "webgpu/shader/execution/cross.bin": "e48c39ba", + "webgpu/shader/execution/degrees.bin": "f74b63d2", + "webgpu/shader/execution/determinant.bin": "f07e1160", + "webgpu/shader/execution/distance.bin": "93156a89", + "webgpu/shader/execution/dot.bin": "4e2fe407", + "webgpu/shader/execution/exp.bin": "3b269b18", + "webgpu/shader/execution/exp2.bin": "7aeeeaf6", + "webgpu/shader/execution/faceForward.bin": "451ffbd8", + "webgpu/shader/execution/floor.bin": "37131d74", + "webgpu/shader/execution/fma.bin": "30111350", + "webgpu/shader/execution/fract.bin": "5ef13392", + "webgpu/shader/execution/frexp.bin": "da764bc0", + "webgpu/shader/execution/inverseSqrt.bin": "6ff34703", + "webgpu/shader/execution/ldexp.bin": "5016cec9", + "webgpu/shader/execution/length.bin": "f236d2e7", + "webgpu/shader/execution/log.bin": "1c54f128", + "webgpu/shader/execution/log2.bin": "e44e2370", + "webgpu/shader/execution/max.bin": "eb4c1901", + "webgpu/shader/execution/min.bin": "f8c70a2b", + "webgpu/shader/execution/mix.bin": "df3b3f62", + "webgpu/shader/execution/modf.bin": "b600b26f", + "webgpu/shader/execution/normalize.bin": "7af3a3d2", + "webgpu/shader/execution/pack2x16float.bin": "7c67b10e", + "webgpu/shader/execution/pow.bin": "ee37f4ba", + "webgpu/shader/execution/quantizeToF16.bin": "a7a65754", + "webgpu/shader/execution/radians.bin": "51d423b9", + "webgpu/shader/execution/reflect.bin": "3ba4eda6", + "webgpu/shader/execution/refract.bin": "13fc4914", + "webgpu/shader/execution/round.bin": "9155b88b", + "webgpu/shader/execution/saturate.bin": "73cecf71", + "webgpu/shader/execution/sign.bin": "68d61a83", + "webgpu/shader/execution/sin.bin": "44219876", + "webgpu/shader/execution/sinh.bin": "158d261d", + "webgpu/shader/execution/smoothstep.bin": "7129c56b", + "webgpu/shader/execution/sqrt.bin": "9aaaf8aa", + "webgpu/shader/execution/step.bin": "85858027", + "webgpu/shader/execution/tan.bin": "dbbda634", + "webgpu/shader/execution/tanh.bin": "8c540d5c", + "webgpu/shader/execution/transpose.bin": "a676fc9a", + "webgpu/shader/execution/trunc.bin": "35ab398d", + "webgpu/shader/execution/unpack2x16float.bin": "eb9294c9", + "webgpu/shader/execution/unpack2x16snorm.bin": "7208eb73", + "webgpu/shader/execution/unpack2x16unorm.bin": "20d9669b", + "webgpu/shader/execution/unpack4x8snorm.bin": "c77e1a72", + "webgpu/shader/execution/unpack4x8unorm.bin": "d80caf66", + "webgpu/shader/execution/unary/af_arithmetic.bin": "963c3185", + "webgpu/shader/execution/unary/af_assignment.bin": "9e8a3b3f", + "webgpu/shader/execution/unary/bool_conversion.bin": "eee7a40c", + "webgpu/shader/execution/unary/f16_arithmetic.bin": "aaea9f75", + "webgpu/shader/execution/unary/f16_conversion.bin": "5b26998a", + "webgpu/shader/execution/unary/f32_arithmetic.bin": "65dfc2ac", + "webgpu/shader/execution/unary/f32_conversion.bin": "cd874be3", + "webgpu/shader/execution/unary/i32_arithmetic.bin": "af4c0e43", + "webgpu/shader/execution/unary/i32_conversion.bin": "5b6e4d9", + "webgpu/shader/execution/unary/u32_conversion.bin": "229649a6", + "webgpu/shader/execution/unary/ai_assignment.bin": "8efcf261", + "webgpu/shader/execution/binary/ai_arithmetic.bin": "a57ee284", + "webgpu/shader/execution/unary/ai_arithmetic.bin": "948016b6", + "webgpu/shader/execution/binary/af_matrix_matrix_multiplication.bin": "52c24212", + "webgpu/shader/execution/binary/af_matrix_scalar_multiplication.bin": "256556e1", + "webgpu/shader/execution/binary/af_matrix_vector_multiplication.bin": "38085521", + "webgpu/shader/execution/derivatives.bin": "f38a38ff", + "webgpu/shader/execution/fwidth.bin": "4e9fc55d" } \ No newline at end of file diff --git a/src/webgpu/gpu_test.ts b/src/webgpu/gpu_test.ts index 295774eb98f2..d6d6626109d4 100644 --- a/src/webgpu/gpu_test.ts +++ b/src/webgpu/gpu_test.ts @@ -129,7 +129,7 @@ export class GPUTestSubcaseBatchState extends SubcaseBatchState { } get isCompatibility() { - return globalTestConfig.compatibility || globalTestConfig.featureLevel === 'compatibility'; + return globalTestConfig.compatibility; } getDefaultLimits() { @@ -366,7 +366,7 @@ export class GPUTestBase extends Fixture { } get isCompatibility() { - return globalTestConfig.compatibility || globalTestConfig.featureLevel === 'compatibility'; + return globalTestConfig.compatibility; } getDefaultLimits() { diff --git a/src/webgpu/util/device_pool.ts b/src/webgpu/util/device_pool.ts index 20b58b983b35..20db6afd1b2e 100644 --- a/src/webgpu/util/device_pool.ts +++ b/src/webgpu/util/device_pool.ts @@ -245,11 +245,9 @@ function canonicalizeDescriptor( const limitsCanonicalized: Record = {}; // MAINTENANCE_TODO: Remove cast when @webgpu/types includes compatibilityMode const adapterOptions = getDefaultRequestAdapterOptions() as unknown as { - featureLevel?: string; compatibilityMode?: boolean; }; - const featureLevel = - adapterOptions?.featureLevel || adapterOptions?.compatibilityMode ? 'compatibility' : 'core'; + const featureLevel = adapterOptions?.compatibilityMode ? 'compatibility' : 'core'; const defaultLimits = getDefaultLimits(featureLevel); if (desc.requiredLimits) { for (const limit of kLimits) { From 0ebb08fabd7c1a6cfe741aadb3259e6395b592a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Tue, 10 Dec 2024 10:37:11 +0100 Subject: [PATCH 04/10] Remove log --- src/common/runtime/server.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/common/runtime/server.ts b/src/common/runtime/server.ts index 7ebd1aade478..4bb8f68ff02b 100644 --- a/src/common/runtime/server.ts +++ b/src/common/runtime/server.ts @@ -118,8 +118,6 @@ for (let i = 0; i < sys.args.length; ++i) { } let codeCoverage: CodeCoverageProvider | undefined = undefined; - -console.log("server"); if (globalTestConfig.compatibility || globalTestConfig.forceFallbackAdapter) { // MAINTENANCE_TODO: remove the cast once compatibilityMode is officially added setDefaultRequestAdapterOptions({ From 4ca9d4ae7b5721e2b80071e5db33e082c8f06ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Tue, 10 Dec 2024 10:37:34 +0100 Subject: [PATCH 05/10] Empty line --- src/common/runtime/server.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/runtime/server.ts b/src/common/runtime/server.ts index 4bb8f68ff02b..2fc98a44dc38 100644 --- a/src/common/runtime/server.ts +++ b/src/common/runtime/server.ts @@ -76,6 +76,7 @@ if (!sys.existsSync('src/common/runtime/cmdline.ts')) { console.log('Must be run from repository root'); usage(1); } + setBaseResourcePath('out-node/resources'); Colors.enabled = false; From 1af6dea89b07ca20279484c11bbb90a384f1c8d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Tue, 10 Dec 2024 10:38:19 +0100 Subject: [PATCH 06/10] Empty line --- src/common/runtime/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/runtime/server.ts b/src/common/runtime/server.ts index 2fc98a44dc38..38ad04479430 100644 --- a/src/common/runtime/server.ts +++ b/src/common/runtime/server.ts @@ -76,7 +76,6 @@ if (!sys.existsSync('src/common/runtime/cmdline.ts')) { console.log('Must be run from repository root'); usage(1); } - setBaseResourcePath('out-node/resources'); Colors.enabled = false; @@ -119,6 +118,7 @@ for (let i = 0; i < sys.args.length; ++i) { } let codeCoverage: CodeCoverageProvider | undefined = undefined; + if (globalTestConfig.compatibility || globalTestConfig.forceFallbackAdapter) { // MAINTENANCE_TODO: remove the cast once compatibilityMode is officially added setDefaultRequestAdapterOptions({ From fd7834a74d0fc74f00102ef78a76478f172b77dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Tue, 10 Dec 2024 10:53:44 +0100 Subject: [PATCH 07/10] Fix nit --- src/common/util/navigator_gpu.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/common/util/navigator_gpu.ts b/src/common/util/navigator_gpu.ts index e54edf6ad594..40242db746ab 100644 --- a/src/common/util/navigator_gpu.ts +++ b/src/common/util/navigator_gpu.ts @@ -46,7 +46,6 @@ export function setDefaultRequestAdapterOptions(options: GPURequestAdapterOption // MAINTENANCE_TODO: remove this once compatibilityMode is removed. defaultRequestAdapterOptions.featureLevel = 'compatibilityMode' in options && options.compatibilityMode ? 'compatibility' : 'core'; - } export function getDefaultRequestAdapterOptions() { From 33c0d79ded594a35d041ef32a4aef3f6eba18194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Wed, 11 Dec 2024 09:39:51 +0100 Subject: [PATCH 08/10] Address feedback --- src/common/runtime/cmdline.ts | 1 + src/common/runtime/helper/utils_worker.ts | 2 +- src/common/runtime/server.ts | 1 + src/common/runtime/standalone.ts | 2 +- src/common/util/navigator_gpu.ts | 3 --- src/webgpu/api/operation/adapter/info.spec.ts | 1 + 6 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/runtime/cmdline.ts b/src/common/runtime/cmdline.ts index c1e0c28d17c1..b2d220ec8ef9 100644 --- a/src/common/runtime/cmdline.ts +++ b/src/common/runtime/cmdline.ts @@ -124,6 +124,7 @@ if (globalTestConfig.compatibility || globalTestConfig.forceFallbackAdapter) { // MAINTENANCE_TODO: remove the cast once compatibilityMode is officially added setDefaultRequestAdapterOptions({ compatibilityMode: globalTestConfig.compatibility, + featureLevel: globalTestConfig.compatibility ? 'compatibility' : 'core', forceFallbackAdapter: globalTestConfig.forceFallbackAdapter, } as GPURequestAdapterOptions); } diff --git a/src/common/runtime/helper/utils_worker.ts b/src/common/runtime/helper/utils_worker.ts index 13880635bca7..5886839f6c33 100644 --- a/src/common/runtime/helper/utils_worker.ts +++ b/src/common/runtime/helper/utils_worker.ts @@ -27,7 +27,7 @@ export function setupWorkerEnvironment(ctsOptions: CTSOptions): Logger { setDefaultRequestAdapterOptions({ ...(powerPreference && { powerPreference }), // MAINTENANCE_TODO: Change this to whatever the option ends up being - ...(compatibility && { compatibilityMode: true }), + ...(compatibility && { compatibilityMode: true, featureLevel: 'compatibility' }), }); } diff --git a/src/common/runtime/server.ts b/src/common/runtime/server.ts index 38ad04479430..d908ce89ba7a 100644 --- a/src/common/runtime/server.ts +++ b/src/common/runtime/server.ts @@ -123,6 +123,7 @@ if (globalTestConfig.compatibility || globalTestConfig.forceFallbackAdapter) { // MAINTENANCE_TODO: remove the cast once compatibilityMode is officially added setDefaultRequestAdapterOptions({ compatibilityMode: globalTestConfig.compatibility, + featureLevel: globalTestConfig.compatibility ? 'compatibility' : 'core', forceFallbackAdapter: globalTestConfig.forceFallbackAdapter, } as GPURequestAdapterOptions); } diff --git a/src/common/runtime/standalone.ts b/src/common/runtime/standalone.ts index 0305031cc790..a079ac28dd98 100644 --- a/src/common/runtime/standalone.ts +++ b/src/common/runtime/standalone.ts @@ -85,7 +85,7 @@ if (powerPreference || compatibility || forceFallbackAdapter) { setDefaultRequestAdapterOptions({ ...(powerPreference && { powerPreference }), // MAINTENANCE_TODO: Change this to whatever the option ends up being - ...(compatibility && { compatibilityMode: true }), + ...(compatibility && { compatibilityMode: true, featureLevel: 'compatibility' }), ...(forceFallbackAdapter && { forceFallbackAdapter: true }), }); } diff --git a/src/common/util/navigator_gpu.ts b/src/common/util/navigator_gpu.ts index 40242db746ab..4e58797097ed 100644 --- a/src/common/util/navigator_gpu.ts +++ b/src/common/util/navigator_gpu.ts @@ -43,9 +43,6 @@ export function setDefaultRequestAdapterOptions(options: GPURequestAdapterOption throw new Error('must call setDefaultRequestAdapterOptions before getGPU'); } defaultRequestAdapterOptions = { ...options }; - // MAINTENANCE_TODO: remove this once compatibilityMode is removed. - defaultRequestAdapterOptions.featureLevel = - 'compatibilityMode' in options && options.compatibilityMode ? 'compatibility' : 'core'; } export function getDefaultRequestAdapterOptions() { diff --git a/src/webgpu/api/operation/adapter/info.spec.ts b/src/webgpu/api/operation/adapter/info.spec.ts index 0d9e120015eb..a38528034554 100644 --- a/src/webgpu/api/operation/adapter/info.spec.ts +++ b/src/webgpu/api/operation/adapter/info.spec.ts @@ -21,6 +21,7 @@ g.test('adapter_info') .fn(async t => { const gpu = getGPU(t.rec); const adapter = await gpu.requestAdapter(); + console.log(adapter); assert(adapter !== null); const adapterInfo = adapter.info; From 082a39f4d859e4a4617a1bc61ec6e7130f07b7df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Date: Wed, 11 Dec 2024 09:41:13 +0100 Subject: [PATCH 09/10] Remove log --- src/webgpu/api/operation/adapter/info.spec.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/webgpu/api/operation/adapter/info.spec.ts b/src/webgpu/api/operation/adapter/info.spec.ts index a38528034554..0d9e120015eb 100644 --- a/src/webgpu/api/operation/adapter/info.spec.ts +++ b/src/webgpu/api/operation/adapter/info.spec.ts @@ -21,7 +21,6 @@ g.test('adapter_info') .fn(async t => { const gpu = getGPU(t.rec); const adapter = await gpu.requestAdapter(); - console.log(adapter); assert(adapter !== null); const adapterInfo = adapter.info; From 51547ac22ce128dc4ade2f38d93ddd38c38a35b2 Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Wed, 11 Dec 2024 23:07:56 -0500 Subject: [PATCH 10/10] revert bitcast.bin --- .../cache/webgpu/shader/execution/bitcast.bin | Bin 2239856 -> 2239856 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/resources/cache/webgpu/shader/execution/bitcast.bin b/src/resources/cache/webgpu/shader/execution/bitcast.bin index 9a0dd012e550b258eb213524f98ca038ca122b21..e743a092553e897f77d4826fafa162220d4fddde 100644 GIT binary patch delta 151 zcmWN=w-JLt6hOhjgD}Digb`}tx2OOj=1NgUFGQ4ZF$uh#S-mfY=6@AauAh=wi9wSV pZ8~)6(PzL1Lq?35@X3@Ja~3RFvF3{nTfW(`=fII4PMebNao)1UH!}bL delta 152 zcmWN=yAgsw6hP5g{wV0mM-f4=1Ye5=5RsT~2@V;35K_g)MBX!V>^3UPd6Mt%tv^Nv uBZ>}Pdh{7EWW<;U9+@!ZiDznFm@#L;l2_hX@y?nLHf;H1$9^<K7L{YdKH=