-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Make device id unique per backend #3611
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
Conversation
By adding the device_type into each device prefix listing in sycl-ls, the user can easily set SYCL_DEVICE_FILTER correctly. Signed-off-by: Byoungro So <[email protected]>
[Before]
[After]
|
Signed-off-by: Byoungro So <[email protected]>
Signed-off-by: Byoungro So <[email protected]>
Signed-off-by: Byoungro So <[email protected]>
Signed-off-by: Byoungro So <[email protected]>
Signed-off-by: Byoungro So <[email protected]>
Co-authored-by: vladimirlaz <[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.
More issues for the new changes
Co-authored-by: smaslov-intel <[email protected]>
Signed-off-by: Byoungro So <[email protected]>
Signed-off-by: Byoungro So <[email protected]>
Signed-off-by: Byoungro So <[email protected]>
Signed-off-by: Byoungro So <[email protected]>
Signed-off-by: Byoungro So <[email protected]>
Signed-off-by: Byoungro So <[email protected]>
Co-authored-by: Romanov Vlad <[email protected]>
Co-authored-by: Romanov Vlad <[email protected]>
Signed-off-by: Byoungro So <[email protected]>
@smaslov-intel |
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.
Please add test for new indexing (per backend, not per platform).
Here is an example of the current output of sycl-ls. [opencl:cpu:0] : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz 2.1 [2021.12.6.0.19_160000] [opencl:acc:1] : Intel(R) FPGA Emulation Device 1.2 [2021.12.6.0.19_160000] [opencl:gpu:2] : Intel(R) UHD Graphics 630 [0x3e92] 3.0 [21.19.19792] [level_zero:gpu:0] : Intel(R) UHD Graphics 630 [0x3e92] 1.1 [1.1.19792] [host:host:0] : SYCL host device 1.2 [1.2] It is hard to add a test that checks the device id because a device id changes in different systems. |
I suggest you check generally that there are no duplicate entries in the [ID] output of sycl-ls. |
Signed-off-by: Byoungro So <[email protected]>
19de5f4
@smaslov-intel , |
|
||
// RUN: env SYCL_DEVICE_FILTER=level_zero sycl-ls | FileCheck %s --check-prefixes=CHECK-OPENCL | ||
|
||
// CHECK-OPENCL-COUNT-1: [level_zero:{{.*}}:0] |
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 how this check works?
Also, could you please move tests that require low-level runtime to llvm-test-suite?
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 // ***-COUNT-# directive only matches the given pattern only # times. In this case, we try to match only once.
I will move these tests to llvm-test-suite.
I wanted to confirm these tests with my PR changeset.
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.
So, this check verifies that the tool prints a Level Zero device with id 0
if Level Zero is available, right?
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.
Yes, it verifies that the given pattern (level_zero with device id 0) should be exactly matched once.
For example, if sycl-ls prints [level_zero:cpu:0]
and [level_zero:gpu:0]
, this test will fail.
Signed-off-by: Byoungro So <[email protected]>
Please DO NOT MERGE this PR. |
Looks like similar patch is uploaded to another pull request - #4247. |
@bader , |
In intel/llvm#3611, I changed the device type to lower case which was necessary to show the SYCL_DEVICE_FILTER prefix for each device listing from sycl-ls. It caused several tests failures that expected 'GPU' instead of 'gpu'.
@bso-intel, can we close this PR? |
@bader Yes, I will close this PR. |
…st-suite#256) In intel#3611, I changed the device type to lower case which was necessary to show the SYCL_DEVICE_FILTER prefix for each device listing from sycl-ls. It caused several tests failures that expected 'GPU' instead of 'gpu'.
We decided to make device id numbers unique per backend.
Also, by adding the device_type into each device prefix listing in sycl-ls,
the user can easily set SYCL_DEVICE_FILTER correctly.
Signed-off-by: Byoungro So [email protected]