gpuweb / cts

WebGPU Conformance Test Suite
https://gpuweb.github.io/cts/
BSD 3-Clause "New" or "Revised" License
130 stars 82 forks source link

CTS for subgroupAdd and subgroupMul #3897

Closed alan-baker closed 2 months ago

alan-baker commented 3 months ago

Issue: #


Requirements for PR author:

Requirements for reviewer sign-off:

When landing this PR, be sure to make any necessary issue status updates.

alan-baker commented 2 months ago

I checked the the Add tests. The coverage looks good. It's nearly there.

The accuracy result should say why we're only spot checking two positions: 1. to ensure we don't overflow and hit indeterminate value, and 2. to reuse the accuracy checking machinery.

(On 1. actually, can't we hit an overflow value by accident? E.g. max value + max value?)

By reusing the intervals do we not properly handle the overflow?

dneto0 commented 2 months ago

I checked the the Add tests. The coverage looks good. It's nearly there. The accuracy result should say why we're only spot checking two positions: 1. to ensure we don't overflow and hit indeterminate value, and 2. to reuse the accuracy checking machinery. (On 1. actually, can't we hit an overflow value by accident? E.g. max value + max value?)

By reusing the intervals do we not properly handle the overflow?

Yes we do, but by only doing two multiplies (or adds) it's much less likely that we'll hit infinity. It's about making a high fraction of the cases provide meaningful things to check. Sorry should have been more clear.