Skip to content

Commit

Permalink
Compat: make atomicCOmpareExchangeWeak tests handle limits
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Jan 5, 2024
1 parent dc4dbef commit 0973e61
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,11 @@ struct __atomic_compare_exchange_result<T> {
const numInvocations = t.params.workgroupSize;
const scalarType = t.params.scalarType;

t.skipIf(
numInvocations > t.device.limits.maxComputeWorkgroupSizeX,
`${numInvocations} > maxComputeWorkgroupSizeX(${t.device.limits.maxComputeWorkgroupSizeX})`
);

// Number of times each workgroup attempts to exchange the same value to the same memory address
const numWrites = 4;

Expand Down Expand Up @@ -556,6 +561,11 @@ struct __atomic_compare_exchange_result<T> {
const numInvocations = t.params.workgroupSize;
const scalarType = t.params.scalarType;

t.skipIf(
numInvocations > t.device.limits.maxComputeWorkgroupSizeX,
`${numInvocations} > maxComputeWorkgroupSizeX(${t.device.limits.maxComputeWorkgroupSizeX})`
);

// Number of times each workgroup attempts to exchange the same value to the same memory address
const numWrites = 4;

Expand Down

0 comments on commit 0973e61

Please sign in to comment.