Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sycl/test-e2e/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ def get_extra_env(sycl_devices):
"linux",
"windows",
"preview-breaking-changes-supported",
"gpu",
]:
if cond_features in test.config.available_features:
conditions[cond_features] = True
Expand Down
13 changes: 11 additions & 2 deletions sycl/test-e2e/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -1114,6 +1116,13 @@ def get_sycl_ls_verbose(sycl_device, env):
features.update(device_family)

be, dev = sycl_device.split(":")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would expect dev to be arch-intel_gpu_mtl_u or whatever, but i see isdigit check so what would the digits be?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the time we hit features.add(dev) sycl_device is already resolved SYCL name, eg. level_zero:1, not level_zero_v2:arch-intel_gpu. If the device name is given as :arch-, we have digit after colon, if it was generic (eg. :gpu) it is still generic.

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")
Expand Down
Loading