From f1844b1e71b49acb25be06a410f5d06c8480834b Mon Sep 17 00:00:00 2001 From: petermcneeleychromium <96925679+petermcneeleychromium@users.noreply.github.com> Date: Wed, 11 Dec 2024 13:43:10 -0500 Subject: [PATCH] Remove subgroups f16 enable from cts ("subgroups_f16") (#4083) * Full removal of subgroups_f16 enable * Subgroup f16 pass * Add back f16 enable for subgroup f16 tests tested locally with dawn node * minor formatting fix --------- Co-authored-by: Peter McNeeley --- .../call/builtin/quadBroadcast.spec.ts | 3 +-- .../expression/call/builtin/quadSwap.spec.ts | 3 +-- .../call/builtin/subgroupAdd.spec.ts | 4 +--- .../call/builtin/subgroupBroadcast.spec.ts | 3 +-- .../call/builtin/subgroupMul.spec.ts | 4 +--- .../call/builtin/subgroupShuffle.spec.ts | 3 +-- .../expression/call/builtin/subgroup_util.ts | 2 +- .../call/builtin/quadBroadcast.spec.ts | 6 ++---- .../expression/call/builtin/quadSwap.spec.ts | 6 ++---- .../call/builtin/subgroupAdd.spec.ts | 6 ++---- .../call/builtin/subgroupAnyAll.spec.ts | 6 ++---- .../call/builtin/subgroupBallot.spec.ts | 6 ++---- .../call/builtin/subgroupBitwise.spec.ts | 6 ++---- .../call/builtin/subgroupBroadcast.spec.ts | 6 ++---- .../builtin/subgroupBroadcastFirst.spec.ts | 6 ++---- .../call/builtin/subgroupElect.spec.ts | 6 ++---- .../call/builtin/subgroupMinMax.spec.ts | 6 ++---- .../call/builtin/subgroupMul.spec.ts | 6 ++---- .../call/builtin/subgroupShuffle.spec.ts | 9 +++----- .../shader/validation/parse/enable.spec.ts | 21 +++++++------------ 20 files changed, 39 insertions(+), 79 deletions(-) diff --git a/src/webgpu/shader/execution/expression/call/builtin/quadBroadcast.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/quadBroadcast.spec.ts index 521ae2925354..f8d9ec9a362b 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/quadBroadcast.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/quadBroadcast.spec.ts @@ -109,7 +109,6 @@ g.test('data_types') const features: GPUFeatureName[] = ['subgroups' as GPUFeatureName]; const type = kTypes[t.params.type]; if (type.requiresF16()) { - features.push('subgroups-f16' as GPUFeatureName); features.push('shader-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); @@ -119,7 +118,7 @@ g.test('data_types') const type = kTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable f16;\nenable subgroups_f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} diff --git a/src/webgpu/shader/execution/expression/call/builtin/quadSwap.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/quadSwap.spec.ts index 0985b331b903..7e754152c9b5 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/quadSwap.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/quadSwap.spec.ts @@ -131,7 +131,6 @@ g.test('data_types') const features: GPUFeatureName[] = ['subgroups' as GPUFeatureName]; const type = kTypes[t.params.type]; if (type.requiresF16()) { - features.push('subgroups-f16' as GPUFeatureName); features.push('shader-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); @@ -141,7 +140,7 @@ g.test('data_types') const type = kTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable f16;\nenable subgroups_f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} diff --git a/src/webgpu/shader/execution/expression/call/builtin/subgroupAdd.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/subgroupAdd.spec.ts index 86510fe87738..f2c1a1b2efa7 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/subgroupAdd.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/subgroupAdd.spec.ts @@ -65,7 +65,6 @@ and limit the number of permutations needed to calculate the final result.` const features: GPUFeatureName[] = ['subgroups' as GPUFeatureName]; if (t.params.type === 'f16') { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -170,7 +169,6 @@ TODO: support vec3 types. const type = kDataTypes[t.params.type]; if (type.requiresF16()) { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -183,7 +181,7 @@ TODO: support vec3 types. const scalarType = scalarTypeOf(type); let enables = 'enable subgroups;\n'; if (type.requiresF16()) { - enables += 'enable f16;\nenable subgroups_f16;\n'; + enables += 'enable f16;\n'; } const wgThreads = t.params.wgSize[0] * t.params.wgSize[1] * t.params.wgSize[2]; diff --git a/src/webgpu/shader/execution/expression/call/builtin/subgroupBroadcast.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/subgroupBroadcast.spec.ts index 50dac8c4d894..211cf1285340 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/subgroupBroadcast.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/subgroupBroadcast.spec.ts @@ -110,7 +110,6 @@ g.test('data_types') const type = kDataTypes[t.params.type]; if (type.requiresF16()) { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -119,7 +118,7 @@ g.test('data_types') const type = kDataTypes[t.params.type]; let enables = 'enable subgroups;\n'; if (type.requiresF16()) { - enables += 'enable f16;\nenable subgroups_f16;\n'; + enables += 'enable f16;\n'; } const broadcast = diff --git a/src/webgpu/shader/execution/expression/call/builtin/subgroupMul.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/subgroupMul.spec.ts index dfcaf481fcab..fdededc6e6ba 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/subgroupMul.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/subgroupMul.spec.ts @@ -65,7 +65,6 @@ and limit the number of permutations needed to calculate the final result.` const features: GPUFeatureName[] = ['subgroups' as GPUFeatureName]; if (t.params.type === 'f16') { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -188,7 +187,6 @@ TODO: support vec3 types. const type = kDataTypes[t.params.type]; if (type.requiresF16()) { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -201,7 +199,7 @@ TODO: support vec3 types. const scalarType = scalarTypeOf(type); let enables = 'enable subgroups;\n'; if (type.requiresF16()) { - enables += 'enable f16;\nenable subgroups_f16;\n'; + enables += 'enable f16;\n'; } const wgThreads = t.params.wgSize[0] * t.params.wgSize[1] * t.params.wgSize[2]; diff --git a/src/webgpu/shader/execution/expression/call/builtin/subgroupShuffle.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/subgroupShuffle.spec.ts index 84620b05d889..73e1fe6bcaa7 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/subgroupShuffle.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/subgroupShuffle.spec.ts @@ -738,7 +738,6 @@ g.test('data_types') const features: GPUFeatureName[] = ['subgroups' as GPUFeatureName]; const type = kTypes[t.params.type]; if (type.requiresF16()) { - features.push('subgroups-f16' as GPUFeatureName); features.push('shader-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); @@ -748,7 +747,7 @@ g.test('data_types') const type = kTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable f16;\nenable subgroups_f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} diff --git a/src/webgpu/shader/execution/expression/call/builtin/subgroup_util.ts b/src/webgpu/shader/execution/expression/call/builtin/subgroup_util.ts index 2d97eade1904..71852c6a315c 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/subgroup_util.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/subgroup_util.ts @@ -173,7 +173,7 @@ export async function runAccuracyTest( const val1 = range[prng.uniformInt(numVals)]; const val2 = range[prng.uniformInt(numVals)]; - const extraEnables = type === 'f16' ? `enable f16;\nenable subgroups_f16;` : ``; + const extraEnables = type === 'f16' ? `enable f16;` : ``; const wgsl = ` enable subgroups; ${extraEnables} diff --git a/src/webgpu/shader/validation/expression/call/builtin/quadBroadcast.spec.ts b/src/webgpu/shader/validation/expression/call/builtin/quadBroadcast.spec.ts index 80b1c2a38a69..3bfb61f66c18 100644 --- a/src/webgpu/shader/validation/expression/call/builtin/quadBroadcast.spec.ts +++ b/src/webgpu/shader/validation/expression/call/builtin/quadBroadcast.spec.ts @@ -85,7 +85,6 @@ g.test('data_type') const features = ['subgroups' as GPUFeatureName]; const type = kArgumentTypes[t.params.type]; if (type.requiresF16()) { - features.push('subgroups-f16' as GPUFeatureName); features.push('shader-f16'); } t.selectDeviceOrSkipTestCase(features); @@ -94,7 +93,7 @@ g.test('data_type') const type = kArgumentTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable subgroups_f16;\nenable f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} @@ -130,7 +129,6 @@ g.test('return_type') const dataType = kArgumentTypes[t.params.dataType]; const retType = kArgumentTypes[t.params.retType]; if (dataType.requiresF16() || retType.requiresF16()) { - features.push('subgroups-f16' as GPUFeatureName); features.push('shader-f16'); } t.selectDeviceOrSkipTestCase(features); @@ -140,7 +138,7 @@ g.test('return_type') const retType = kArgumentTypes[t.params.retType]; let enables = `enable subgroups;\n`; if (dataType.requiresF16() || retType.requiresF16()) { - enables += `enable subgroups_f16;\nenable f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} diff --git a/src/webgpu/shader/validation/expression/call/builtin/quadSwap.spec.ts b/src/webgpu/shader/validation/expression/call/builtin/quadSwap.spec.ts index af5c397c52ae..90e8f54e19ca 100644 --- a/src/webgpu/shader/validation/expression/call/builtin/quadSwap.spec.ts +++ b/src/webgpu/shader/validation/expression/call/builtin/quadSwap.spec.ts @@ -94,7 +94,6 @@ g.test('data_type') const type = kTypes[t.params.type]; if (type.requiresF16()) { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -102,7 +101,7 @@ g.test('data_type') const type = kTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable f16;\nenable subgroups_f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} @@ -134,7 +133,6 @@ g.test('return_type') const paramType = kTypes[t.params.paramType]; if (retType.requiresF16() || paramType.requiresF16()) { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -143,7 +141,7 @@ g.test('return_type') const paramType = kTypes[t.params.paramType]; let enables = `enable subgroups;\n`; if (retType.requiresF16() || paramType.requiresF16()) { - enables += `enable f16;\nenable subgroups_f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} diff --git a/src/webgpu/shader/validation/expression/call/builtin/subgroupAdd.spec.ts b/src/webgpu/shader/validation/expression/call/builtin/subgroupAdd.spec.ts index 4f2a2af52197..a98712be76ce 100644 --- a/src/webgpu/shader/validation/expression/call/builtin/subgroupAdd.spec.ts +++ b/src/webgpu/shader/validation/expression/call/builtin/subgroupAdd.spec.ts @@ -79,7 +79,6 @@ g.test('data_type') const features = ['subgroups' as GPUFeatureName]; const type = kArgumentTypes[t.params.type]; if (type.requiresF16()) { - features.push('subgroups-f16' as GPUFeatureName); features.push('shader-f16'); } t.selectDeviceOrSkipTestCase(features); @@ -88,7 +87,7 @@ g.test('data_type') const type = kArgumentTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable subgroups_f16;\nenable f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} @@ -126,7 +125,6 @@ g.test('return_type') const dataType = kArgumentTypes[t.params.dataType]; const retType = kArgumentTypes[t.params.retType]; if (dataType.requiresF16() || retType.requiresF16()) { - features.push('subgroups-f16' as GPUFeatureName); features.push('shader-f16'); } t.selectDeviceOrSkipTestCase(features); @@ -136,7 +134,7 @@ g.test('return_type') const retType = kArgumentTypes[t.params.retType]; let enables = `enable subgroups;\n`; if (dataType.requiresF16() || retType.requiresF16()) { - enables += `enable subgroups_f16;\nenable f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} diff --git a/src/webgpu/shader/validation/expression/call/builtin/subgroupAnyAll.spec.ts b/src/webgpu/shader/validation/expression/call/builtin/subgroupAnyAll.spec.ts index eaee33e62cff..a944eab19ee0 100644 --- a/src/webgpu/shader/validation/expression/call/builtin/subgroupAnyAll.spec.ts +++ b/src/webgpu/shader/validation/expression/call/builtin/subgroupAnyAll.spec.ts @@ -89,7 +89,6 @@ g.test('data_type') const type = kTypes[t.params.type]; if (type.requiresF16()) { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -97,7 +96,7 @@ g.test('data_type') const type = kTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable f16;\nenable subgroups_f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} @@ -126,7 +125,6 @@ g.test('return_type') const type = kTypes[t.params.type]; if (type.requiresF16()) { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -134,7 +132,7 @@ g.test('return_type') const type = kTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable f16;\nenable subgroups_f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} diff --git a/src/webgpu/shader/validation/expression/call/builtin/subgroupBallot.spec.ts b/src/webgpu/shader/validation/expression/call/builtin/subgroupBallot.spec.ts index 5f53847be25c..2f461bedb8fd 100644 --- a/src/webgpu/shader/validation/expression/call/builtin/subgroupBallot.spec.ts +++ b/src/webgpu/shader/validation/expression/call/builtin/subgroupBallot.spec.ts @@ -80,7 +80,6 @@ g.test('data_type') const features = ['subgroups' as GPUFeatureName]; const type = kArgumentTypes[t.params.type]; if (type.requiresF16()) { - features.push('subgroups-f16' as GPUFeatureName); features.push('shader-f16'); } t.selectDeviceOrSkipTestCase(features); @@ -89,7 +88,7 @@ g.test('data_type') const type = kArgumentTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable subgroups_f16;\nenable f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} @@ -114,7 +113,6 @@ g.test('return_type') const features = ['subgroups' as GPUFeatureName]; const type = kArgumentTypes[t.params.type]; if (type.requiresF16()) { - features.push('subgroups-f16' as GPUFeatureName); features.push('shader-f16'); } t.selectDeviceOrSkipTestCase(features); @@ -123,7 +121,7 @@ g.test('return_type') const type = kArgumentTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable subgroups_f16;\nenable f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} diff --git a/src/webgpu/shader/validation/expression/call/builtin/subgroupBitwise.spec.ts b/src/webgpu/shader/validation/expression/call/builtin/subgroupBitwise.spec.ts index ca0dfb6fd719..348c857a0703 100644 --- a/src/webgpu/shader/validation/expression/call/builtin/subgroupBitwise.spec.ts +++ b/src/webgpu/shader/validation/expression/call/builtin/subgroupBitwise.spec.ts @@ -94,7 +94,6 @@ g.test('data_type') const type = kTypes[t.params.type]; if (type.requiresF16()) { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -102,7 +101,7 @@ g.test('data_type') const type = kTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable f16;\nenable subgroups_f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} @@ -135,7 +134,6 @@ g.test('return_type') const paramType = kTypes[t.params.paramType]; if (retType.requiresF16() || paramType.requiresF16()) { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -144,7 +142,7 @@ g.test('return_type') const paramType = kTypes[t.params.paramType]; let enables = `enable subgroups;\n`; if (retType.requiresF16() || paramType.requiresF16()) { - enables += `enable f16;\nenable subgroups_f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} diff --git a/src/webgpu/shader/validation/expression/call/builtin/subgroupBroadcast.spec.ts b/src/webgpu/shader/validation/expression/call/builtin/subgroupBroadcast.spec.ts index 5feef1d2811b..522f11801a85 100644 --- a/src/webgpu/shader/validation/expression/call/builtin/subgroupBroadcast.spec.ts +++ b/src/webgpu/shader/validation/expression/call/builtin/subgroupBroadcast.spec.ts @@ -85,7 +85,6 @@ g.test('data_type') const features = ['subgroups' as GPUFeatureName]; const type = kArgumentTypes[t.params.type]; if (type.requiresF16()) { - features.push('subgroups-f16' as GPUFeatureName); features.push('shader-f16'); } t.selectDeviceOrSkipTestCase(features); @@ -94,7 +93,7 @@ g.test('data_type') const type = kArgumentTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable subgroups_f16;\nenable f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} @@ -130,7 +129,6 @@ g.test('return_type') const dataType = kArgumentTypes[t.params.dataType]; const retType = kArgumentTypes[t.params.retType]; if (dataType.requiresF16() || retType.requiresF16()) { - features.push('subgroups-f16' as GPUFeatureName); features.push('shader-f16'); } t.selectDeviceOrSkipTestCase(features); @@ -140,7 +138,7 @@ g.test('return_type') const retType = kArgumentTypes[t.params.retType]; let enables = `enable subgroups;\n`; if (dataType.requiresF16() || retType.requiresF16()) { - enables += `enable subgroups_f16;\nenable f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} diff --git a/src/webgpu/shader/validation/expression/call/builtin/subgroupBroadcastFirst.spec.ts b/src/webgpu/shader/validation/expression/call/builtin/subgroupBroadcastFirst.spec.ts index 6f35c3350e04..e43b0b2e1c99 100644 --- a/src/webgpu/shader/validation/expression/call/builtin/subgroupBroadcastFirst.spec.ts +++ b/src/webgpu/shader/validation/expression/call/builtin/subgroupBroadcastFirst.spec.ts @@ -80,7 +80,6 @@ g.test('data_type') const features = ['subgroups' as GPUFeatureName]; const type = kArgumentTypes[t.params.type]; if (type.requiresF16()) { - features.push('subgroups-f16' as GPUFeatureName); features.push('shader-f16'); } t.selectDeviceOrSkipTestCase(features); @@ -89,7 +88,7 @@ g.test('data_type') const type = kArgumentTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable subgroups_f16;\nenable f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} @@ -125,7 +124,6 @@ g.test('return_type') const dataType = kArgumentTypes[t.params.dataType]; const retType = kArgumentTypes[t.params.retType]; if (dataType.requiresF16() || retType.requiresF16()) { - features.push('subgroups-f16' as GPUFeatureName); features.push('shader-f16'); } t.selectDeviceOrSkipTestCase(features); @@ -135,7 +133,7 @@ g.test('return_type') const retType = kArgumentTypes[t.params.retType]; let enables = `enable subgroups;\n`; if (dataType.requiresF16() || retType.requiresF16()) { - enables += `enable subgroups_f16;\nenable f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} diff --git a/src/webgpu/shader/validation/expression/call/builtin/subgroupElect.spec.ts b/src/webgpu/shader/validation/expression/call/builtin/subgroupElect.spec.ts index 5637860c59ce..a74b07bf06a5 100644 --- a/src/webgpu/shader/validation/expression/call/builtin/subgroupElect.spec.ts +++ b/src/webgpu/shader/validation/expression/call/builtin/subgroupElect.spec.ts @@ -81,7 +81,6 @@ g.test('data_type') const type = kTypes[t.params.type]; if (type.requiresF16()) { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -89,7 +88,7 @@ g.test('data_type') const type = kTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable f16;\nenable subgroups_f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} @@ -115,7 +114,6 @@ g.test('return_type') const type = kTypes[t.params.type]; if (type.requiresF16()) { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -123,7 +121,7 @@ g.test('return_type') const type = kTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable f16;\nenable subgroups_f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} diff --git a/src/webgpu/shader/validation/expression/call/builtin/subgroupMinMax.spec.ts b/src/webgpu/shader/validation/expression/call/builtin/subgroupMinMax.spec.ts index 566fdc665ecc..648511c7746b 100644 --- a/src/webgpu/shader/validation/expression/call/builtin/subgroupMinMax.spec.ts +++ b/src/webgpu/shader/validation/expression/call/builtin/subgroupMinMax.spec.ts @@ -94,7 +94,6 @@ g.test('data_type') const type = kTypes[t.params.type]; if (type.requiresF16()) { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -102,7 +101,7 @@ g.test('data_type') const type = kTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable f16;\nenable subgroups_f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} @@ -134,7 +133,6 @@ g.test('return_type') const paramType = kTypes[t.params.paramType]; if (retType.requiresF16() || paramType.requiresF16()) { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -143,7 +141,7 @@ g.test('return_type') const paramType = kTypes[t.params.paramType]; let enables = `enable subgroups;\n`; if (retType.requiresF16() || paramType.requiresF16()) { - enables += `enable f16;\nenable subgroups_f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} diff --git a/src/webgpu/shader/validation/expression/call/builtin/subgroupMul.spec.ts b/src/webgpu/shader/validation/expression/call/builtin/subgroupMul.spec.ts index 0b50d4c9df2d..2515c798ecb9 100644 --- a/src/webgpu/shader/validation/expression/call/builtin/subgroupMul.spec.ts +++ b/src/webgpu/shader/validation/expression/call/builtin/subgroupMul.spec.ts @@ -79,7 +79,6 @@ g.test('data_type') const features = ['subgroups' as GPUFeatureName]; const type = kArgumentTypes[t.params.type]; if (type.requiresF16()) { - features.push('subgroups-f16' as GPUFeatureName); features.push('shader-f16'); } t.selectDeviceOrSkipTestCase(features); @@ -88,7 +87,7 @@ g.test('data_type') const type = kArgumentTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable subgroups_f16;\nenable f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} @@ -126,7 +125,6 @@ g.test('return_type') const dataType = kArgumentTypes[t.params.dataType]; const retType = kArgumentTypes[t.params.retType]; if (dataType.requiresF16() || retType.requiresF16()) { - features.push('subgroups-f16' as GPUFeatureName); features.push('shader-f16'); } t.selectDeviceOrSkipTestCase(features); @@ -136,7 +134,7 @@ g.test('return_type') const retType = kArgumentTypes[t.params.retType]; let enables = `enable subgroups;\n`; if (dataType.requiresF16() || retType.requiresF16()) { - enables += `enable subgroups_f16;\nenable f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} diff --git a/src/webgpu/shader/validation/expression/call/builtin/subgroupShuffle.spec.ts b/src/webgpu/shader/validation/expression/call/builtin/subgroupShuffle.spec.ts index 4f14503d579d..028f61d162a9 100644 --- a/src/webgpu/shader/validation/expression/call/builtin/subgroupShuffle.spec.ts +++ b/src/webgpu/shader/validation/expression/call/builtin/subgroupShuffle.spec.ts @@ -153,7 +153,6 @@ g.test('data_type') const type = kTypes[t.params.type]; if (type.requiresF16()) { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -161,7 +160,7 @@ g.test('data_type') const type = kTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable f16;\nenable subgroups_f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} @@ -193,7 +192,6 @@ g.test('return_type') const paramType = kTypes[t.params.paramType]; if (retType.requiresF16() || paramType.requiresF16()) { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -202,7 +200,7 @@ g.test('return_type') const paramType = kTypes[t.params.paramType]; let enables = `enable subgroups;\n`; if (retType.requiresF16() || paramType.requiresF16()) { - enables += `enable f16;\nenable subgroups_f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} @@ -232,7 +230,6 @@ g.test('param2_type') const type = kTypes[t.params.type]; if (type.requiresF16()) { features.push('shader-f16'); - features.push('subgroups-f16' as GPUFeatureName); } t.selectDeviceOrSkipTestCase(features); }) @@ -240,7 +237,7 @@ g.test('param2_type') const type = kTypes[t.params.type]; let enables = `enable subgroups;\n`; if (type.requiresF16()) { - enables += `enable f16;\nenable subgroups_f16;`; + enables += `enable f16;`; } const wgsl = ` ${enables} diff --git a/src/webgpu/shader/validation/parse/enable.spec.ts b/src/webgpu/shader/validation/parse/enable.spec.ts index 77311de71e2e..41e2a3842204 100644 --- a/src/webgpu/shader/validation/parse/enable.spec.ts +++ b/src/webgpu/shader/validation/parse/enable.spec.ts @@ -70,22 +70,16 @@ enable f16;`, code: `enable subgroups;`, pass: true, }, - subgroups_f16_fail: { - code: `enable subgroups_f16;`, - pass: false, - }, subgroups_f16_pass1: { code: ` - enable subgroups_f16; - enable subgroups; - enable f16;`, + enable f16; + enable subgroups;`, pass: true, }, subgroups_f16_pass2: { code: ` - enable f16; enable subgroups; - enable subgroups_f16;`, + enable f16;`, pass: true, }, }; @@ -95,12 +89,11 @@ g.test('enable') .beforeAllSubcases(t => { const features: GPUFeatureName[] = []; const name: string = t.params.case as string; - if (name.includes('subgroups_f16')) { - features.push('subgroups' as GPUFeatureName); - features.push('subgroups-f16' as GPUFeatureName); - features.push('shader-f16'); - } else if (name.includes('subgroups')) { + if (name.includes('subgroups')) { features.push('subgroups' as GPUFeatureName); + if (name.includes('f16')) { + features.push('shader-f16'); + } } else { features.push('shader-f16'); }