Skip to content

Commit 8df071f

Browse files
committed
Automatically add device name feature from architecture reported by sycl-ls
1 parent 814290d commit 8df071f

File tree

4 files changed

+27
-9
lines changed

4 files changed

+27
-9
lines changed

.github/workflows/sycl-linux-precommit.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,22 +92,21 @@ jobs:
9292
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
9393
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
9494
reset_intel_gpu: true
95-
extra_lit_opts: --param gpu-intel-gen12=True
9695
- name: E2E tests on Intel Arc A-Series Graphics
9796
runner: '["Linux", "arc"]'
9897
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
9998
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
10099
target_devices: level_zero:gpu;opencl:gpu
101100
reset_intel_gpu: true
102-
extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True
101+
extra_lit_opts: --param matrix-xmx8=True
103102
env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }'
104103
- name: E2E tests with dev igc on Intel Arc A-Series Graphics
105104
runner: '["Linux", "arc"]'
106105
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:devigc
107106
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
108107
target_devices: level_zero:gpu;opencl:gpu
109108
reset_intel_gpu: true
110-
extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True
109+
extra_lit_opts: --param matrix-xmx8=True
111110
env: '{"LIT_FILTER":${{ needs.determine_arc_tests.outputs.arc_tests }} }'
112111
use_igc_dev: true
113112

.github/workflows/sycl-nightly.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ jobs:
5757
target_devices: level_zero:gpu
5858
reset_intel_gpu: true
5959
tests_selector: e2e
60-
extra_lit_opts: --param gpu-intel-gen12=True
6160

6261
- name: Intel OCL GPU
6362
runner: '["Linux", "gen12"]'
@@ -66,7 +65,6 @@ jobs:
6665
target_devices: opencl:gpu
6766
reset_intel_gpu: true
6867
tests_selector: e2e
69-
extra_lit_opts: --param gpu-intel-gen12=True
7068

7169
- name: OCL CPU (AMD)
7270
runner: '["Linux", "amdgpu"]'
@@ -139,7 +137,6 @@ jobs:
139137
name: Intel GEN12 Graphics with Level Zero
140138
runner: '["Windows","gen12"]'
141139
sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }}
142-
extra_lit_opts: --param gpu-intel-gen12=True
143140

144141
cuda-aws-start:
145142
needs: [ubuntu2204_build]

.github/workflows/sycl-post-commit.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
reset_intel_gpu: true
5757
- name: Intel Arc A-Series Graphics with Level Zero
5858
runner: '["Linux", "arc"]'
59-
extra_lit_opts: --param matrix-xmx8=True --param gpu-intel-dg2=True
59+
extra_lit_opts: --param matrix-xmx8=True
6060
reset_intel_gpu: true
6161
- name: AMD/HIP
6262
runner: '["Linux", "amdgpu"]'
@@ -73,7 +73,7 @@ jobs:
7373
- name: Perf tests on Intel GEN12 Graphics system
7474
runner: '["Linux", "gen12"]'
7575
env: '{"LIT_FILTER":"PerformanceTests/"}'
76-
extra_lit_opts: -a -j 1 --param enable-perf-tests=True --param gpu-intel-gen12=True
76+
extra_lit_opts: -a -j 1 --param enable-perf-tests=True
7777
target_devices: all
7878
reset_intel_gpu: true
7979
- name: Perf tests on Intel Arc A-Series Graphics system
@@ -120,7 +120,6 @@ jobs:
120120
name: Intel GEN12 Graphics with Level Zero
121121
runner: '["Windows","gen12"]'
122122
sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }}
123-
extra_lit_opts: --param gpu-intel-gen12=True
124123

125124
macos_default:
126125
name: macOS

sycl/test-e2e/lit.cfg.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,25 @@
173173
if lit_config.params.get("igc-dev", False):
174174
config.available_features.add("igc-dev")
175175

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"},
181+
# DG2
182+
"gpu-intel-dg2" : {"intel_gpu_acm_g12","intel_gpu_dg2_g12","intel_gpu_acm_g11","intel_gpu_dg2_g11","intel_gpu_acm_g10","intel_gpu_dg2_g10"},
183+
# Gen12
184+
"gpu-intel-gen12" : {"intel_gpu_tgllp","intel_gpu_tgl"},
185+
# Gen11
186+
"gpu-intel-gen11" : {"intel_gpu_icllp","intel_gpu_icl"},
187+
}
188+
189+
def get_device_name_from_arch(arch):
190+
for device_name, arch_set in device_name_arch_map.items():
191+
if arch in arch_set:
192+
return device_name
193+
return None
194+
176195
def check_igc_tag_and_add_feature():
177196
if os.path.isfile(config.igc_tag_file):
178197
with open(config.igc_tag_file, "r") as tag_file:
@@ -768,10 +787,14 @@ def open_check_file(file_name):
768787
aspect_features = set("aspect-" + a for a in aspects)
769788
sg_size_features = set("sg-" + s for s in sg_sizes)
770789
architecture_feature = set("arch-" + s for s in architectures)
790+
# Add device name features like intel-gpu-gen12, intel-gpu-dg2 based on
791+
# the architecture reported by sycl-ls.
792+
device_names = set(get_device_name_from_arch(arch) for arch in architectures if get_device_name_from_arch(arch) is not None)
771793
features = set()
772794
features.update(aspect_features)
773795
features.update(sg_size_features)
774796
features.update(architecture_feature)
797+
features.update(device_names)
775798

776799
be, dev = sycl_device.split(":")
777800
features.add(dev.replace("fpga", "accelerator"))

0 commit comments

Comments
 (0)