From 45757be0ec94c6180dda6869d2525d2b22db1f4c Mon Sep 17 00:00:00 2001 From: alan-baker Date: Mon, 28 Oct 2024 11:00:03 -0400 Subject: [PATCH] Fix subgroupAdd and subgroupMul execution tests (#4013) * Use kDataSentinel instead of 999 --- .../execution/expression/call/builtin/subgroupAdd.spec.ts | 3 ++- .../execution/expression/call/builtin/subgroupMul.spec.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 04792b2d98c1..a35981a31d5a 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/subgroupAdd.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/subgroupAdd.spec.ts @@ -24,6 +24,7 @@ import { import { FP } from '../../../../../util/floating_point.js'; import { + kDataSentinel, kNumCases, kStride, kWGSizes, @@ -278,7 +279,7 @@ function checkPredicatedAddition( } } } else { - expected = 999; + expected = kDataSentinel; } if (expected !== output[i]) { return new Error(`Invocation ${i}: incorrect result 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 d45c023cd17a..28734afeb7d6 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/subgroupMul.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/subgroupMul.spec.ts @@ -24,6 +24,7 @@ import { import { FP } from '../../../../../util/floating_point.js'; import { + kDataSentinel, kNumCases, kStride, kWGSizes, @@ -301,7 +302,7 @@ function checkPredicatedMultiplication( } } } else { - expected = 999; + expected = kDataSentinel; } if (expected !== output[i]) { return new Error(`Invocation ${i}: incorrect result