|
9 | 9 | import shlex |
10 | 10 | import shutil |
11 | 11 |
|
| 12 | +import lit.formats |
| 13 | +import lit.util |
| 14 | + |
12 | 15 | from lit.llvm import llvm_config |
13 | 16 | from lit.llvm.subst import ToolSubst, FindTool |
14 | 17 |
|
|
93 | 96 | "LIBCLANG_NOTHREADS", |
94 | 97 | "LIBCLANG_RESOURCE_USAGE", |
95 | 98 | "LIBCLANG_CODE_COMPLETION_LOGGING", |
96 | | -] |
| 99 | + "ZE_AFFINITY_MASK",git tr |
97 | 100 |
|
98 | 101 | # Names of the Release and Debug versions of the XPTIFW library |
99 | 102 | XPTIFW_RELEASE = "xptifw" |
@@ -953,9 +956,8 @@ def get_sycl_ls_verbose(sycl_device, env): |
953 | 956 | for sycl_device in remove_level_zero_suffix(config.sycl_devices): |
954 | 957 | be, dev = sycl_device.split(":") |
955 | 958 | if be == "level_zero" and dev.isdigit(): |
956 | | - if config.ze_affinity_mask is None: |
957 | | - config.ze_affinity_mask = dev |
958 | | - break |
| 959 | + config.ze_affinity_mask = dev |
| 960 | + break |
959 | 961 |
|
960 | 962 | for sycl_device in remove_level_zero_suffix(config.sycl_devices): |
961 | 963 | be, dev = sycl_device.split(":") |
@@ -1121,9 +1123,15 @@ def get_sycl_ls_verbose(sycl_device, env): |
1121 | 1123 | features.update(sg_size_features) |
1122 | 1124 | features.update(architecture_feature) |
1123 | 1125 | features.update(device_family) |
1124 | | - features.update(aspects) |
1125 | 1126 |
|
1126 | 1127 | be, dev = sycl_device.split(":") |
| 1128 | + if dev.isdigit(): |
| 1129 | + backend_devices = available_devices.get(be, "gpu") |
| 1130 | + if isinstance(backend_devices, tuple): |
| 1131 | + # arch-selection is typically used to select gpu device |
| 1132 | + dev = "gpu" |
| 1133 | + else: |
| 1134 | + dev = backend_devices |
1127 | 1135 | features.add(dev.replace("fpga", "accelerator")) |
1128 | 1136 | if "level_zero_v2" in full_name: |
1129 | 1137 | features.add("level_zero_v2_adapter") |
|
0 commit comments