Skip to content

[CI] Run spirv-backend pre-built e2e tests on BMG in precommit #16898

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/sycl-linux-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ jobs:
target_devices: level_zero:gpu
# The new Xe kernel driver used by BMG doesn't support resetting.
reset_intel_gpu: false
- name: SPIR-V Backend / Intel Battlemage Graphics
runner: '["Linux", "bmg"]'
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
reset_intel_gpu: false
extra_lit_opts: --param spirv-backend=True
e2e_binaries_artifact: sycl_e2e_bin_default_spirv_backend
uses: ./.github/workflows/sycl-linux-run-tests.yml
with:
name: ${{ matrix.name }}
Expand All @@ -120,7 +127,7 @@ jobs:
sycl_toolchain_artifact: sycl_linux_default
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
sycl_toolchain_decompress_command: ${{ needs.build.outputs.artifact_decompress_command }}
e2e_binaries_artifact: sycl_e2e_bin_default
e2e_binaries_artifact: ${{ matrix.e2e_binaries_artifact || 'sycl_e2e_bin_default' }}
e2e_testing_mode: 'run-only'

# Do not install drivers on AMD and CUDA runners.
Expand Down
10 changes: 10 additions & 0 deletions sycl/test-e2e/Adapters/enqueue-arg-order-image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
// support, enforce it for this test.
// RUN: env SYCL_HOST_UNIFIED_MEMORY=1 SYCL_UR_TRACE=2 %{run} %t.out | FileCheck %s

// 1. There is a SPIR-V spec issue that blocks generation of valid SPIR-V code
// for the OpenCL environments support of the "Unknown" image format:
// https://github.com/KhronosGroup/SPIRV-Headers/issues/487
// 2. The PR https://github.com/llvm/llvm-project/pull/127242 in upstream needs
// to be merged with intel/llvm to address an issue of mapping from SPIR-V
// friendly builtins to Image Read/Write instructions After the 1 issue is
// resolved and 2 is merged we will re-enable Image support.
// UNSUPPORTED: spirv-backend && arch-intel_gpu_bmg_g21
// UNSUPPORTED-TRACKER: https://github.com/KhronosGroup/SPIRV-Headers/issues/487

#include <iostream>

#include <sycl/accessor_image.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
// spir-v gen for legacy images at O0 not working
// UNSUPPORTED: O0

// 1. There is a SPIR-V spec issue that blocks generation of valid SPIR-V code
// for the OpenCL environments support of the "Unknown" image format:
// https://github.com/KhronosGroup/SPIRV-Headers/issues/487
// 2. The PR https://github.com/llvm/llvm-project/pull/127242 in upstream needs
// to be merged with intel/llvm to address an issue of mapping from SPIR-V
// friendly builtins to Image Read/Write instructions After the 1 issue is
// resolved and 2 is merged we will re-enable Image support.
// UNSUPPORTED: spirv-backend && arch-intel_gpu_bmg_g21
// UNSUPPORTED-TRACKER: https://github.com/KhronosGroup/SPIRV-Headers/issues/487

// we use the interop to get the native image handle and then use that to make a
// new image and enumerate the pixels.

Expand Down
10 changes: 10 additions & 0 deletions sycl/test-e2e/Adapters/interop-level-zero-image-ownership.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
// spir-v gen for legacy images at O0 not working
// UNSUPPORTED: O0

// 1. There is a SPIR-V spec issue that blocks generation of valid SPIR-V code
// for the OpenCL environments support of the "Unknown" image format:
// https://github.com/KhronosGroup/SPIRV-Headers/issues/487
// 2. The PR https://github.com/llvm/llvm-project/pull/127242 in upstream needs
// to be merged with intel/llvm to address an issue of mapping from SPIR-V
// friendly builtins to Image Read/Write instructions After the 1 issue is
// resolved and 2 is merged we will re-enable Image support.
// UNSUPPORTED: spirv-backend && arch-intel_gpu_bmg_g21
// UNSUPPORTED-TRACKER: https://github.com/KhronosGroup/SPIRV-Headers/issues/487

// RUN: %{build} %level_zero_options -o %t.out
// RUN: env UR_L0_DEBUG=1 %{run} %t.out 2>&1 | FileCheck %s

Expand Down
10 changes: 10 additions & 0 deletions sycl/test-e2e/Adapters/interop-level-zero-image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
// spir-v gen for legacy images at O0 not working
// UNSUPPORTED: O0

// 1. There is a SPIR-V spec issue that blocks generation of valid SPIR-V code
// for the OpenCL environments support of the "Unknown" image format:
// https://github.com/KhronosGroup/SPIRV-Headers/issues/487
// 2. The PR https://github.com/llvm/llvm-project/pull/127242 in upstream needs
// to be merged with intel/llvm to address an issue of mapping from SPIR-V
// friendly builtins to Image Read/Write instructions After the 1 issue is
// resolved and 2 is merged we will re-enable Image support.
// UNSUPPORTED: spirv-backend && arch-intel_gpu_bmg_g21
// UNSUPPORTED-TRACKER: https://github.com/KhronosGroup/SPIRV-Headers/issues/487

// This test verifies that make_image is working for 1D, 2D and 3D images.
// We instantiate an image with L0, set its body, then use a host accessor to
// verify that the pixels are set correctly.
Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/Basic/device_event.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// RUN: %{build} -o %t.run
// RUN: %{run} %t.run

// XFAIL: spirv-backend && run-mode
// XFAIL-TRACKER: CMPLRLLVM-64705
// UNSUPPORTED: spirv-backend
// UNSUPPORTED-TRACKER: CMPLRLLVM-64705

//==--------device_event.cpp - SYCL class device_event test ----------------==//
//
Expand Down
5 changes: 5 additions & 0 deletions sycl/test-e2e/Basic/image/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# There is a SPIR-V spec issue that blocks generation of valid SPIR-V code for
# the OpenCL environments support of the "Unknown" image format:
# https://github.com/KhronosGroup/SPIRV-Headers/issues/487
# After the issue is resolved we will re-enable Image support.
config.unsupported_features += ['spirv-backend']
10 changes: 10 additions & 0 deletions sycl/test-e2e/DiscardEvents/discard_events_check_images.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@
// they don't pass then it's most likely a general issue unrelated to
// discard_events.

// 1. There is a SPIR-V spec issue that blocks generation of valid SPIR-V code
// for the OpenCL environments support of the "Unknown" image format:
// https://github.com/KhronosGroup/SPIRV-Headers/issues/487
// 2. The PR https://github.com/llvm/llvm-project/pull/127242 in upstream needs
// to be merged with intel/llvm to address an issue of mapping from SPIR-V
// friendly builtins to Image Read/Write instructions After the 1 issue is
// resolved and 2 is merged we will re-enable Image support.
// UNSUPPORTED: spirv-backend && arch-intel_gpu_bmg_g21
// UNSUPPORTED-TRACKER: https://github.com/KhronosGroup/SPIRV-Headers/issues/487

#include "../helpers.hpp" // for printableVec
#include <cassert>
#include <iostream>
Expand Down
3 changes: 0 additions & 3 deletions sycl/test-e2e/MemorySanitizer/check_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
// RUN: %{build} %device_msan_flags -O2 -g -o %t3.out
// RUN: %{run} not %t3.out 2>&1 | FileCheck %s

// XFAIL: spirv-backend && gpu && run-mode
// XFAIL-TRACKER: https://github.com/llvm/llvm-project/issues/122075

#include <sycl/detail/core.hpp>

__attribute__((noinline)) long long foo(int data1, long long data2) {
Expand Down
3 changes: 0 additions & 3 deletions sycl/test-e2e/MemorySanitizer/check_call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
// RUN: %{build} %device_msan_flags -O2 -g -o %t3.out
// RUN: %{run} not %t3.out 2>&1 | FileCheck %s

// XFAIL: spirv-backend && gpu && run-mode
// XFAIL-TRACKER: https://github.com/llvm/llvm-project/issues/122075

#include <sycl/detail/core.hpp>
#include <sycl/usm.hpp>

Expand Down
3 changes: 0 additions & 3 deletions sycl/test-e2e/MemorySanitizer/check_divide.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
// RUN: %{build} %device_msan_flags -O2 -g -o %t3.out
// RUN: %{run} not %t3.out 2>&1 | FileCheck %s

// XFAIL: spirv-backend && gpu && run-mode
// XFAIL-TRACKER: https://github.com/llvm/llvm-project/issues/122075

#include <sycl/detail/core.hpp>
#include <sycl/usm.hpp>

Expand Down
8 changes: 8 additions & 0 deletions sycl/test-e2e/Sampler/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 1. There is a SPIR-V spec issue that blocks generation of valid SPIR-V code for
# the OpenCL environments support of the "Unknown" image format:
# https://github.com/KhronosGroup/SPIRV-Headers/issues/487
# 2. The PR https://github.com/llvm/llvm-project/pull/127242 in upstream needs to be
# merged with intel/llvm to address an issue of mapping from SPIR-V friendly builtins
# to Image Read/Write instructions
# After the 1 issue is resolved and 2 is merged we will re-enable Image support.
config.unsupported_features += ['spirv-backend']
3 changes: 3 additions & 0 deletions sycl/test-e2e/USM/copy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
// RUN: %{build} -fsycl-device-code-split=per_kernel -o %t1.out
// RUN: %{run} %t1.out

// UNSUPPORTED: spirv-backend && arch-intel_gpu_bmg_g21
// UNSUPPORTED-TRACKER: CMPLRLLVM-64705

#include <sycl/detail/core.hpp>
#include <sycl/usm.hpp>

Expand Down
5 changes: 5 additions & 0 deletions sycl/test-e2e/USM/memops2d/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This feature refers to an unsupported capability in the SPIR-V Backend,
# pending triaging and identifying required features/extensions.
# Temporarily disabled until the failure is addressed:
# https://github.com/llvm/llvm-project/issues/127791
config.unsupported_features += ['spirv-backend']
3 changes: 3 additions & 0 deletions sycl/test-e2e/bindless_images/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Support of this feature is waiting for the upstream PR
# https://github.com/llvm/llvm-project/pull/127737 to be merged with intel/llvm.
config.unsupported_features += ['spirv-backend']
Loading