Closed MarkIngramUK closed 3 years ago
That would be this one: https://github.com/microsoft/OpenCLOn12/blob/master/src/program.cpp#L73, which means that we're producing DXIL that doesn't validate.
Any chance you'd be able to share the program(s) that trigger this so we can debug?
I'd need to share it privately, is that possible?
Yes, you can send it to me at jenatali@microsoft.com.
Looking at the kernel, I imagine it's because we're making use of cl_khr_byte_addressable_store
, as I know OpenCLOn12 doesn't support extensions right now. I'll send the kernel regardless, in case there is more to it than that.
That one might actually be free for us to flip on, so yes please still send the kernel.
As a requirement for supporting packed structures, we already have to support unaligned reads/writes, so as long as Clang/LLVM is able to figure out that they're unaligned and embed that information in the resulting SPIR-V, our compiler stack should emit the necessary code to handle unaligned reads/writes.
Oh, nevermind. https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_Ext.html#cl_khr_byte_addressable_store says that this is a core 1.1 feature, so yes we do support it, since we've implemented 1.2.
Ah OK - I missed that. We take a hard dependency on OpenCL 1.1, so that's good. I'm continuing to trim the kernel down to a minimum repro that triggers the asserts. As soon as I'm there I'll send it over.
Hm... I'm not reproducing on the latest compiler, which could very well mean that it's already been fixed. Let me see if I can reproduce using the compiler from your exact package.
Forgot to mention that we also send the following compiler flags:
-cl-single-precision-constant -cl-fast-relaxed-math
Nope, that's not tripping it up either...
Ok, I found it. This was fixed by https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9464. I'll see about pushing out a new application package with that fix.
A new 0.2104.2.0 package should be live any minute now. Please close the issue if that resolves it for you, and continue to report any further issues you find.
A new 0.2104.2.0 package should be live any minute now. Please close the issue if that resolves it for you, and continue to report any further issues you find.
I've just updated to 0.2104.2.0 and I can confirm that I'm no longer hitting the DebugBreak
(and release builds are no longer crashing).
I have the latest store version installed at the time of writing (version 0.2102.8.0), and when I make use of the OpenCLOn12 provider, I encounter
wil::details::DebugBreak
during debug sessions.e.g. here is a call to
clBuildProgram
(the call itself succeeds):Then after that, a non-application thread continually asserts: