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

Debug.Assert is not take effect on opencl #1049

Open
tianmafly opened this issue Aug 20, 2023 · 4 comments
Open

Debug.Assert is not take effect on opencl #1049

tianmafly opened this issue Aug 20, 2023 · 4 comments

Comments

@tianmafly
Copy link

tianmafly commented Aug 20, 2023

There are no discrete graphics. The integrated graphics is Intel(R) UHD Graphics. The Debug.Assert take effect when use the cpu accelerator. But the Debug.Asset take no effect when use the opencl accelerator. Is something wrong? thanks.

image
image

@m4rs-mt
Copy link
Owner

m4rs-mt commented Aug 21, 2023

Hi @tianmafly, welcome to the ILGPU community. Thank your for submitting this issue. Indeed, the OpenCL accelerator does not support debug assertions and interop output, in general. You can still verify your algorithms using the CPU accelerator by choosing the appropriate virtual device configuration to match your target accelerators. However, we consider supporting those functions in one of the next releases.

@tianmafly
Copy link
Author

tianmafly commented Aug 22, 2023

Hi @tianmafly, welcome to the ILGPU community. Thank your for submitting this issue. Indeed, the OpenCL accelerator does not support debug assertions and interop output. You can still verify your algorithms using the CPU accelerator by choosing the appropriate virtual device configuration to match your target accelerators. However, we consider supporting those functions in one of the next releases.

thank you. But I find this. Does it mean that Debug.Assert can be used with gpu of Opencl?
https://ilgpu.net/docs/03-advanced/06-debugging-and-profiling/
image
And the interop output of OpenCL is effective,but it has no line breaks.
image

@m4rs-mt
Copy link
Owner

m4rs-mt commented Aug 23, 2023

Thanks for your response regarding this topic. It's important to be precise when discussing the implications of supporting certain aspects. ILGPU lowers the Interop.WriteLine instructions by leveraging the printf function exposed within OpenCL shader API. However, some drivers may not properly support the printf function, resulting in no visible output on the command line or poorly formatted strings appearing on the screen.

Regarding Debug.Assert instructions, it's important to note that ILGPU does not lower these instructions to any counterpart on the OpenCL side due to a lack of proper support for such operations at this time. To ensure clarity and accuracy within our documentation, we should explicitly mention that debug assertions are currently unsupported in OpenCL contexts.

@NullandKale we should properly adapt the documentation to explicitly mention that debug assertions are not supported on OpenCL at the moment.
@kilngod @Yey007 Any idea on how we can support debug assertions on Vulkan?

@Yey007
Copy link
Contributor

Yey007 commented Sep 4, 2023

@m4rs-mt, hi, just saw this. I'm not sure right off the bat but I'll try to get back to you with something soon.

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

No branches or pull requests

3 participants