-
Notifications
You must be signed in to change notification settings - Fork 808
[SYCL][E2E] Fix lit to use arch selection and l0 v2 adapter #20839
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
Changes from 6 commits
9288866
8e2f046
a1f5651
0edc162
b20e3d3
bfcf4b0
dbf40c7
9be5f11
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -917,12 +917,14 @@ def get_sycl_ls_verbose(sycl_device, env): | |
|
|
||
| env = copy.copy(llvm_config.config.environment) | ||
|
|
||
| backend_for_selector = backend.replace("_v2", "").replace("_v1", "") | ||
|
|
||
| # Find all available devices under the backend | ||
| env["ONEAPI_DEVICE_SELECTOR"] = backend + ":*" | ||
| env["ONEAPI_DEVICE_SELECTOR"] = backend_for_selector + ":*" | ||
|
|
||
| detected_architectures = [] | ||
|
|
||
| platform_devices = remove_level_zero_suffix(backend + ":*") | ||
| platform_devices = backend_for_selector + ":*" | ||
|
|
||
| for line in get_sycl_ls_verbose(platform_devices, env).stdout.splitlines(): | ||
| if re.match(r" *Architecture:", line): | ||
|
|
@@ -1114,6 +1116,13 @@ def get_sycl_ls_verbose(sycl_device, env): | |
| features.update(device_family) | ||
|
|
||
| be, dev = sycl_device.split(":") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i would expect
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By the time we hit |
||
| if dev.isdigit(): | ||
| backend_devices = available_devices.get(be, "gpu") | ||
| if isinstance(backend_devices, tuple): | ||
| # arch-selection is typically used to select gpu device | ||
| dev = "gpu" | ||
| else: | ||
| dev = backend_devices | ||
| features.add(dev.replace("fpga", "accelerator")) | ||
| if "level_zero_v2" in full_name: | ||
| features.add("level_zero_v2_adapter") | ||
|
|
||
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.
sorry can you point out which part fixes the CI failures?
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.
When a device is specified as :arch-, it doesn't contain generic :gpu or :cpu - and the tokens were normally used when parsing conditions like
%if gpuin tests. Now, if onlygpuexist in test.config.available_features, tests still can use%if gpu.After reconsidering - architecture-based device selection makes sense only for GPUs, so "cpu" and "accelerator" will never be used and can be removed (they will work as before if
device name is like
opencl:cpu)