|
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", |
| 99 | + "ZE_AFFINITY_MASK", |
96 | 100 | ] |
97 | 101 |
|
98 | 102 | # Names of the Release and Debug versions of the XPTIFW library |
@@ -953,9 +957,8 @@ def get_sycl_ls_verbose(sycl_device, env): |
953 | 957 | for sycl_device in remove_level_zero_suffix(config.sycl_devices): |
954 | 958 | be, dev = sycl_device.split(":") |
955 | 959 | if be == "level_zero" and dev.isdigit(): |
956 | | - if config.ze_affinity_mask is None: |
957 | | - config.ze_affinity_mask = dev |
958 | | - break |
| 960 | + config.ze_affinity_mask = dev |
| 961 | + break |
959 | 962 |
|
960 | 963 | for sycl_device in remove_level_zero_suffix(config.sycl_devices): |
961 | 964 | be, dev = sycl_device.split(":") |
@@ -1066,6 +1069,10 @@ def get_sycl_ls_verbose(sycl_device, env): |
1066 | 1069 | # Compute intersection of aspects. |
1067 | 1070 | aspects = set(dev_aspects[0]).intersection(*dev_aspects) |
1068 | 1071 | lit_config.note("Aspects for {}: {}".format(sycl_device, ", ".join(aspects))) |
| 1072 | + lit_config.note("Len of dev_aspects for {}: {}".format(sycl_device, len(dev_aspects))) |
| 1073 | + |
| 1074 | + for i in range(len(dev_aspects)): |
| 1075 | + lit_config.note("DevAsp{} for {}: {}".format(i, sycl_device, ", ".join(dev_aspects[i]))) |
1069 | 1076 |
|
1070 | 1077 | if dev_sg_sizes == []: |
1071 | 1078 | lit_config.error( |
@@ -1121,9 +1128,15 @@ def get_sycl_ls_verbose(sycl_device, env): |
1121 | 1128 | features.update(sg_size_features) |
1122 | 1129 | features.update(architecture_feature) |
1123 | 1130 | features.update(device_family) |
1124 | | - features.update(aspects) |
1125 | 1131 |
|
1126 | 1132 | be, dev = sycl_device.split(":") |
| 1133 | + if dev.isdigit(): |
| 1134 | + backend_devices = available_devices.get(be, "gpu") |
| 1135 | + if isinstance(backend_devices, tuple): |
| 1136 | + # arch-selection is typically used to select gpu device |
| 1137 | + dev = "gpu" |
| 1138 | + else: |
| 1139 | + dev = backend_devices |
1127 | 1140 | features.add(dev.replace("fpga", "accelerator")) |
1128 | 1141 | if "level_zero_v2" in full_name: |
1129 | 1142 | features.add("level_zero_v2_adapter") |
|
0 commit comments