From fecc68328e13da4a0f40bd4745f4b26254d37ece Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Mon, 11 May 2026 16:48:22 +0200 Subject: [PATCH 1/3] L0 testing on BMG + skip failure tests --- .github/workflows/ur-precommit.yml | 3 +++ .../conformance/device/urDeviceCreateWithNativeHandle.cpp | 4 ++++ .../test/conformance/device/urDeviceGetSelected.cpp | 4 ++++ .../enqueue/urEnqueueKernelLaunchWithArgsExp.cpp | 7 ++++--- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ur-precommit.yml b/.github/workflows/ur-precommit.yml index 448eca26f7ac8..403ac4d285826 100644 --- a/.github/workflows/ur-precommit.yml +++ b/.github/workflows/ur-precommit.yml @@ -70,6 +70,9 @@ jobs: runner: UR_L0 other_adapter: NATIVE_CPU image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN + - name: L0_V2 + runner: UR_L0_BMG + image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN - name: CUDA runner: UR_CUDA image_options: -u 1001 --privileged --cap-add SYS_ADMIN --gpus all diff --git a/unified-runtime/test/conformance/device/urDeviceCreateWithNativeHandle.cpp b/unified-runtime/test/conformance/device/urDeviceCreateWithNativeHandle.cpp index 61846c8fb8822..06bd5f085841e 100644 --- a/unified-runtime/test/conformance/device/urDeviceCreateWithNativeHandle.cpp +++ b/unified-runtime/test/conformance/device/urDeviceCreateWithNativeHandle.cpp @@ -9,6 +9,8 @@ using urDeviceCreateWithNativeHandleTest = uur::urDeviceTest; UUR_INSTANTIATE_DEVICE_TEST_SUITE(urDeviceCreateWithNativeHandleTest); TEST_P(urDeviceCreateWithNativeHandleTest, Success) { + // Related issue: #22025 + UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{}); ur_native_handle_t native_handle = 0; UUR_ASSERT_SUCCESS_OR_UNSUPPORTED( @@ -33,6 +35,8 @@ TEST_P(urDeviceCreateWithNativeHandleTest, Success) { TEST_P(urDeviceCreateWithNativeHandleTest, SuccessWithExplicitUnOwnedNativeHandle) { + // Related issue: #22025 + UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{}); ur_native_handle_t native_handle = 0; UUR_ASSERT_SUCCESS_OR_UNSUPPORTED( urDeviceGetNativeHandle(device, &native_handle)); diff --git a/unified-runtime/test/conformance/device/urDeviceGetSelected.cpp b/unified-runtime/test/conformance/device/urDeviceGetSelected.cpp index 211234ae435a9..f0d617b41d2dd 100644 --- a/unified-runtime/test/conformance/device/urDeviceGetSelected.cpp +++ b/unified-runtime/test/conformance/device/urDeviceGetSelected.cpp @@ -108,6 +108,8 @@ TEST_P(urDeviceGetSelectedTest, SuccessSelected_StarColonStar) { } TEST_P(urDeviceGetSelectedTest, SuccessSelected_StarColonZero) { + // Related issue: #22025 + UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{}); uur::set_env("ONEAPI_DEVICE_SELECTOR", "*:0"); uint32_t count = 0; ASSERT_SUCCESS( @@ -153,6 +155,8 @@ TEST_P(urDeviceGetSelectedTest, SuccessSelected_SelectAndDiscard) { TEST_P(urDeviceGetSelectedTest, SuccessSelected_SelectSomethingAndDiscardSomethingElse) { + // Related issue: #22025 + UUR_KNOWN_FAILURE_ON(uur::LevelZeroV2{}); uur::set_env("ONEAPI_DEVICE_SELECTOR", "*:0;!*:1"); uint32_t count = 0; ASSERT_SUCCESS( diff --git a/unified-runtime/test/conformance/enqueue/urEnqueueKernelLaunchWithArgsExp.cpp b/unified-runtime/test/conformance/enqueue/urEnqueueKernelLaunchWithArgsExp.cpp index af20ea0dbd9af..be7eb9d74210c 100644 --- a/unified-runtime/test/conformance/enqueue/urEnqueueKernelLaunchWithArgsExp.cpp +++ b/unified-runtime/test/conformance/enqueue/urEnqueueKernelLaunchWithArgsExp.cpp @@ -55,9 +55,10 @@ UUR_INSTANTIATE_DEVICE_TEST_SUITE_MULTI_QUEUE( // Note: Due to an issue with HIP, the subgroup test is not generated struct urEnqueueKernelLaunchKernelSubGroupTest : uur::urKernelExecutionTest { void SetUp() override { - // Subgroup size of 8 isn't supported on the Data Center GPU Max - UUR_KNOWN_FAILURE_ON(uur::HIP{}, uur::LevelZero{"Data Center GPU Max"}, - uur::LevelZeroV2{"Data Center GPU Max"}); + // Subgroup size of 8 isn't supported on the Data Center GPU Max or Battlemage Arc + UUR_KNOWN_FAILURE_ON(uur::HIP{}, + uur::LevelZero{"Data Center GPU Max", "Arc(TM) B"}, + uur::LevelZeroV2{"Data Center GPU Max", "Arc(TM) B"}); program_name = "subgroup"; UUR_RETURN_ON_FATAL_FAILURE(urKernelExecutionTest::SetUp()); From edfa76568edfde5f071bb275a7c4b867499f7341 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Mon, 13 Jul 2026 13:07:12 +0200 Subject: [PATCH 2/3] check info about runner --- .github/workflows/test-runners.yml | 43 ++++ test.py | 225 ++++++++++++++++++ .../device/urDeviceGetSelected.cpp | 1 + 3 files changed, 269 insertions(+) create mode 100644 .github/workflows/test-runners.yml create mode 100644 test.py diff --git a/.github/workflows/test-runners.yml b/.github/workflows/test-runners.yml new file mode 100644 index 0000000000000..4260beacfdb8b --- /dev/null +++ b/.github/workflows/test-runners.yml @@ -0,0 +1,43 @@ +name: Test runners + +on: + push: + pull_request: + +permissions: read-all + +jobs: + run-test: + strategy: + fail-fast: false + matrix: + runner: + - test1 + - test2 + - test3 + - test4 + - test5 + - test6 + - test7 + - test8 + - test9 + - test10 + - test11 + - test12 + - test13 + - test14 + - test15 + - test16 + name: ${{ matrix.runner }} + runs-on: [self-hosted, "${{ matrix.runner }}"] + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + sparse-checkout: | + test.py + sparse-checkout-cone-mode: false + + - name: Run test.py + run: python3 test.py diff --git a/test.py b/test.py new file mode 100644 index 0000000000000..cc4e5055958c0 --- /dev/null +++ b/test.py @@ -0,0 +1,225 @@ +#!/usr/bin/env python3 + +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2026, Intel Corporation + + +import re +import socket +import subprocess + + +def run(cmd, timeout=15): + """Run a local shell command and return (stdout, stderr) as decoded strings.""" + try: + proc = subprocess.run( + cmd, + shell=True, + capture_output=True, + timeout=timeout, + check=False, + ) + return ( + proc.stdout.decode(errors='replace'), + proc.stderr.decode(errors='replace'), + ) + except subprocess.TimeoutExpired as e: + return "", f"timeout after {timeout}s: {e}" + except Exception as e: + return "", f"exec error: {e}" + + +def section(title): + print(f"\n--- {title} ---") + + +def check_gpu(): + section("GPU") + + # Try NVIDIA first + out, _ = run("command -v nvidia-smi >/dev/null 2>&1 && " + "nvidia-smi --query-gpu=name,memory.total --format=csv,noheader") + if out.strip(): + gpus = [line.strip() for line in out.strip().splitlines() if line.strip()] + print(f"[NVIDIA GPU count: {len(gpus)}]") + for i, g in enumerate(gpus): + print(f" GPU {i}: {g}") + return + + # Try Intel PVC / Data Center GPU via xpu-smi + out, _ = run("command -v xpu-smi >/dev/null 2>&1 && xpu-smi discovery") + if out.strip(): + print("[Intel xpu-smi discovery:]") + print(out.strip()) + dev_count = len(re.findall(r"^\s*Device ID\s*:", out, flags=re.MULTILINE)) + if dev_count: + print(f"[Intel GPU count: {dev_count}]") + return + + # Fallback: use lspci to list any VGA / 3D / Display controllers + out, _ = run("lspci -nn 2>/dev/null | grep -Ei 'vga|3d|display' || true") + if out.strip(): + lines = [l.strip() for l in out.strip().splitlines() if l.strip()] + print(f"[GPU devices via lspci ({len(lines)} total):]") + for l in lines: + print(f" {l}") + + joined = out.lower() + detected = [] + if "pvc" in joined or "data center gpu max" in joined or "ponte vecchio" in joined: + detected.append("Intel PVC (Data Center GPU Max)") + if "h100" in joined: + detected.append("NVIDIA H100") + if "a100" in joined: + detected.append("NVIDIA A100") + if detected: + print(f"[Detected: {', '.join(detected)}]") + return + + print("[No GPU detected]") + + +def check_hostnamectl(): + section("hostnamectl") + out, err = run("hostnamectl") + if out.strip(): + print(out.strip()) + elif err.strip(): + print(f"[error] {err.strip()}") + else: + print("[no output]") + + +def check_storage(): + section("Storage") + + out, err = run("lsblk -d -b -o NAME,SIZE,MODEL,TYPE") + if out.strip(): + lines = out.strip().splitlines() + header, data = lines[0], lines[1:] + disks = [l for l in data if l.strip().endswith("disk")] + print(f"[disks ({len(disks)} total):]") + print(header) + total_bytes = 0 + for l in disks: + print(l) + parts = l.split() + if len(parts) >= 2 and parts[1].isdigit(): + total_bytes += int(parts[1]) + if total_bytes: + total_tb = total_bytes / (1024 ** 4) + total_gb = total_bytes / (1024 ** 3) + if total_tb >= 1: + print(f"[total disk capacity: {total_tb:.2f} TiB ({total_gb:.0f} GiB)]") + else: + print(f"[total disk capacity: {total_gb:.2f} GiB]") + elif err.strip(): + print(f"[lsblk error] {err.strip()}") + + out, _ = run("df -hT --total -x tmpfs -x devtmpfs -x squashfs -x overlay 2>/dev/null | tail -n +1") + if out.strip(): + print("\n[df -hT (filesystems):]") + print(out.strip()) + + +def check_nic(): + section("NIC / NIC speed") + + ip_a_out, ip_a_err = run("ip a") + if ip_a_out.strip(): + print("[ip a:]") + print(ip_a_out.strip()) + elif ip_a_err.strip(): + print(f"[ip a error] {ip_a_err.strip()}") + + ip_br_out, _ = run("ip -4 -br addr show 2>/dev/null | awk '$1 != \"lo\"'") + if ip_br_out.strip(): + print("\n[IPv4 addresses:]") + print(ip_br_out.strip()) + + print() + + out, err = run("ip -br link show 2>/dev/null | awk '$1 != \"lo\"'") + if not out.strip(): + if err.strip(): + print(f"[ip link error] {err.strip()}") + return + + ifaces = [] + print("[interfaces:]") + print(out.strip()) + for line in out.strip().splitlines(): + parts = line.split() + if parts: + ifaces.append(parts[0].split('@')[0]) + + print("\n[speed / model per interface:]") + for iface in ifaces: + speed_out, _ = run( + f"( command -v ethtool >/dev/null 2>&1 && ethtool {iface} 2>/dev/null " + f"| grep -E 'Speed:|Link detected:' ) || true") + speed_line = "" + if speed_out.strip(): + speed_line = " | ".join(l.strip() for l in speed_out.strip().splitlines()) + + if not speed_line: + sys_out, _ = run(f"cat /sys/class/net/{iface}/speed 2>/dev/null || true") + if sys_out.strip(): + speed_line = f"Speed (sysfs): {sys_out.strip()} Mb/s" + + drv_out, _ = run( + f"( command -v ethtool >/dev/null 2>&1 && ethtool -i {iface} 2>/dev/null " + f"| grep -E '^(driver|bus-info):' ) || true") + drv = "" + bus_info = "" + for line in drv_out.strip().splitlines(): + if line.startswith("driver:"): + drv = line.split(":", 1)[1].strip() + elif line.startswith("bus-info:"): + bus_info = line.split(":", 1)[1].strip() + + if not bus_info: + sys_bus, _ = run( + f"basename $(readlink -f /sys/class/net/{iface}/device) 2>/dev/null || true") + candidate = sys_bus.strip() + if candidate and re.match(r"^[0-9a-fA-F]{4}:", candidate): + bus_info = candidate + + model = "" + if bus_info: + lspci_out, _ = run(f"lspci -s {bus_info} 2>/dev/null || true") + if lspci_out.strip(): + m = re.match(r"^\S+\s+[^:]+:\s*(.*)$", lspci_out.strip().splitlines()[0]) + model = m.group(1).strip() if m else lspci_out.strip().splitlines()[0] + + extras = [] + if drv: + extras.append(f"driver: {drv}") + if bus_info: + extras.append(f"pci: {bus_info}") + if model: + extras.append(f"model: {model}") + + suffix = f" [{' | '.join(extras)}]" if extras else "" + print(f" {iface}: {speed_line or 'unknown'}{suffix}") + + +def main(): + host = socket.gethostname() + + print(f"\n{'='*80}") + print(f"Collecting info from local machine: {host}") + print(f"{'='*80}") + + check_gpu() + check_hostnamectl() + check_storage() + check_nic() + + print(f"\n{'='*80}") + print(f"Done ({host})") + print(f"{'='*80}") + + +if __name__ == "__main__": + main() diff --git a/unified-runtime/test/conformance/device/urDeviceGetSelected.cpp b/unified-runtime/test/conformance/device/urDeviceGetSelected.cpp index f0d617b41d2dd..5e2e2cf64c897 100644 --- a/unified-runtime/test/conformance/device/urDeviceGetSelected.cpp +++ b/unified-runtime/test/conformance/device/urDeviceGetSelected.cpp @@ -170,6 +170,7 @@ TEST_P(urDeviceGetSelectedTest, } } +// TEST_P(urDeviceGetSelectedTest, InvalidNullHandlePlatform) { uur::unset_env("ONEAPI_DEVICE_SELECTOR"); uint32_t count = 0; From 3a640bb5f4acb88c16817d3e8f5422501b9bbc29 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Mon, 13 Jul 2026 13:11:28 +0200 Subject: [PATCH 3/3] check info about runner --- .github/workflows/test-runners.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-runners.yml b/.github/workflows/test-runners.yml index 4260beacfdb8b..a4ffdb9d99ef9 100644 --- a/.github/workflows/test-runners.yml +++ b/.github/workflows/test-runners.yml @@ -29,7 +29,7 @@ jobs: - test15 - test16 name: ${{ matrix.runner }} - runs-on: [self-hosted, "${{ matrix.runner }}"] + runs-on: ["${{ matrix.runner }}"] steps: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2