Skip to content

Commit 4cb8441

Browse files
authored
[SYCL][E2E] Check oclcpu version (#20084)
This patch allows to check the version of CPU RT in E2E tests. E.g. REQUIRES-INTEL-DRIVER: cpu: 2025.20.6.0.04_224945
1 parent 3d6a85d commit 4cb8441

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

sycl/test-e2e/format.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ def parse_min_intel_driver_req(line_number, line, output):
4242
# Return "win" version as (101, 4502) to ease later comparison.
4343
output["win"] = tuple(map(int, win.group(1).split(".")))
4444

45+
cpu = re.search(r"cpu: *([0-9]{4})", line)
46+
if cpu:
47+
if "cpu" in output:
48+
raise ValueError('Multiple entries for "cpu" version')
49+
output["cpu"] = int(cpu.group(1))
50+
4551
return output
4652

4753

@@ -165,7 +171,7 @@ def select_devices_for_test(self, test):
165171

166172
driver_ok = True
167173
if test.intel_driver_req:
168-
for fmt in ["lin", "win"]:
174+
for fmt in ["lin", "win", "cpu"]:
169175
if (
170176
fmt in test.intel_driver_req
171177
and fmt in test.config.intel_driver_ver[full_name]

sycl/test-e2e/lit.cfg.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,14 +1013,17 @@ def get_sycl_ls_verbose(sycl_device, env):
10131013
if re.match(r" *Driver *:", line):
10141014
_, driver_str = line.split(":", 1)
10151015
driver_str = driver_str.strip()
1016-
lin = re.match(r"[0-9]{1,2}\.[0-9]{1,2}\.([0-9]{5})", driver_str)
1017-
if lin:
1018-
intel_driver_ver["lin"] = int(lin.group(1))
1019-
win = re.match(
1020-
r"[0-9]{1,2}\.[0-9]{1,2}\.([0-9]{3})\.([0-9]{4})", driver_str
1021-
)
1022-
if win:
1023-
intel_driver_ver["win"] = (int(win.group(1)), int(win.group(2)))
1016+
if sycl_device.endswith("gpu"):
1017+
lin = re.match(r"[0-9]{1,2}\.[0-9]{1,2}\.([0-9]{5})", driver_str)
1018+
if lin:
1019+
intel_driver_ver["lin"] = int(lin.group(1))
1020+
win = re.match(
1021+
r"[0-9]{1,2}\.[0-9]{1,2}\.([0-9]{3})\.([0-9]{4})", driver_str
1022+
)
1023+
if win:
1024+
intel_driver_ver["win"] = (int(win.group(1)), int(win.group(2)))
1025+
elif sycl_device.endswith("cpu"):
1026+
intel_driver_ver["cpu"] = driver_str
10241027
if re.match(r" *Aspects *:", line):
10251028
_, aspects_str = line.split(":", 1)
10261029
dev_aspects.append(aspects_str.strip().split(" "))

0 commit comments

Comments
 (0)