Skip to content

Commit e857c5b

Browse files
committed
fix affinity mask in python scripts
1 parent 5742769 commit e857c5b

File tree

6 files changed

+12
-25
lines changed

6 files changed

+12
-25
lines changed

devops/actions/run-tests/e2e/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ runs:
7878
continue-on-error: true
7979
shell: bash
8080
env:
81-
LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param print_features=True --param test-mode=${{ inputs.testing_mode }} --param sycl_devices=${{ inputs.target_devices }} ${{ inputs.extra_lit_opts }}
81+
LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param print_features=True --param test-mode=${{ inputs.testing_mode }} --param sycl_devices=level_zero_v2:arch-intel_gpu_mtl_u ${{ inputs.extra_lit_opts }}
8282
# LIT_OPTS: -j 12 -v --param "sycl_devices=level_zero_v2:arch-intel_gpu_mtl_u" sycl/test-e2e/
8383
run: |
8484
echo "LIT_OPTS: $LIT_OPTS"

sycl/test-e2e/AddressSanitizer/lit.local.cfg

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ config.unsupported_features += ['spirv-backend']
2020

2121
# https://github.com/intel/llvm/issues/16920
2222
config.unsupported_features += ['arch-intel_gpu_bmg_g21']
23+
config.unsupported_features += ['arch-intel_gpu_mtl_u']
24+
2325

2426
# https://github.com/intel/llvm/issues/20142
2527
config.unsupported_features += ['target-native_cpu']
@@ -31,5 +33,4 @@ unsupported_san_flags = [
3133
if any(flag in config.cxx_flags for flag in unsupported_san_flags):
3234
config.unsupported=True
3335

34-
if config.ze_affinity_mask is not None:
35-
config.environment["ZE_AFFINITY_MASK"] = config.ze_affinity_mask
36+
config.environment["ZE_AFFINITY_MASK"] = "0"

sycl/test-e2e/MemorySanitizer/lit.local.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,4 @@ unsupported_san_flags = [
3939
if any(flag in config.cxx_flags for flag in unsupported_san_flags):
4040
config.unsupported=True
4141

42-
if config.ze_affinity_mask is not None:
43-
config.environment["ZE_AFFINITY_MASK"] = config.ze_affinity_mask
42+
config.environment["ZE_AFFINITY_MASK"] = "0"

sycl/test-e2e/ThreadSanitizer/lit.local.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,4 @@ unsupported_san_flags = [
3434
if any(flag in config.cxx_flags for flag in unsupported_san_flags):
3535
config.unsupported=True
3636

37-
if config.ze_affinity_mask is not None:
38-
config.environment["ZE_AFFINITY_MASK"] = config.ze_affinity_mask
37+
config.environment["ZE_AFFINITY_MASK"] = "0"

sycl/test-e2e/format.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,12 +334,6 @@ 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-
343337
if extra_env:
344338
expanded += " {}".format(" ".join(extra_env))
345339

@@ -359,6 +353,11 @@ def get_extra_env(sycl_devices):
359353
"linux",
360354
"windows",
361355
"preview-breaking-changes-supported",
356+
# the following entries are used by architecture-based filtering
357+
# (:arch- device, not :gpu or :cpu)
358+
"cpu",
359+
"gpu",
360+
"accelerator",
362361
]:
363362
if cond_features in test.config.available_features:
364363
conditions[cond_features] = True

sycl/test-e2e/lit.cfg.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@
9696
"LIBCLANG_NOTHREADS",
9797
"LIBCLANG_RESOURCE_USAGE",
9898
"LIBCLANG_CODE_COMPLETION_LOGGING",
99-
"ZE_AFFINITY_MASK",
10099
]
101100

102101
# Names of the Release and Debug versions of the XPTIFW library
@@ -707,7 +706,7 @@ def remove_level_zero_suffix(devices):
707706
available_devices = {
708707
"opencl": ("cpu", "gpu", "fpga"),
709708
"cuda": "gpu",
710-
"level_zero": ("gpu", "0", "1"),
709+
"level_zero": "gpu",
711710
"hip": "gpu",
712711
"native_cpu": "cpu",
713712
"offload": "gpu",
@@ -951,15 +950,6 @@ def get_sycl_ls_verbose(sycl_device, env):
951950

952951
config.sycl_devices = filtered_sycl_devices
953952

954-
# Determine ZE_AFFINITY_MASK for Level Zero devices.
955-
# Sanitizer tests need to set ZE_AFFINITY_MASK to a single device index
956-
config.ze_affinity_mask = None
957-
for sycl_device in remove_level_zero_suffix(config.sycl_devices):
958-
be, dev = sycl_device.split(":")
959-
if be == "level_zero" and dev.isdigit():
960-
config.ze_affinity_mask = dev
961-
break
962-
963953
for sycl_device in remove_level_zero_suffix(config.sycl_devices):
964954
be, dev = sycl_device.split(":")
965955
config.available_features.add("any-device-is-" + dev)
@@ -1124,7 +1114,6 @@ def get_sycl_ls_verbose(sycl_device, env):
11241114
features.update(sg_size_features)
11251115
features.update(architecture_feature)
11261116
features.update(device_family)
1127-
features.update(aspects)
11281117

11291118
be, dev = sycl_device.split(":")
11301119
if dev.isdigit():

0 commit comments

Comments
 (0)