-
Notifications
You must be signed in to change notification settings - Fork 745
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
[SYCL] add device_type to SYCL_PI_TRACE and device_selector exception #6896
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thank you!
I have only few minor comments.
bool ShouldTrace = false; | ||
ShouldTrace = detail::pi::trace(detail::pi::TraceLevel::PI_TRACE_BASIC); | ||
if (ShouldTrace) { | ||
std::cout << "SYCL_PI_TRACE[all]: Requested device_type: " << DeviceType << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you query for PI_TRACE_BASIC in L159, shouldn't this message start with "SYCL_PI_TRACE[basic]"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case it's not aligned with other device selector information that started with SYCL_PI_TRACE[all]
but it is also printed as basic information in case of successful device initialization. So I did it in the same style for better readability.
SYCL_PI_TRACE[all]: Selected device: -> final score = 1000
SYCL_PI_TRACE[all]: platform: Intel(R) OpenCL
SYCL_PI_TRACE[all]: device: Intel(R) Xeon(R) Gold 6354 CPU @ 3.00GHz
The test "SYCL/Config/select_device.cpp" failed in some CIs, which was expected. Proceeding to merge now. |
We build the whole project with -fno-semantic-interposition by default and it gets miscompiled by clang after intel#6896. It's not yet clear if this would be a permanent fix or if there is a bug in clang. The issue is being tracked at llvm/llvm-project#58295.
We build the whole project with `-fno-semantic-interposition` by default and it gets miscompiled by clang after #6896. It's not yet clear if this would be a permanent fix or if there is a bug in clang. The issue is being tracked at llvm/llvm-project#58295.
Device selector exception message and SYCL_PI_TRACE are extended with device type info for better debuggability in case of missed device in application that works with multiple devices.
Current exception message:
Example of the current output from SYCL_PI_TRACE:
New exception message:
Example of SYCL_PI_TRACE output with extra line about requested device_type: