-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL][L0] Fix absence of zeInit in Level Zero LIT e2e tests #18956
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
base: sycl
Are you sure you want to change the base?
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.
LGTM, just replace return 1
in interop-thread with assert or something like that
// statically with Level Zero loader, the driver will not be init otherwise. | ||
ze_result_t result = zeInit(ZE_INIT_FLAG_GPU_ONLY); | ||
if (result != ZE_RESULT_SUCCESS) { | ||
std::cout << "zeInit failed\n"; |
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.
This test use asserts, so to align with it:
std::cout << "zeInit failed\n"; | |
assert((result == ZE_RESULT_SUCCESS) && "zeInit failed"); |
if (result != ZE_RESULT_SUCCESS) { | ||
std::cout << "zeInit failed\n"; |
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.
Better to use assert
here as it is already used in this test
ze_result_t result = zeInit(ZE_INIT_FLAG_GPU_ONLY); | ||
if (result != ZE_RESULT_SUCCESS) { | ||
std::cout << "zeInit failed\n"; | ||
return 1; |
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.
+ some small enhancement here and below:
return 1; | |
return result; |
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.
ZE_RESULT_SUCCESS is not equal to test's success return code. May be in current implementation both of them are equal 0, but not in general.
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.
Maybe print this result
value to output for the future easier debugging session, or return it in other way?
) <!-- start git-machete generated --> # Based on PR #18956 ## Tree of downstream PRs as of 2025-06-25 * **PR #19130 (THIS ONE)** * PR #19131 * PR #19134 * PR #19135 * PR #19136 <!-- end git-machete generated --> In the next commits I'd like to refactor and fix SYCL libspirv linking. This adds a few tests to cover the current behavior. Some of it is buggy, and not consistent between NVPTX and AMDGPU, it will be improved in the next commits.
No description provided.