Skip to content
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ad165c5
Add split testing functionality to CI and enable in precommit
ayylol Dec 11, 2024
d604088
Add workaround for lit hang inside our containers
ayylol Dec 11, 2024
0f6313b
Mark as split exceptions tests newly failing on build stage
ayylol Dec 11, 2024
142e661
Mark as `XFAIL: run-mode` test that can pass build stage
ayylol Dec 11, 2024
ba3dd1a
Add as split exceptions tests that fail on run-only stage
ayylol Dec 11, 2024
8ec39c3
Rename new e2e jobs
ayylol Dec 11, 2024
ca6fdce
Remove target_devices from build only test run
ayylol Dec 12, 2024
99747cc
Remove build_conclusion output on run-tests
ayylol Dec 12, 2024
04676fd
Re-add accidentally removed `outputs:` line
ayylol Dec 12, 2024
0470bf2
Rename extract/setup step to just extract
ayylol Dec 12, 2024
0a7a772
Fix formatting
ayylol Dec 12, 2024
b0dabe2
Add retention days input
ayylol Dec 12, 2024
125285c
rename build_artifact_suffix to artifact_suffix
ayylol Dec 12, 2024
ee4a9ce
Add --crash to `not` in 4 tests
ayylol Dec 13, 2024
3047efb
Remove workflow_run check on e2e binary download
ayylol Dec 16, 2024
d38dce2
Hardcode archive name and compression/decompression commands
ayylol Dec 16, 2024
06f0abb
Replace upload_artifact input with e2e_testing_mode
ayylol Dec 16, 2024
3bb4d20
Make LIT_OPTS one line
ayylol Dec 16, 2024
3e7d549
Try to split LIT_OPTS
ayylol Dec 16, 2024
a49ec58
Revert "Try to split LIT_OPTS"
ayylol Dec 16, 2024
3951884
Formatting changes
ayylol Dec 18, 2024
cee4ea0
Add descriptions for new parameters
ayylol Dec 18, 2024
702b54a
Merge branch 'sycl' into e2e-split-ci-testing
ayylol Dec 19, 2024
2000693
Add `XFAIL run-mode` to two tests passing on `build-only`
ayylol Dec 19, 2024
457db63
Use fallback build option in `run-only`
ayylol Dec 19, 2024
7cc0042
Merge branch 'sycl' into e2e-split-ci-testing
ayylol Dec 19, 2024
dabce66
Add `XFAIL: run-mode` to one more test that can compile
ayylol Dec 19, 2024
1d12eac
Merge branch 'sycl' into e2e-split-ci-testing
ayylol Dec 20, 2024
6ee8620
Merge branch 'sycl' into e2e-split-ci-testing
ayylol Dec 20, 2024
776e5f0
Use ubuntu 24 latest drivers container for build
ayylol Dec 20, 2024
35f8e08
Merge branch 'sycl' into e2e-split-ci-testing
ayylol Dec 20, 2024
c9eb5de
Merge branch 'sycl' into e2e-split-ci-testing
ayylol Dec 20, 2024
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
54 changes: 47 additions & 7 deletions .github/workflows/sycl-linux-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,53 @@ jobs:
else
echo 'arc_tests="Matrix/"' >> "$GITHUB_OUTPUT"
fi

build_e2e_tests:
needs: [build]
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
uses: ./.github/workflows/sycl-linux-run-tests.yml
with:
name: Build e2e tests
runner: '["Linux", "build"]'
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:alldeps
image_options: -u 1001
ref: ${{ github.sha }}
merge_ref: ''
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_testing_mode: 'build-only'
run_prebuilt_e2e_tests:
needs: [build, build_e2e_tests]
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
strategy:
fail-fast: false
matrix:
include:
- name: Intel
runner: '["Linux", "gen12"]'
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
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: true
extra_lit_opts: --param gpu-intel-gen12=True
uses: ./.github/workflows/sycl-linux-run-tests.yml
with:
name: ${{ matrix.name }}
runner: ${{ matrix.runner }}
image: ${{ matrix.image }}
image_options: ${{ matrix.image_options }}
target_devices: ${{ matrix.target_devices }}
extra_lit_opts: ${{ matrix.extra_lit_opts }}
reset_intel_gpu: ${{ matrix.reset_intel_gpu }}
ref: ${{ github.sha }}
merge_ref: ''
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_testing_mode: 'run-only'

test:
needs: [build, detect_changes, determine_arc_tests]
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
Expand All @@ -90,13 +137,6 @@ jobs:
image_options: -u 1001 --device=/dev/dri --device=/dev/kfd
target_devices: ext_oneapi_hip:gpu
reset_intel_gpu: false
- name: Intel
runner: '["Linux", "gen12"]'
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
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: true
extra_lit_opts: --param gpu-intel-gen12=True
- name: E2E tests on Intel Arc A-Series Graphics
runner: '["Linux", "arc"]'
image: ghcr.io/intel/llvm/ubuntu2204_intel_drivers:latest
Expand Down
53 changes: 48 additions & 5 deletions .github/workflows/sycl-linux-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:

target_devices:
type: string
required: True
required: False
extra_cmake_args:
type: string
required: False
Expand Down Expand Up @@ -59,6 +59,22 @@ on:
default: ''
required: False

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

e2e_testing_mode:
type: string
default: 'full'
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add a description describing all the options and what each means?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, added

artifact_suffix:
type: string
default: 'default'
retention-days:
description: 'E2E binaries artifact retention period'
type: string
default: 1

reset_intel_gpu:
type: string
required: False
Expand Down Expand Up @@ -87,6 +103,7 @@ on:
- '["amdgpu"]'
- '["Linux", "arc"]'
- '["cts-cpu"]'
- '["Linux", "build"]'
image:
description: |
Use option ending with ":build" for AMDGPU, ":latest" for the rest.
Expand Down Expand Up @@ -142,6 +159,11 @@ on:
options:
- false
- true
e2e_testing_mode:
type: choice
options:
- "full"
- "build-only"

permissions:
contents: read
Expand Down Expand Up @@ -270,8 +292,19 @@ jobs:
cat /usr/local/lib/igc/IGCTAG.txt
fi

- name: Download E2E Binaries
if: inputs.e2e_binaries_artifact != ''
uses: actions/download-artifact@v4
with:
name: ${{ inputs.e2e_binaries_artifact }}
- name: Extract E2E Binaries
if: inputs.e2e_binaries_artifact != ''
run: |
mkdir build-e2e
tar -I 'zstd' -xf e2e_binaries.tar.zst -C build-e2e

- name: Deduce E2E CMake options
if: inputs.tests_selector == 'e2e'
if: inputs.tests_selector == 'e2e' && inputs.e2e_binaries_artifact == ''
id: cmake_opts
shell: bash
env:
Expand All @@ -281,14 +314,14 @@ jobs:
echo "opts=$CMAKE_EXTRA_ARGS" >> $GITHUB_OUTPUT
fi
- name: Configure E2E tests
if: inputs.tests_selector == 'e2e'
if: inputs.tests_selector == 'e2e' && inputs.e2e_binaries_artifact == ''
run: |
cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DSYCL_TEST_E2E_TARGETS="${{ inputs.target_devices }}" -DCMAKE_CXX_COMPILER="$(which clang++)" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ steps.cmake_opts.outputs.opts }}
cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DCMAKE_CXX_COMPILER="$(which clang++)" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ steps.cmake_opts.outputs.opts }}
- name: SYCL End-to-end tests
shell: bash {0}
if: inputs.tests_selector == 'e2e'
env:
LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests ${{ inputs.extra_lit_opts }}
LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param test-mode=${{ inputs.e2e_testing_mode }} --param sycl_devices=${{ inputs.target_devices }} ${{ inputs.extra_lit_opts }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it work when target_devices is unset?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, It's set to all by default if this parameter is empty, and on build-only we change that to an empty list.

run: |
ninja -C build-e2e check-sycl-e2e > e2e.log 2>&1
exit_code=$?
Expand Down Expand Up @@ -375,3 +408,13 @@ jobs:
grep 'exit code: [^0]' -r logs >> $GITHUB_STEP_SUMMARY

exit $ret
- name: Pack e2e binaries
if: ${{ always() && !cancelled() && inputs.e2e_testing_mode == 'build-only'}}
run: tar -I 'zstd -9' -cf e2e_binaries.tar.zst -C ./build-e2e .
- name: Upload e2e binaries
if: ${{ always() && !cancelled() && inputs.e2e_testing_mode == 'build-only'}}
uses: actions/upload-artifact@v4
with:
name: sycl_e2e_bin_${{ inputs.artifact_suffix }}
path: e2e_binaries.tar.zst
retention-days: ${{ inputs.retention-days }}
1 change: 1 addition & 0 deletions sycl/test-e2e/AOT/cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//===---------------------------------------------------------------------===//

// REQUIRES: opencl-aot, cpu
// REQUIRES: build-and-run-mode
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reason behind this extra requirement?

If we have any limitations now as to what we can do in our tests, then they should be documented somewhere.
Also, will we still continue to have build-and-run configuration somewhere in our pre-commit? I'm just double-checking that we are not disabling those tests forever.

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 the extra requirements in this pr fell into these camps:

  • The tests inside the Adapter folder were testing sycl-ls, the RUN: lines there don't use %{run} or %{run-unfiltered-devices} so they were being ran on the build system. We could wrap these lines in %if run-mode but i figured it would just be cleaner to mark them as requires build-and-run, since they have no lines that compile to begin with
  • The majority of the other tests were AOT cpu tests that fail on the run-side. These fail because when compiling the AOT tests we target the host machine's cpu architecture, which may be different than that of the running machine. So to get these tests running on separate machines we would need to restructure them to use the -Xsycl-target-backend --march= and then on the running side make sure we are executing the appropriate binary based on the cpu's architecture.
  • the tests in OptionalKernelFeatures and SpecConstants that were changed failed on the build side due to member functions not being found. I'm honestly not too sure why/what the fix should be for these.

Here's a run of the CI before adding the extra requirements: https://github.com/intel/llvm/actions/runs/12262397938

As for the comment about the tests being disabled forever, I am working on #16306 to avoid this. The idea there being that when in run-only mode if we have a test marked as REQUIRES: build-and-run we know we will not have the binary available from the build-only step, so we should fully run the test, including any compilation steps.

Should also point out Andrei's comment on that pr #16306 (comment), Which I think explains the current plan in regards to this extra mark-up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the --param fallback-to-build-if-requires-build-and-run=True lit option to the run-only side of the CI, so now we arent losing coverage of the tests marked as REQUIRES: build-and-run-mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@AlexeySachkov Hey, just wanted to check if your concerns with the documentation + accidentally disabling tests were addressed. With the documentation pr #16409, and the use of the fallback option.

With the regards to the fallback option for running tests that require build-and-run, I've confirmed that on the split run-only side we are now running the tests marked with REQUIRES: build-and-run-mode that are able to run on gen12. (For example the KernelAndProgram/test_cache_jit_aot.cpp test which is marked this way ran, and passed there)


// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/Inputs/aot.cpp -o %t.out
// RUN: %{run} %t.out
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/AOT/double.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// using fp64 can be compiled AOT.

// REQUIRES: ocloc, opencl-aot, any-device-is-cpu
// REQUIRES: build-and-run-mode
// 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
// RUN: %if cpu %{ %{run} %t.x86.out %}
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/AOT/half.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// using fp16 can be compiled AOT.

// REQUIRES: ocloc, opencl-aot, any-device-is-cpu
// REQUIRES: build-and-run-mode
// 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
// RUN: %if cpu %{ %{run} %t.x86.out %}
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Adapters/sycl-ls-gpu-default-any.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: gpu
// REQUIRES: build-and-run-mode

// TODO: Remove unsetting SYCL_DEVICE_FILTER when feature is dropped
// RUN: env --unset=SYCL_DEVICE_FILTER --unset=ONEAPI_DEVICE_SELECTOR sycl-ls --verbose >%t.default.out
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: gpu, level-zero
// REQUIRES: build-and-run-mode

// TODO: Remove unsetting SYCL_DEVICE_FILTER when feature is dropped
// RUN: env --unset=SYCL_DEVICE_FILTER --unset=ONEAPI_DEVICE_SELECTOR sycl-ls --verbose >%t.default.out
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Adapters/sycl-ls-gpu-level-zero.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: gpu, level_zero
// REQUIRES: build-and-run-mode

// RUN: sycl-ls --verbose >%t.default.out
// RUN: FileCheck %s --check-prefixes=CHECK-GPU-BUILTIN,CHECK-GPU-CUSTOM --input-file %t.default.out
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Adapters/sycl-ls-gpu-opencl.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: gpu, opencl
// REQUIRES: build-and-run-mode

// RUN: env ONEAPI_DEVICE_SELECTOR="opencl:*" sycl-ls --verbose >%t.opencl.out
// RUN: FileCheck %s --check-prefixes=CHECK-GPU-BUILTIN,CHECK-GPU-CUSTOM --input-file %t.opencl.out
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Adapters/sycl-ls-uuid-subdevs.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* Test to check that sycl-ls is outputting UUID and number of sub and sub-sub
// REQUIRES: build-and-run-mode
* devices. */
// REQUIRES: gpu, level_zero

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// RUN: %{run} not %t3.out 2>&1 | FileCheck %s

// FIXME: There's an issue in gfx driver, so this test pending here.
// XFAIL: *
// XFAIL: run-mode

#include <sycl/detail/core.hpp>
#include <sycl/ext/oneapi/experimental/address_cast.hpp>
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/BFloat16/bfloat16_example_aot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
///

// REQUIRES: opencl-aot, ocloc, gpu-intel-gen12, any-device-is-cpu
// REQUIRES: build-and-run-mode

// RUN: %clangxx -fsycl -fsycl-targets=spir64 %s -o %t.out
// RUN: %{run} %t.out
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/BFloat16/bfloat16_example_aot_cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
///

// REQUIRES: opencl-aot, ocloc, gpu-intel-gen12, any-device-is-cpu
// REQUIRES: build-and-run-mode

// RUN: %clangxx -fsycl -fsycl-targets=spir64,spir64_gen -Xsycl-target-backend=spir64_gen "-device dg1" %s -o %t.out
// RUN: %if cpu %{ %{run} %t.out %}
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Compression/compression_aot.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// End-to-End test for testing device image compression in AOT.
// REQUIRES: zstd, opencl-aot, cpu
// REQUIRES: build-and-run-mode

// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %O0 --offload-compress --offload-compression-level=3 %S/Inputs/single_kernel.cpp -o %t_compress.out
// RUN: %{run} %t_compress.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// seperatly compile and link device images.

// REQUIRES: zstd, opencl-aot, cpu, linux
// REQUIRES: build-and-run-mode

////////////////////// Compile device images
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fsycl-host-compiler=clang++ -fsycl-host-compiler-options='-std=c++17 -Wno-attributes -Wno-deprecated-declarations -fPIC -DENABLE_KERNEL1' -DENABLE_KERNEL1 -c %s -o %t_kernel1_aot.o
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: opencl-aot, cpu
// REQUIRES: build-and-run-mode
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %s -o %t.out
// RUN: %{run} %t.out

Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/DeviceCodeSplit/aot-cpu.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: opencl-aot, cpu
// REQUIRES: build-and-run-mode

// RUN: %clangxx -fsycl -fsycl-device-code-split=per_source -fsycl-targets=spir64_x86_64 -I %S/Inputs -o %t.out %S/split-per-source-main.cpp %S/Inputs/split-per-source-second-file.cpp \
// RUN: -fsycl-dead-args-optimization
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/DeviceLib/assert-aot.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: opencl-aot, cpu, linux
// REQUIRES: build-and-run-mode

// RUN: %clangxx -DSYCL_FALLBACK_ASSERT=1 -fsycl -fsycl-targets=spir64_x86_64 %S/assert.cpp -o %t.aot.out
// RUN: env EXPECTED_SIGNAL=SIGABRT SHOULD_CRASH=1 %{run} %t.aot.out 2>&1 | FileCheck %S/assert.cpp --check-prefixes=CHECK-MESSAGE
1 change: 1 addition & 0 deletions sycl/test-e2e/DeviceLib/cmath-aot.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: opencl-aot, cpu
// REQUIRES: build-and-run-mode
// UNSUPPORTED: windows

// DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-fast-math%} %else %{-fno-fast-math%}
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/NewOffloadDriver/aot-cpu.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// REQUIRES: opencl-aot, cpu
// REQUIRES: build-and-run-mode

// Test with `--offload-new-driver`
// RUN: %clangxx -fsycl -fsycl-device-code-split=per_source -fsycl-targets=spir64_x86_64 -I %S/Inputs -o %t.out %S/split-per-source-main.cpp %S/Inputs/split-per-source-second-file.cpp \
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/NewOffloadDriver/cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//===---------------------------------------------------------------------===//

// REQUIRES: opencl-aot, cpu
// REQUIRES: build-and-run-mode

// Test with `--offload-new-driver`
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 --offload-new-driver %S/Inputs/aot.cpp -o %t.out
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/NonUniformGroups/ballot_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %}
// RUN: %if cpu %{ %{run} %t.x86.out %}
//
// REQUIRES: build-and-run-mode
// REQUIRES: cpu || gpu
// UNSUPPORTED: hip

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %}
// RUN: %if cpu %{ %{run} %t.x86.out %}
//
// REQUIRES: build-and-run-mode
// REQUIRES: cpu || gpu
// REQUIRES: sg-32
// REQUIRES: aspect-ext_oneapi_ballot_group
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %}
// RUN: %if cpu %{ %{run} %t.x86.out %}
//
// REQUIRES: build-and-run-mode
// REQUIRES: cpu || gpu
// UNSUPPORTED: hip
// REQUIRES: sg-32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fsycl-device-code-split=per_kernel -o %t.x86.out %s %}
// RUN: %if cpu %{ %{run} %t.x86.out %}
//
// REQUIRES: build-and-run-mode
// REQUIRES: cpu || gpu
// REQUIRES: sg-32
// REQUIRES: aspect-ext_oneapi_fixed_size_group
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/NonUniformGroups/opportunistic_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %}
// RUN: %if cpu %{ %{run} %t.x86.out %}
//
// REQUIRES: build-and-run-mode
// REQUIRES: cpu || gpu
// UNSUPPORTED: hip

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -o %t.x86.out %s %}
// RUN: %if cpu %{ %{run} %t.x86.out %}
//
// REQUIRES: build-and-run-mode
// REQUIRES: cpu || gpu
// REQUIRES: sg-32
// REQUIRES: aspect-ext_oneapi_opportunistic_group
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/NonUniformGroups/tangle_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fno-sycl-early-optimizations -o %t.x86.out %s %}
// RUN: %if cpu %{ %{run} %t.x86.out %}
//
// REQUIRES: build-and-run-mode
// REQUIRES: cpu || gpu
// UNSUPPORTED: cuda || hip

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// RUN: %if any-device-is-cpu && opencl-aot %{ %clangxx -fsycl -fsycl-targets=spir64_x86_64 -fno-sycl-early-optimizations -o %t.x86.out %s %}
// RUN: %if cpu %{ %{run} %t.x86.out %}
//
// REQUIRES: build-and-run-mode
// REQUIRES: cpu || gpu
// REQUIRES: sg-32
// REQUIRES: aspect-ext_oneapi_tangle_group
Expand Down
20 changes: 10 additions & 10 deletions sycl/test-e2e/OneapiDeviceSelector/illegal_input.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

// RUN: %clangxx -fsycl -fsycl-targets=%{sycl_triple} %S/Inputs/trivial.cpp -o %t.out
// RUN: not env ONEAPI_DEVICE_SELECTOR="macaroni:*" %{run-unfiltered-devices} %t.out
// RUN: not env ONEAPI_DEVICE_SELECTOR=":" %{run-unfiltered-devices} %t.out
// RUN: not env ONEAPI_DEVICE_SELECTOR="level_zero:." %{run-unfiltered-devices} %t.out
// RUN: not env ONEAPI_DEVICE_SELECTOR="macaroni_level_zero:." %{run-unfiltered-devices} %t.out
// RUN: not env ONEAPI_DEVICE_SELECTOR="level_zero:macaroni_gpu" %{run-unfiltered-devices} %t.out
// RUN: not env ONEAPI_DEVICE_SELECTOR="level_zero:0..0" %{run-unfiltered-devices} %t.out
// RUN: not env ONEAPI_DEVICE_SELECTOR="level_zero:" %{run-unfiltered-devices} %t.out
// RUN: not env ONEAPI_DEVICE_SELECTOR="level_zero:::gpu" %{run-unfiltered-devices} %t.out
// RUN: not env ONEAPI_DEVICE_SELECTOR="level_zero:.1" %{run-unfiltered-devices} %t.out
// RUN: not env ONEAPI_DEVICE_SELECTOR="" %{run-unfiltered-devices} %t.out
// RUN: not --crash env ONEAPI_DEVICE_SELECTOR="macaroni:*" %{run-unfiltered-devices} %t.out
Copy link
Contributor

Choose a reason for hiding this comment

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

sorry what does --crash do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The workaround for the lit hang that I was experiencing involved calling the _runShTest function with the useExternalSh parameter set to true (previously this was false). When lit uses the internal shell it has some special logic for handling the not command which I think made it unnecessary to add the --crash flag here. However this failed after adding the workaround because the underlying executable that was called crashed instead of exiting normally with a non-zero exit code, and the not command in the external shell needed this flag to properly react to that crash.

I also ran this test using the internal shell + the --crash flag and it works fine too.

Copy link
Contributor

Choose a reason for hiding this comment

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

ah ok thanks for the explanation, i thought it was running bash not here and i couldn't find any info about that arg, but we're actually calling an llvm utility also named not, where the --crash argument makes it return true if the thing crashes. the more you know.

// RUN: not --crash env ONEAPI_DEVICE_SELECTOR=":" %{run-unfiltered-devices} %t.out
// RUN: not --crash env ONEAPI_DEVICE_SELECTOR="level_zero:." %{run-unfiltered-devices} %t.out
// RUN: not --crash env ONEAPI_DEVICE_SELECTOR="macaroni_level_zero:." %{run-unfiltered-devices} %t.out
// RUN: not --crash env ONEAPI_DEVICE_SELECTOR="level_zero:macaroni_gpu" %{run-unfiltered-devices} %t.out
// RUN: not --crash env ONEAPI_DEVICE_SELECTOR="level_zero:0..0" %{run-unfiltered-devices} %t.out
// RUN: not --crash env ONEAPI_DEVICE_SELECTOR="level_zero:" %{run-unfiltered-devices} %t.out
// RUN: not --crash env ONEAPI_DEVICE_SELECTOR="level_zero:::gpu" %{run-unfiltered-devices} %t.out
// RUN: not --crash env ONEAPI_DEVICE_SELECTOR="level_zero:.1" %{run-unfiltered-devices} %t.out
// RUN: not --crash env ONEAPI_DEVICE_SELECTOR="" %{run-unfiltered-devices} %t.out

// Calling ONEAPI_DEVICE_SELECTOR with an illegal input should result in an
// error.
Loading
Loading