-
Notifications
You must be signed in to change notification settings - Fork 738
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
Exception raised when trying print float values on A770 #12880
Comments
Hi @DDEle,
This is true for OpenCL C compiler, but not for SYCL, i.e. C++ compiler. One of the functions we use under the hood is defined as variadic and passing all floating-points as llvm/sycl/include/CL/__spirv/spirv_ops.hpp Lines 1186 to 1198 in 5ec9cce
I would suggest you to define |
Thank you @AlexeySachkov for your timely detailed reply. I can confirm that your workaround of |
We made updates to the macro to use non-variadic path by default in #13055. Therefore, closing this as fixed, no extra macro should be set anymore to make the example work. Please let us know if you run into any issues |
Describe the bug
I was trying to print some floating-point values from device kernel using
sycl::ext::oneapi::experimental::printf
. The following error will be raised then I trying to do this on a A770. (But it works fine on the Intel(R) UHD Graphics 630).A minimal cast of
test_printf.cpp
could be as below:To reproduce
Steps to reproduce are described in the previous section.
Environment
OS: Ubuntu 22.04 with 6.7.2-060702-generic (Also tried on 5.19 but the case also failed on that)
Target: Intel GPU
DPCPP version:
sycl-ls --verbose
Additional context
In the header file of
sycl::ext::oneapi::experimental::printf
, it says that it is implemented according to theprintf
of The OpenCL™ C Specification, where it says:The text was updated successfully, but these errors were encountered: