|
173 | 173 | if lit_config.params.get("igc-dev", False): |
174 | 174 | config.available_features.add("igc-dev") |
175 | 175 |
|
176 | | -# Map between architecture types and device name. |
177 | | -device_name_arch_map = { |
178 | | - # <Device name> : Set of architectures types (and aliases) |
179 | | - # DG1 |
180 | | - "gpu-intel-dg1": {"intel_gpu_dg1"}, |
| 176 | +# Map between device family and architecture types. |
| 177 | +device_family_arch_map = { |
| 178 | + # <Family name> : Set of architectures types (and aliases) |
181 | 179 | # DG2 |
182 | 180 | "gpu-intel-dg2": { |
183 | 181 | "intel_gpu_acm_g12", |
|
193 | 191 | "gpu-intel-gen11": {"intel_gpu_icllp", "intel_gpu_icl"}, |
194 | 192 | } |
195 | 193 |
|
196 | | - |
197 | | -def get_device_name_from_arch(arch): |
198 | | - for device_name, arch_set in device_name_arch_map.items(): |
| 194 | +def get_device_family_from_arch(arch): |
| 195 | + for device_family, arch_set in device_family_arch_map.items(): |
199 | 196 | if arch in arch_set: |
200 | | - return device_name |
| 197 | + return device_family |
201 | 198 | return None |
202 | 199 |
|
203 | 200 | def check_igc_tag_and_add_feature(): |
@@ -795,27 +792,27 @@ def open_check_file(file_name): |
795 | 792 | aspect_features = set("aspect-" + a for a in aspects) |
796 | 793 | sg_size_features = set("sg-" + s for s in sg_sizes) |
797 | 794 | architecture_feature = set("arch-" + s for s in architectures) |
798 | | - # Add device name features like intel-gpu-gen12, intel-gpu-dg2 based on |
| 795 | + # Add device family features like intel-gpu-gen12, intel-gpu-dg2 based on |
799 | 796 | # the architecture reported by sycl-ls. |
800 | | - device_names = set( |
801 | | - get_device_name_from_arch(arch) |
| 797 | + device_family = set( |
| 798 | + get_device_family_from_arch(arch) |
802 | 799 | for arch in architectures |
803 | | - if get_device_name_from_arch(arch) is not None |
| 800 | + if get_device_family_from_arch(arch) is not None |
804 | 801 | ) |
805 | 802 |
|
806 | 803 | # Print the detected GPU family name. |
807 | | - if len(device_names) > 0: |
| 804 | + if len(device_family) > 0: |
808 | 805 | lit_config.note( |
809 | 806 | "Detected GPU family for {}: {}".format( |
810 | | - sycl_device, ", ".join(device_names) |
| 807 | + sycl_device, ", ".join(device_family) |
811 | 808 | ) |
812 | 809 | ) |
813 | 810 |
|
814 | 811 | features = set() |
815 | 812 | features.update(aspect_features) |
816 | 813 | features.update(sg_size_features) |
817 | 814 | features.update(architecture_feature) |
818 | | - features.update(device_names) |
| 815 | + features.update(device_family) |
819 | 816 |
|
820 | 817 | be, dev = sycl_device.split(":") |
821 | 818 | features.add(dev.replace("fpga", "accelerator")) |
|
0 commit comments