Skip to content

Commit

Permalink
Remove subgroups f16 enable from cts ("subgroups_f16") (#4083)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
petermcneeleychromium and Peter McNeeley authored Dec 11, 2024
1 parent 1e545f5 commit f1844b1
Show file tree
Hide file tree
Showing 20 changed files with 39 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
})
Expand Down Expand Up @@ -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);
})
Expand All @@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
})
Expand All @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
})
Expand Down Expand Up @@ -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);
})
Expand All @@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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}
Expand Down Expand Up @@ -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);
Expand All @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,14 @@ 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);
})
.fn(t => {
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}
Expand Down Expand Up @@ -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);
})
Expand All @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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}
Expand Down Expand Up @@ -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);
Expand All @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,14 @@ 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);
})
.fn(t => {
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}
Expand Down Expand Up @@ -126,15 +125,14 @@ 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);
})
.fn(t => {
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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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}
Expand All @@ -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);
Expand All @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,14 @@ 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);
})
.fn(t => {
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}
Expand Down Expand Up @@ -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);
})
Expand All @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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}
Expand Down Expand Up @@ -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);
Expand All @@ -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}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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}
Expand Down Expand Up @@ -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);
Expand All @@ -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}
Expand Down
Loading

0 comments on commit f1844b1

Please sign in to comment.