gpuweb / cts

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

error in webgpu:shader,validation,expression,call,builtin,normalize:values:stage="override";type="vec4%3Cf16%3E #3655

Open greggman opened 2 months ago

greggman commented 2 months ago

webgpu:shader,validation,expression,call,builtin,normalize:values:stage="override";type="vec4%3Cf16%3E

EXCEPTION: Error: Unexpected validation error occurred: Tint program failure: :6:19 error: zero length vector can not be normalized
    var<private> v  = normalize(vec4<f16>(o0, o1, o2, o3));
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

is this an error in the test?

kainino0x commented 2 months ago

Bisected; this regressed with #3636

Failing tests on my machine (M1 Mac, Chrome 125.0.6415.0 (Official Build) canary (arm64))

webgpu:shader,validation,expression,call,builtin,normalize:values:stage="constant";type="vec2%3Cf16%3E"
webgpu:shader,validation,expression,call,builtin,normalize:values:stage="constant";type="vec3%3Cf16%3E"
webgpu:shader,validation,expression,call,builtin,normalize:values:stage="constant";type="vec4%3Cf16%3E"
webgpu:shader,validation,expression,call,builtin,normalize:values:stage="override";type="vec2%3Cf16%3E"
webgpu:shader,validation,expression,call,builtin,normalize:values:stage="override";type="vec3%3Cf16%3E"
webgpu:shader,validation,expression,call,builtin,normalize:values:stage="override";type="vec4%3Cf16%3E"
toji commented 2 months ago

I've been able to repro as well. Been looking into it for the past couple of days, don't have a solution yet. I'm not eager to revert #3636, though, because it allowed up to land several other pending tests that would likely break now if we did.

kainino0x commented 2 months ago

Sounds like it could just be that something is rounding to 0 that wasn't rounding before, due to a small change in rounding behavior in the library?