Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
38 changes: 37 additions & 1 deletion .github/workflows/sycl-windows-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,25 @@ jobs:
with:
changes: ${{ needs.detect_changes.outputs.filters }}

e2e:
build-e2e:
needs: build
# Continue if build was successful.
if: |
always()
&& !cancelled()
&& needs.build.outputs.build_conclusion == 'success'
uses: ./.github/workflows/sycl-windows-run-tests.yml
with:
name: Build Windows E2E tests
runner: '["Windows", "build-e2e"]'
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
e2e_testing_mode: build-only
extra_lit_opts: --param sycl_build_targets="spir"
e2e_binaries_artifact: sycl_windows_e2ebin

run_prebuilt_e2e_tests:
needs: [build, build-e2e]
# Continue if build was successful.
if: |
always()
&& !cancelled()
Expand All @@ -57,10 +73,30 @@ jobs:
include:
- name: Intel GEN12 Graphics with Level Zero
runner: '["Windows","gen12"]'
uses: ./.github/workflows/sycl-windows-run-tests.yml
with:
name: ${{ matrix.name }}
runner: ${{ matrix.runner }}
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
e2e_testing_mode: run-only
e2e_binaries_artifact: sycl_windows_e2ebin

run_full_e2e_tests:
needs: build
# Continue if build was successful.
if: |
always()
&& !cancelled()
&& needs.build.outputs.build_conclusion == 'success'
strategy:
fail-fast: false
matrix:
include:
- name: Intel Battlemage Graphics with Level Zero
runner: '["Windows","bmg"]'
Comment on lines +90 to 102
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping BMG running in full mode since multiple tests seem to hang #17582

uses: ./.github/workflows/sycl-windows-run-tests.yml
with:
name: ${{ matrix.name }}
runner: ${{ matrix.runner }}
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
e2e_testing_mode: full
53 changes: 52 additions & 1 deletion .github/workflows/sycl-windows-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ on:
required: false
default: "cl"

e2e_testing_mode:
type: string
default: "full"

e2e_binaries_artifact:
type: string
default: ''
required: False

cts_testing_mode:
description: |
Testing mode to run SYCL-CTS in, can be either `full`, `build-only`
Expand Down Expand Up @@ -141,12 +150,31 @@ jobs:
sycl-ls
- run: |
sycl-ls --verbose

- name: Download E2E Binaries
if: ${{ inputs.tests_selector == 'e2e' && inputs.e2e_testing_mode == 'run-only' }}
uses: actions/download-artifact@v4
with:
name: ${{ inputs.e2e_binaries_artifact }}
- name: Extract E2E Binaries
if: ${{ inputs.tests_selector == 'e2e' && inputs.e2e_testing_mode == 'run-only' }}
shell: bash
run: |
mkdir build-e2e
tar -xf e2e_bin.tar.gz -C build-e2e

- name: Configure E2E with Level Zero target
if: inputs.tests_selector == 'e2e'
shell: cmd
run: |
mkdir build-e2e
cmake -GNinja -B build-e2e -S.\llvm\sycl\test-e2e -DSYCL_TEST_E2E_TARGETS="level_zero:gpu" -DCMAKE_CXX_COMPILER="clang++" -DLEVEL_ZERO_LIBS_DIR="D:\\github\\level-zero_win-sdk\\lib" -DLEVEL_ZERO_INCLUDE="D:\\github\\level-zero_win-sdk\\include" -DLLVM_LIT="..\\llvm\\llvm\\utils\\lit\\lit.py"

- name: Keep track of files after configuring E2E step
if: ${{ always() && inputs.tests_selector == 'e2e' && inputs.e2e_testing_mode == 'build-only' }}
shell: bash
run: ls build-e2e > e2econf_files.txt

- name: Run End-to-End tests
if: inputs.tests_selector == 'e2e'
shell: bash
Expand All @@ -155,9 +183,32 @@ jobs:
if [[ ${{inputs.compiler}} == 'icx' ]]; then
export LIT_FILTER_OUT="compile_on_win_with_mdd"
fi
export LIT_OPTS="-v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests ${{ inputs.extra_lit_opts }}"
export LIT_OPTS="-v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param test-mode=${{ inputs.e2e_testing_mode }} ${{ inputs.extra_lit_opts }}"
cmake --build build-e2e --target check-sycl-e2e

# There are issues with running the tests with the same CMakeCache.txt, or
# even rebuilding it on top of an existing one in gen12, so we remove the
# configuration files before packing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry can you explain what is going on here a little more?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey so after you aligned the path, I tried out to run this how we do on Linux (only configuring in build-only), but I got the following error:

CMake Error: Generator: execution of make failed. Make command was: C:/PROGRA~1/MICROS~1/2022/PROFES~1/Common7/IDE/COMMON~1/MICROS~1/CMake/Ninja/ninja.exe check-sycl-e2e

https://github.com/intel/llvm/actions/runs/13999136313/job/39203441755

I also tried running cmake on the folder with the prebuilt binaries after extracting it (but without deleting the files initially generated by cmake, like I am doing here), but it still had a similar issue

A subdirectory or file build-e2e already exists.
Configuring SYCL End-to-End Tests
CMake Error at CMakeLists.txt:9 (project):
  Running

   'C:/PROGRA~1/MICROS~1/2022/PROFES~1/Common7/IDE/COMMON~1/MICROS~1/CMake/Ninja/ninja.exe' '--version'

  failed with:

   no such file or directory


-- Configuring incomplete, errors occurred!

https://github.com/intel/llvm/actions/runs/14000093671/job/39205911174

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it saying the ninja executable doesn't exist or is the error coming from somewhere inside the generated cmake files?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not certain, but if I had to guess I think it may have to do with the installation of ninja being in a different location in the build-e2e systems than on the gen12 systems. However, in that case I'm not sure why re-running cmake wouldnt fix that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i can investigate on a runner directly, let me dm you

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok yeah its a path issue, this solution seems better than fixing it

- name: Remove E2E configuration files
if: ${{ always() && inputs.tests_selector == 'e2e' && inputs.e2e_testing_mode == 'build-only' }}
shell: bash
run: |
for FILE in $(cat e2econf_files.txt); do rm -r build-e2e/$FILE; done
rm e2econf_files.txt

- name: Pack E2E test binaries
if: ${{ always() && inputs.tests_selector == 'e2e' && inputs.e2e_testing_mode == 'build-only' }}
shell: bash
run: |
tar -czf e2e_bin.tar.gz -C build-e2e .
- name: Upload E2E test binaries
if: ${{ always() && inputs.tests_selector == 'e2e' && inputs.e2e_testing_mode == 'build-only' }}
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.e2e_binaries_artifact }}
path: e2e_bin.tar.gz
retention-days: 3

- name: Run SYCL CTS Tests
if: inputs.tests_selector == 'cts'
uses: ./devops/actions/run-tests/windows/cts
Expand Down
3 changes: 3 additions & 0 deletions sycl/test-e2e/AOT/cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

// REQUIRES: opencl-aot, cpu

// XFAIL: windows && !(build-mode && run-mode)
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/17515
Copy link
Contributor Author

@ayylol ayylol Mar 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't lose extra coverage from the tests marked as XFAIL due to #17515. Since these are CPU AOT tests, and we dont test for CPU on Windows currently on CI.


// CPU AOT targets host isa, so we compile on the run system instead.
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/Inputs/aot.cpp -o %t.out
// RUN: %{run} %t.out
Expand Down
3 changes: 3 additions & 0 deletions sycl/test-e2e/AOT/multiple-devices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

// REQUIRES: opencl-aot, ocloc, cpu, gpu, target-spir

// XFAIL: windows && !(build-mode && run-mode)
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/17515

// Produce a fat object for all targets (generic SPIR-V, CPU, GPU)
// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_x86_64,spir64_gen %S/Inputs/aot.cpp -c -o %t.o

Expand Down
3 changes: 3 additions & 0 deletions sycl/test-e2e/AOT/reqd-sg-size.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// This test ensures that a program that has a kernel
// using various required sub-group sizes can be compiled AOT.

// XFAIL: windows && !(build-mode && run-mode)
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/17515

// REQUIRES: ocloc, opencl-aot, any-device-is-cpu
// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_tgllp -o %t.tgllp.out %s
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Adapters/sycl-targets-order.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// RUN: %{run-unfiltered-devices} env ONEAPI_DEVICE_SELECTOR="opencl:*" %t-nvptx64-spir64.out
// RUN: %{run-unfiltered-devices} env ONEAPI_DEVICE_SELECTOR="cuda:*" %t-nvptx64-spir64.out

// REQUIRES: opencl, target-spir, any-triple-is-nvidia
// REQUIRES: opencl, target-spir, any-target-is-nvidia

//==------- sycl-targets-order.cpp - SYCL -fsycl-targets order test --------==//
//
Expand Down
4 changes: 2 additions & 2 deletions sycl/test-e2e/Basic/interop/make_kernel_subdevice_l0.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRES: level_zero, opencl, level_zero_dev_kit
// RUN: %{build} %level_zero_options -lOpenCL -o %t.ze.out
// REQUIRES: level_zero, opencl, level_zero_dev_kit, opencl_icd
// RUN: %{build} %level_zero_options %opencl_lib -o %t.ze.out
// RUN: %{run-unfiltered-devices} env ONEAPI_DEVICE_SELECTOR="level_zero:*" %t.ze.out

#include <cstdlib>
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Graph/NativeCommand/opencl_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// RUN: %{run} %t.out
// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %threads_lib %opencl_lib %}
// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %}
// REQUIRES: opencl
// REQUIRES: opencl, opencl_icd

#include <sycl/backend.hpp>
#include <sycl/detail/cl.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#include <random>
#include <sycl/usm.hpp>

#ifdef _WIN32
#include <chrono>
#endif

#ifdef SLM
#include "slm_utils.hpp"
#endif
Expand Down
3 changes: 3 additions & 0 deletions sycl/test-e2e/NewOffloadDriver/cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

// REQUIRES: opencl-aot, cpu

// XFAIL: windows && !(build-mode && run-mode)
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/17515

// CPU AOT targets host isa, so we compile on the run system instead.
// Test with `--offload-new-driver`
// RUN: %{run-aux} %clangxx -fsycl -fsycl-targets=spir64_x86_64 --offload-new-driver %S/Inputs/aot.cpp -o %t.out
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// REQUIRES: opencl-aot, cpu, gpu, level_zero

// XFAIL: windows && !(build-mode && run-mode)
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/17515

// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/Inputs/is_compatible_with_env.cpp -o %t.out

// RUN: env ONEAPI_DEVICE_SELECTOR=opencl:cpu %{run} %t.out
Expand Down
3 changes: 3 additions & 0 deletions sycl/test-e2e/ProgramManager/uneven_kernel_split.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// REQUIRES: any-device-is-cpu, gpu, opencl-aot, ocloc, target-spir

// XFAIL: windows && !(build-mode && run-mode)
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/17515

// UNSUPPORTED: linux
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/17305

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Regression/reduction_resource_leak_dw.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// REQUIRES: level_zero, level_zero_dev_kit
// XFAIL: windows
// XFAIL: windows && run-mode
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/16418
//
// RUN: %{build} %level_zero_options -o %t.out
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// REQUIRES: opencl-aot, cpu, target-spir

// XFAIL: windows && !(build-mode && run-mode)
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/17515

// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_x86_64 %S/Inputs/common.cpp -o %t_spv_cpu.out
// RUN: %{run} %t_spv_cpu.out
// Ensure that image ordering does not impact the execution
Expand Down
7 changes: 2 additions & 5 deletions sycl/test-e2e/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,12 @@ def get_extra_env(sycl_devices):
conditions,
recursion_limit=test.config.recursiveExpansionLimit,
)

# TODO: workaround for lit hanging when executing non-existent binary
# inside our containers
if len(script) == 0:
return lit.Test.Result(lit.Test.UNSUPPORTED, "Lit script is empty")
useExternalSh = test.config.test_mode == "run-only"

# FIXME: will hang if trying to execute non-existant binary in our containers
result = lit.TestRunner._runShTest(
test, litConfig, useExternalSh, script, tmpBase
test, litConfig, False, script, tmpBase
)

# Single triple/device - might be an XFAIL.
Expand Down
3 changes: 3 additions & 0 deletions sycl/test-e2e/syclcompat/kernel/kernel_win.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// REQUIRES: windows

// UNSUPPORTED: gpu-intel-gen12 && run-mode && !build-mode
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/17561

// DEFINE: %{sharedflag} = %if cl_options %{/clang:-shared%} %else %{-shared%}

// RUN: %clangxx %{sharedflag} -fsycl %{sycl_target_opts} %S\Inputs\kernel_module.cpp -o %t.dll
Expand Down
Loading