-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] Remove duplicate devices on submission to kernel_bundle API functions #4790
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] Remove duplicate devices on submission to kernel_bundle API functions #4790
Conversation
…pec states that the compilation is for each unique device, duplicate devices removed. Here we ensure that the devices sent to the backend are each unique. Also, LevelZero doesn't support compilation for more than one device but it calls die() presently. Changing that as wel. Testss coming shortly. Signed-off-by: Chris Perkins <[email protected]>
…o filter out duplicate devices Signed-off-by: Chris Perkins <[email protected]>
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.
Is it possible to have a unit-test for this change?
if (NumDevices != 1) | ||
die("piProgramCreateWithBinary: level_zero supports only one device."); | ||
if (NumDevices != 1) { | ||
zePrint("piProgramCreateWithBinary: level_zero supports only one device."); |
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.
Could you please clarify why it is not ok to use "die" here.
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.
It's mostly a matter of getting the devices to behave similarly. Right now, only the OpenCL GPU device supports compilation for multiple unique devices. All the other non-supporting devices throw exceptions when asked ... except LevelZero which dies.
@s-kanaev |
…d of device and b) use the private function dev.getNative() to ensure that device comparisons are unique Signed-off-by: Chris Perkins <[email protected]>
ping to reviewers. |
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.
RT changes LGTM
When submitting devices to ::compile(), ::link(), ::build() and get_kernel_bundle(), section 4.11.7 of the SYCL 2020 spec states that the compilation is for each unique device, duplicate devices removed. Here we ensure that the devices sent to the backend are each unique. Also, LevelZero doesn't support compilation for more than one device but it calls
die()
presently. Changing that as well. Tests at intel/llvm-test-suite#527Here the test PR is run against this PR (successfully): http://icl-jenkins.sc.intel.com:8080/job/SYCL_CI/job/intel/job/Lin/job/LLVM_Test_Suite/7703/
Signed-off-by: Chris Perkins [email protected]