Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught exception in shader execution tests: #3157

Open
ben-clayton opened this issue Nov 10, 2023 · 3 comments
Open

Uncaught exception in shader execution tests: #3157

ben-clayton opened this issue Nov 10, 2023 · 3 comments

Comments

@ben-clayton
Copy link
Contributor

webgpu:shader,execution,expression,binary,af_division:scalar_vector:inputSource="const";dim=4 - pass
2023/11/10 19:27:05 exception "Uncaught (in promise)" (367:2): GPUPipelineError: An error occured while generating SPIR-V: :64:192 error: value -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0 cannot be represented as 'f32'
    const subnormal_or_zero : bool = (((mat2x2(1.0, -10.0, -1.0, 1.0))+(mat2x2(-1.7976931348623157e+308, 0.0, 0.0, 0.0)))[1][1] <= 2.225073858507201e-308) && (((mat2x2(1.0, -10.0, -1.0, 1.0))+(mat2x2(-1.7976931348623157e+308, 0.0, 0.0, 0.0)))[1][1] >= -2.225073858507201e-308);
                                                                                                                                                                                               ^
.
    at operator() (../../third_party/dawn/src/dawn/native/vulkan/ShaderModuleVk.cpp:351)
    at GetHandleAndSpirv (../../third_party/dawn/src/dawn/native/vulkan/ShaderModuleVk.cpp:358)
    at Initialize (../../third_party/dawn/src/dawn/native/vulkan/ComputePipelineVk.cpp:66)
@toji
Copy link
Member

toji commented Nov 10, 2023

What device are you seeing this on and how are you running the tests in order to provoke it? (In browser, node, etc?) I'm having trouble repro-ing.

@ben-clayton
Copy link
Contributor Author

Thanks for looking.

I was running with the run-cts chrome tool in the dawn repo. This should run very similarly to the telemetry runner, except I'm also trapping and printing uncaught execptions (like this one).

There's a bunch of changes that I'm going to push for review (likely Monday), which simplifies the usage of this tool. I'd recommend waiting until that's landed, and then to repro should be a one-liner.

@toji
Copy link
Member

toji commented Nov 10, 2023

Thanks! I think I see what the problem is: Prior to my refactor a pipeline creation failure would have simply returned an invalid pipeline and the test would catch the unexpected validation failure at the end, but now those errors are only surfaced via promise rejection. I likely just need to catch that and explicitly fail the test when it happens, but I'd like to know that I can repro the problem before I land that as a fix.

I'll sketch out the code I think will resolve it and wait till Monday-ish to test it against your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants