Skip to content

Commit 154104f

Browse files
Add options to test on L0v2
1 parent 1c2f03d commit 154104f

File tree

4 files changed

+94
-79
lines changed

4 files changed

+94
-79
lines changed

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

Lines changed: 79 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -151,44 +151,48 @@ jobs:
151151
fail-fast: false
152152
matrix:
153153
include:
154-
- name: Intel / GEN 12 Integrated
155-
runner: '["Linux", "gen12"]'
156-
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
157-
- name: NVIDIA/CUDA
158-
runner: '["Linux", "cuda"]'
159-
image_options: -u 1001 --gpus all --cap-add SYS_ADMIN
160-
target_devices: cuda:gpu
161-
- name: AMD/HIP
162-
runner: '["Linux", "amdgpu"]'
163-
image_options: -u 1001 --device=/dev/dri --device=/dev/kfd
164-
target_devices: hip:gpu
165-
extra_lit_opts: -j 1
166-
- name: Intel / Arc A-Series Graphics
167-
runner: '["Linux", "arc"]'
168-
target_devices: level_zero:gpu;opencl:gpu;level_zero_v2:gpu
169-
- name: Intel Dev IGC / Arc A-Series Graphics
170-
runner: '["Linux", "arc"]'
171-
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:devigc
172-
target_devices: level_zero:gpu
173-
use_igc_dev: true
174-
env: '{"LIT_FILTER":"Matrix/"}'
175-
- name: Intel / Ponte Vecchio GPU
176-
runner: '["Linux", "pvc"]'
177-
target_devices: level_zero:gpu;opencl:gpu;level_zero_v2:gpu
178-
- name: Intel Dev IGC / Ponte Vecchio GPU
179-
runner: '["Linux", "pvc"]'
180-
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:devigc
181-
target_devices: level_zero:gpu
182-
use_igc_dev: true
183-
env: '{"LIT_FILTER":"Matrix/"}'
184-
- name: Intel / Battlemage Graphics
154+
# - name: Intel / GEN 12 Integrated
155+
# runner: '["Linux", "gen12"]'
156+
# target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
157+
# - name: NVIDIA/CUDA
158+
# runner: '["Linux", "cuda"]'
159+
# image_options: -u 1001 --gpus all --cap-add SYS_ADMIN
160+
# target_devices: cuda:gpu
161+
# - name: AMD/HIP
162+
# runner: '["Linux", "amdgpu"]'
163+
# image_options: -u 1001 --device=/dev/dri --device=/dev/kfd
164+
# target_devices: hip:gpu
165+
# extra_lit_opts: -j 1
166+
# - name: Intel / Arc A-Series Graphics
167+
# runner: '["Linux", "arc"]'
168+
# target_devices: level_zero:gpu;opencl:gpu;level_zero_v2:gpu
169+
# - name: Intel Dev IGC / Arc A-Series Graphics
170+
# runner: '["Linux", "arc"]'
171+
# image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:devigc
172+
# target_devices: level_zero:gpu
173+
# use_igc_dev: true
174+
# env: '{"LIT_FILTER":"Matrix/"}'
175+
# - name: Intel / Ponte Vecchio GPU
176+
# runner: '["Linux", "pvc"]'
177+
# target_devices: level_zero:gpu;opencl:gpu;level_zero_v2:gpu
178+
# - name: Intel Dev IGC / Ponte Vecchio GPU
179+
# runner: '["Linux", "pvc"]'
180+
# image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:devigc
181+
# target_devices: level_zero:gpu
182+
# use_igc_dev: true
183+
# env: '{"LIT_FILTER":"Matrix/"}'
184+
# - name: Intel / Battlemage Graphics
185+
# runner: '["Linux", "bmg"]'
186+
# target_devices: level_zero_v1:gpu;level_zero_v2:gpu
187+
# - name: Preview Mode
188+
# runner: '["Linux", "gen12"]'
189+
# target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
190+
# extra_lit_opts: --param test-preview-mode=True
191+
# binaries_artifact: e2e_bin_preview
192+
- name: L0 v2
185193
runner: '["Linux", "bmg"]'
186-
target_devices: level_zero_v1:gpu;level_zero_v2:gpu
187-
- name: Preview Mode
188-
runner: '["Linux", "gen12"]'
189-
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
190-
extra_lit_opts: --param test-preview-mode=True
191-
binaries_artifact: e2e_bin_preview
194+
# runner: '["Linux", "L0v2"]'
195+
target_devices: level_zero_v2:arch-intel_gpu_mtl_u
192196

193197
# We're in an ABI-breaking window, so these don't make sense for now.
194198
- name: ABI compatibility / sycl-rel-6_2
@@ -236,44 +240,44 @@ jobs:
236240
skip_run: ${{matrix.use_igc_dev && contains(github.event.pull_request.labels.*.name, 'ci-no-devigc') || matrix.skip_run || 'false'}}
237241
env: ${{ matrix.env || (contains(needs.detect_changes.outputs.filters, 'esimd') && '{}' || '{"LIT_FILTER_OUT":"ESIMD/"}') }}
238242

239-
test-perf:
240-
needs: [build, detect_changes]
241-
permissions:
242-
contents: write
243-
packages: read
244-
if: |
245-
!cancelled()
246-
&& needs.build.outputs.build_conclusion == 'success'
247-
&& (contains(github.event.pull_request.labels.*.name, 'run-perf-tests')
248-
|| contains(needs.detect_changes.outputs.filters, 'perf-tests'))
249-
strategy:
250-
fail-fast: false
251-
matrix:
252-
include:
253-
- name: Intel GEN12 Graphics system
254-
runner: '["Linux", "gen12"]'
255-
image_extra_opts: --device=/dev/dri
256-
- name: Intel Arc A-Series Graphics system
257-
runner: '["Linux", "arc"]'
258-
image_extra_opts: --device=/dev/dri
259-
- name: AMD system
260-
runner: '["Linux", "amdgpu"]'
261-
image_extra_opts: --device=/dev/dri --device=/dev/kfd
262-
- name: CUDA system
263-
runner: '["Linux", "cuda"]'
264-
image_extra_opts: --gpus all
265-
uses: ./.github/workflows/sycl-linux-run-tests.yml
266-
with:
267-
name: Perf tests on ${{ matrix.name }}
268-
runner: ${{ matrix. runner }}
269-
image_options: -u 1001 --privileged --cap-add SYS_ADMIN ${{ matrix.image_extra_opts }}
270-
target_devices: all
243+
# test-perf:
244+
# needs: [build, detect_changes]
245+
# permissions:
246+
# contents: write
247+
# packages: read
248+
# if: |
249+
# !cancelled()
250+
# && needs.build.outputs.build_conclusion == 'success'
251+
# && (contains(github.event.pull_request.labels.*.name, 'run-perf-tests')
252+
# || contains(needs.detect_changes.outputs.filters, 'perf-tests'))
253+
# strategy:
254+
# fail-fast: false
255+
# matrix:
256+
# include:
257+
# - name: Intel GEN12 Graphics system
258+
# runner: '["Linux", "gen12"]'
259+
# image_extra_opts: --device=/dev/dri
260+
# - name: Intel Arc A-Series Graphics system
261+
# runner: '["Linux", "arc"]'
262+
# image_extra_opts: --device=/dev/dri
263+
# - name: AMD system
264+
# runner: '["Linux", "amdgpu"]'
265+
# image_extra_opts: --device=/dev/dri --device=/dev/kfd
266+
# - name: CUDA system
267+
# runner: '["Linux", "cuda"]'
268+
# image_extra_opts: --gpus all
269+
# uses: ./.github/workflows/sycl-linux-run-tests.yml
270+
# with:
271+
# name: Perf tests on ${{ matrix.name }}
272+
# runner: ${{ matrix. runner }}
273+
# image_options: -u 1001 --privileged --cap-add SYS_ADMIN ${{ matrix.image_extra_opts }}
274+
# target_devices: all
271275

272-
env: '{"LIT_FILTER":"PerformanceTests/"}'
273-
extra_lit_opts: -a -j 1 --param enable-perf-tests=True
276+
# env: '{"LIT_FILTER":"PerformanceTests/"}'
277+
# extra_lit_opts: -a -j 1 --param enable-perf-tests=True
274278

275-
repo_ref: ${{ github.sha }}
279+
# repo_ref: ${{ github.sha }}
276280

277-
toolchain_artifact: ${{ needs.build.outputs.toolchain_artifact }}
278-
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }}
279-
toolchain_decompress_command: ${{ needs.build.outputs.toolchain_decompress_command }}
281+
# toolchain_artifact: ${{ needs.build.outputs.toolchain_artifact }}
282+
# toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }}
283+
# toolchain_decompress_command: ${{ needs.build.outputs.toolchain_decompress_command }}

.github/workflows/sycl-linux-run-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ on:
158158
- '["Linux", "build"]'
159159
- '["cuda"]'
160160
- '["PVC_PERF"]'
161+
- '["Linux", "L0v2"]'
161162
image:
162163
type: choice
163164
options:
@@ -181,6 +182,7 @@ on:
181182
- 'opencl:gpu'
182183
- 'hip:gpu'
183184
- 'cuda:gpu'
185+
- 'level_zero_v2:arch-intel_gpu_mtl_u'
184186
tests_selector:
185187
type: choice
186188
options:

sycl/test-e2e/format.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,12 @@ def get_extra_env(sycl_devices):
334334
expanded = "env"
335335

336336
extra_env = get_extra_env([parsed_dev_name])
337+
backend, device = parsed_dev_name.split(":", 1)
338+
device_selector = parsed_dev_name
339+
if backend == "level_zero" and device.isdigit():
340+
extra_env.append(f"ZE_AFFINITY_MASK={device}")
341+
device_selector = f"{backend}:0"
342+
337343
if extra_env:
338344
expanded += " {}".format(" ".join(extra_env))
339345

@@ -343,7 +349,7 @@ def get_extra_env(sycl_devices):
343349
expanded += " env UR_LOADER_USE_LEVEL_ZERO_V2=0"
344350

345351
expanded += " ONEAPI_DEVICE_SELECTOR={} {}".format(
346-
parsed_dev_name, test.config.run_launcher
352+
device_selector, test.config.run_launcher
347353
)
348354
cmd = directive.command.replace("%{run}", expanded)
349355
# Expand device-specific condtions (%if ... %{ ... %}).

sycl/test-e2e/lit.cfg.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ def remove_level_zero_suffix(devices):
706706
available_devices = {
707707
"opencl": ("cpu", "gpu", "fpga"),
708708
"cuda": "gpu",
709-
"level_zero": "gpu",
709+
"level_zero": ("gpu", "0", "1"),
710710
"hip": "gpu",
711711
"native_cpu": "cpu",
712712
"offload": "gpu",
@@ -917,12 +917,14 @@ def get_sycl_ls_verbose(sycl_device, env):
917917

918918
env = copy.copy(llvm_config.config.environment)
919919

920+
backend_for_selector = backend.replace("_v2", "").replace("_v1", "")
921+
920922
# Find all available devices under the backend
921-
env["ONEAPI_DEVICE_SELECTOR"] = backend + ":*"
923+
env["ONEAPI_DEVICE_SELECTOR"] = backend_for_selector + ":*"
922924

923925
detected_architectures = []
924926

925-
platform_devices = remove_level_zero_suffix(backend + ":*")
927+
platform_devices = backend_for_selector + ":*"
926928

927929
for line in get_sycl_ls_verbose(platform_devices, env).stdout.splitlines():
928930
if re.match(r" *Architecture:", line):
@@ -1112,6 +1114,7 @@ def get_sycl_ls_verbose(sycl_device, env):
11121114
features.update(sg_size_features)
11131115
features.update(architecture_feature)
11141116
features.update(device_family)
1117+
features.update(aspects)
11151118

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

0 commit comments

Comments
 (0)