diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 94b16b0dffb4a..8baa70e8b878b 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -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/ubuntu2404_intel_drivers:latest + 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/ubuntu2404_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: --param fallback-to-build-if-requires-build-and-run=True ${{ 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' }} @@ -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/ubuntu2404_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/ubuntu2404_intel_drivers:latest diff --git a/.github/workflows/sycl-linux-run-tests.yml b/.github/workflows/sycl-linux-run-tests.yml index 73b2a1f336db7..4eff7a47c6c15 100644 --- a/.github/workflows/sycl-linux-run-tests.yml +++ b/.github/workflows/sycl-linux-run-tests.yml @@ -19,7 +19,7 @@ on: target_devices: type: string - required: True + required: False extra_cmake_args: type: string required: False @@ -59,6 +59,30 @@ on: default: '' required: False + e2e_binaries_artifact: + description: | + By setting this the E2E binaries folder will not be created, rather it + will be downloaded and extracted from the specified artifact. When + running tests in `run-only` mode this must be provided. + type: string + default: '' + required: False + e2e_testing_mode: + description: | + Testing mode to run E2E tests in, can be either `full`, `build-only` + or `run-only`. In `build-only` mode an artifact of the E2E binaries + will be uploaded. + type: string + default: 'full' + artifact_suffix: + description: 'Suffix for E2E binaries artifact that is output when in `build-only`.' + type: string + default: 'default' + retention-days: + description: 'E2E binaries artifact retention period.' + type: string + default: 1 + reset_intel_gpu: type: string required: False @@ -87,6 +111,7 @@ on: - '["amdgpu"]' - '["Linux", "arc"]' - '["cts-cpu"]' + - '["Linux", "build"]' image: description: | Use option ending with ":build" for AMDGPU, ":latest" for the rest. @@ -142,6 +167,11 @@ on: options: - false - true + e2e_testing_mode: + type: choice + options: + - "full" + - "build-only" permissions: contents: read @@ -270,8 +300,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: @@ -281,14 +322,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 }} run: | ninja -C build-e2e check-sycl-e2e > e2e.log 2>&1 exit_code=$? @@ -375,3 +416,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 }} diff --git a/sycl/test-e2e/AOT/cpu.cpp b/sycl/test-e2e/AOT/cpu.cpp index f0c71be2d481e..e7bedc04b07ba 100644 --- a/sycl/test-e2e/AOT/cpu.cpp +++ b/sycl/test-e2e/AOT/cpu.cpp @@ -7,6 +7,7 @@ //===---------------------------------------------------------------------===// // REQUIRES: opencl-aot, cpu +// REQUIRES: build-and-run-mode // RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/Inputs/aot.cpp -o %t.out // RUN: %{run} %t.out diff --git a/sycl/test-e2e/AOT/double.cpp b/sycl/test-e2e/AOT/double.cpp index ead41bfc8c741..4d48f5c7b57ec 100644 --- a/sycl/test-e2e/AOT/double.cpp +++ b/sycl/test-e2e/AOT/double.cpp @@ -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 %} diff --git a/sycl/test-e2e/AOT/half.cpp b/sycl/test-e2e/AOT/half.cpp index e843ee65bbeef..5711b21735f72 100644 --- a/sycl/test-e2e/AOT/half.cpp +++ b/sycl/test-e2e/AOT/half.cpp @@ -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 %} diff --git a/sycl/test-e2e/Adapters/sycl-ls-gpu-default-any.cpp b/sycl/test-e2e/Adapters/sycl-ls-gpu-default-any.cpp index 046a41494370b..1c90ea9f1e32f 100644 --- a/sycl/test-e2e/Adapters/sycl-ls-gpu-default-any.cpp +++ b/sycl/test-e2e/Adapters/sycl-ls-gpu-default-any.cpp @@ -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 diff --git a/sycl/test-e2e/Adapters/sycl-ls-gpu-default-level-zero.cpp b/sycl/test-e2e/Adapters/sycl-ls-gpu-default-level-zero.cpp index 6f144553fff7b..cd6ece996d9f8 100644 --- a/sycl/test-e2e/Adapters/sycl-ls-gpu-default-level-zero.cpp +++ b/sycl/test-e2e/Adapters/sycl-ls-gpu-default-level-zero.cpp @@ -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 diff --git a/sycl/test-e2e/Adapters/sycl-ls-gpu-level-zero.cpp b/sycl/test-e2e/Adapters/sycl-ls-gpu-level-zero.cpp index 36eb621e923a6..f20ea34182833 100644 --- a/sycl/test-e2e/Adapters/sycl-ls-gpu-level-zero.cpp +++ b/sycl/test-e2e/Adapters/sycl-ls-gpu-level-zero.cpp @@ -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 diff --git a/sycl/test-e2e/Adapters/sycl-ls-gpu-opencl.cpp b/sycl/test-e2e/Adapters/sycl-ls-gpu-opencl.cpp index fa764d0629a0f..fda84100fecd6 100644 --- a/sycl/test-e2e/Adapters/sycl-ls-gpu-opencl.cpp +++ b/sycl/test-e2e/Adapters/sycl-ls-gpu-opencl.cpp @@ -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 diff --git a/sycl/test-e2e/Adapters/sycl-ls-uuid-subdevs.cpp b/sycl/test-e2e/Adapters/sycl-ls-uuid-subdevs.cpp index b7f83f8f337cd..f5d155d15ee5b 100644 --- a/sycl/test-e2e/Adapters/sycl-ls-uuid-subdevs.cpp +++ b/sycl/test-e2e/Adapters/sycl-ls-uuid-subdevs.cpp @@ -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 diff --git a/sycl/test-e2e/AddressSanitizer/nullpointer/private_nullptr.cpp b/sycl/test-e2e/AddressSanitizer/nullpointer/private_nullptr.cpp index 27b4b5a6fab17..fd7cae43dd3ea 100644 --- a/sycl/test-e2e/AddressSanitizer/nullpointer/private_nullptr.cpp +++ b/sycl/test-e2e/AddressSanitizer/nullpointer/private_nullptr.cpp @@ -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 #include diff --git a/sycl/test-e2e/BFloat16/bfloat16_example_aot.cpp b/sycl/test-e2e/BFloat16/bfloat16_example_aot.cpp index 8337716c3191e..32c6c3aae8f06 100644 --- a/sycl/test-e2e/BFloat16/bfloat16_example_aot.cpp +++ b/sycl/test-e2e/BFloat16/bfloat16_example_aot.cpp @@ -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 diff --git a/sycl/test-e2e/BFloat16/bfloat16_example_aot_cpu.cpp b/sycl/test-e2e/BFloat16/bfloat16_example_aot_cpu.cpp index 2f6d893768c4e..9231a62428272 100644 --- a/sycl/test-e2e/BFloat16/bfloat16_example_aot_cpu.cpp +++ b/sycl/test-e2e/BFloat16/bfloat16_example_aot_cpu.cpp @@ -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 %} diff --git a/sycl/test-e2e/Compression/compression_aot.cpp b/sycl/test-e2e/Compression/compression_aot.cpp index b8293f1c79351..ba95974fde781 100644 --- a/sycl/test-e2e/Compression/compression_aot.cpp +++ b/sycl/test-e2e/Compression/compression_aot.cpp @@ -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 diff --git a/sycl/test-e2e/Compression/compression_separate_compile.cpp b/sycl/test-e2e/Compression/compression_separate_compile.cpp index dab17e3506b4e..afbe442230e29 100644 --- a/sycl/test-e2e/Compression/compression_separate_compile.cpp +++ b/sycl/test-e2e/Compression/compression_separate_compile.cpp @@ -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 diff --git a/sycl/test-e2e/DeviceArchitecture/device_architecture_on_device_aot.cpp b/sycl/test-e2e/DeviceArchitecture/device_architecture_on_device_aot.cpp index a62ae965683ae..1d4c41f117136 100644 --- a/sycl/test-e2e/DeviceArchitecture/device_architecture_on_device_aot.cpp +++ b/sycl/test-e2e/DeviceArchitecture/device_architecture_on_device_aot.cpp @@ -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 diff --git a/sycl/test-e2e/DeviceCodeSplit/aot-cpu.cpp b/sycl/test-e2e/DeviceCodeSplit/aot-cpu.cpp index d2937b796fe63..319c69af0faef 100644 --- a/sycl/test-e2e/DeviceCodeSplit/aot-cpu.cpp +++ b/sycl/test-e2e/DeviceCodeSplit/aot-cpu.cpp @@ -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 diff --git a/sycl/test-e2e/DeviceLib/assert-aot.cpp b/sycl/test-e2e/DeviceLib/assert-aot.cpp index ccff887e80adf..f5c8c61f07d78 100644 --- a/sycl/test-e2e/DeviceLib/assert-aot.cpp +++ b/sycl/test-e2e/DeviceLib/assert-aot.cpp @@ -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 diff --git a/sycl/test-e2e/DeviceLib/cmath-aot.cpp b/sycl/test-e2e/DeviceLib/cmath-aot.cpp index bb9e201de9282..c9897f652f034 100644 --- a/sycl/test-e2e/DeviceLib/cmath-aot.cpp +++ b/sycl/test-e2e/DeviceLib/cmath-aot.cpp @@ -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%} diff --git a/sycl/test-e2e/Matrix/joint_matrix_bf16_fill_k_cache_arg_dim.cpp b/sycl/test-e2e/Matrix/joint_matrix_bf16_fill_k_cache_arg_dim.cpp index 8d26fd5e5a432..bd30efe1b217c 100644 --- a/sycl/test-e2e/Matrix/joint_matrix_bf16_fill_k_cache_arg_dim.cpp +++ b/sycl/test-e2e/Matrix/joint_matrix_bf16_fill_k_cache_arg_dim.cpp @@ -14,7 +14,7 @@ // Waiting for the commit in IGC to be pulled into the driver to resolve the // test. -// XFAIL: !igc-dev || gpu-intel-dg2 +// XFAIL: (!igc-dev || gpu-intel-dg2) && run-mode // XFAIL-TRACKER: GSD-10510 #include "common.hpp" diff --git a/sycl/test-e2e/Matrix/joint_matrix_bf16_fill_k_cache_runtime_dim.cpp b/sycl/test-e2e/Matrix/joint_matrix_bf16_fill_k_cache_runtime_dim.cpp index 4e790109eaff2..ff30d4c40f6a7 100644 --- a/sycl/test-e2e/Matrix/joint_matrix_bf16_fill_k_cache_runtime_dim.cpp +++ b/sycl/test-e2e/Matrix/joint_matrix_bf16_fill_k_cache_runtime_dim.cpp @@ -14,7 +14,7 @@ // Waiting for the commit in IGC to be pulled into the driver to resolve the // test. -// XFAIL: !igc-dev || gpu-intel-dg2 +// XFAIL: (!igc-dev || gpu-intel-dg2) && run-mode // XFAIL-TRACKER: GSD-10510 #include "common.hpp" diff --git a/sycl/test-e2e/NewOffloadDriver/aot-cpu.cpp b/sycl/test-e2e/NewOffloadDriver/aot-cpu.cpp index 585b368641d6e..0016e8498bd9d 100644 --- a/sycl/test-e2e/NewOffloadDriver/aot-cpu.cpp +++ b/sycl/test-e2e/NewOffloadDriver/aot-cpu.cpp @@ -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 \ diff --git a/sycl/test-e2e/NewOffloadDriver/cpu.cpp b/sycl/test-e2e/NewOffloadDriver/cpu.cpp index ef93d69f8693b..943ea71c3386e 100644 --- a/sycl/test-e2e/NewOffloadDriver/cpu.cpp +++ b/sycl/test-e2e/NewOffloadDriver/cpu.cpp @@ -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 diff --git a/sycl/test-e2e/NonUniformGroups/ballot_group.cpp b/sycl/test-e2e/NonUniformGroups/ballot_group.cpp index f24bffb81526a..1532c54879ecc 100644 --- a/sycl/test-e2e/NonUniformGroups/ballot_group.cpp +++ b/sycl/test-e2e/NonUniformGroups/ballot_group.cpp @@ -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 diff --git a/sycl/test-e2e/NonUniformGroups/ballot_group_algorithms.cpp b/sycl/test-e2e/NonUniformGroups/ballot_group_algorithms.cpp index 8f6b6a8f17197..14e976edc8492 100644 --- a/sycl/test-e2e/NonUniformGroups/ballot_group_algorithms.cpp +++ b/sycl/test-e2e/NonUniformGroups/ballot_group_algorithms.cpp @@ -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 diff --git a/sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp b/sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp index 939be57799dd4..5d2b98b58ddc2 100644 --- a/sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp +++ b/sycl/test-e2e/NonUniformGroups/fixed_size_group.cpp @@ -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 diff --git a/sycl/test-e2e/NonUniformGroups/fixed_size_group_algorithms.cpp b/sycl/test-e2e/NonUniformGroups/fixed_size_group_algorithms.cpp index c1c172c4189c3..dfed10e9f587e 100644 --- a/sycl/test-e2e/NonUniformGroups/fixed_size_group_algorithms.cpp +++ b/sycl/test-e2e/NonUniformGroups/fixed_size_group_algorithms.cpp @@ -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 diff --git a/sycl/test-e2e/NonUniformGroups/opportunistic_group.cpp b/sycl/test-e2e/NonUniformGroups/opportunistic_group.cpp index 18d42487b7768..2069113c3f939 100644 --- a/sycl/test-e2e/NonUniformGroups/opportunistic_group.cpp +++ b/sycl/test-e2e/NonUniformGroups/opportunistic_group.cpp @@ -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 diff --git a/sycl/test-e2e/NonUniformGroups/opportunistic_group_algorithms.cpp b/sycl/test-e2e/NonUniformGroups/opportunistic_group_algorithms.cpp index af4d45cee862f..8e7626650e01c 100644 --- a/sycl/test-e2e/NonUniformGroups/opportunistic_group_algorithms.cpp +++ b/sycl/test-e2e/NonUniformGroups/opportunistic_group_algorithms.cpp @@ -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 diff --git a/sycl/test-e2e/NonUniformGroups/tangle_group.cpp b/sycl/test-e2e/NonUniformGroups/tangle_group.cpp index 44191955048f3..686d1b34c6185 100644 --- a/sycl/test-e2e/NonUniformGroups/tangle_group.cpp +++ b/sycl/test-e2e/NonUniformGroups/tangle_group.cpp @@ -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 diff --git a/sycl/test-e2e/NonUniformGroups/tangle_group_algorithms.cpp b/sycl/test-e2e/NonUniformGroups/tangle_group_algorithms.cpp index 7033c4c9e4df5..51070ed1731e4 100644 --- a/sycl/test-e2e/NonUniformGroups/tangle_group_algorithms.cpp +++ b/sycl/test-e2e/NonUniformGroups/tangle_group_algorithms.cpp @@ -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 diff --git a/sycl/test-e2e/OneapiDeviceSelector/illegal_input.cpp b/sycl/test-e2e/OneapiDeviceSelector/illegal_input.cpp index 79675bbac23cf..35430c7b12ff6 100644 --- a/sycl/test-e2e/OneapiDeviceSelector/illegal_input.cpp +++ b/sycl/test-e2e/OneapiDeviceSelector/illegal_input.cpp @@ -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 +// 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. diff --git a/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_spir64.cpp b/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_spir64.cpp index 465a79056906a..fcf6affb809fb 100644 --- a/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_spir64.cpp +++ b/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_spir64.cpp @@ -1,4 +1,5 @@ // REQUIRES: cuda, opencl, gpu, cpu +// REQUIRES: build-and-run-mode // RUN: %clangxx -fsycl -fsycl-targets=spir64 %S/Inputs/is_compatible_with_env.cpp -o %t.out diff --git a/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_spir64_fpga.cpp b/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_spir64_fpga.cpp index 57366482e7082..1372c352c09ea 100644 --- a/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_spir64_fpga.cpp +++ b/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_spir64_fpga.cpp @@ -1,4 +1,5 @@ // REQUIRES: opencl-aot, accelerator, gpu, cpu +// REQUIRES: build-and-run-mode // RUN: %clangxx -fsycl -fsycl-targets=spir64_fpga %S/Inputs/is_compatible_with_env.cpp -o %t.out diff --git a/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_spir64_gen.cpp b/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_spir64_gen.cpp index 5adb27e0ae697..c6a01b3a6dc18 100644 --- a/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_spir64_gen.cpp +++ b/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_spir64_gen.cpp @@ -1,4 +1,5 @@ // REQUIRES: ocloc, gpu, level_zero, cpu +// REQUIRES: build-and-run-mode // RUN: %clangxx -fsycl -fsycl-targets=spir64_gen -Xsycl-target-backend "-device *" %S/Inputs/is_compatible_with_env.cpp -o %t.out diff --git a/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_spir64_x86_64.cpp b/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_spir64_x86_64.cpp index 0a6f2c39df8af..5de21b8984d71 100644 --- a/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_spir64_x86_64.cpp +++ b/sycl/test-e2e/OptionalKernelFeatures/is_compatible/is_compatible_spir64_x86_64.cpp @@ -1,4 +1,5 @@ // REQUIRES: opencl-aot, cpu, gpu, level_zero +// REQUIRES: build-and-run-mode // RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/Inputs/is_compatible_with_env.cpp -o %t.out diff --git a/sycl/test-e2e/ProgramManager/multi_device_bundle/device_libs_and_caching.cpp b/sycl/test-e2e/ProgramManager/multi_device_bundle/device_libs_and_caching.cpp index d596518165762..1534b2330f552 100644 --- a/sycl/test-e2e/ProgramManager/multi_device_bundle/device_libs_and_caching.cpp +++ b/sycl/test-e2e/ProgramManager/multi_device_bundle/device_libs_and_caching.cpp @@ -1,4 +1,5 @@ // REQUIRES: ocloc && gpu && linux && (opencl || level_zero) +// REQUIRES: build-and-run-mode // Test to check several use cases for multi-device kernel bundles. // Test covers AOT and JIT cases. Kernel is using some math functions to enforce diff --git a/sycl/test-e2e/SpecConstants/2020/native_specialization_constant.cpp b/sycl/test-e2e/SpecConstants/2020/native_specialization_constant.cpp index 170e0aad6b33f..c15c4ba892ed7 100644 --- a/sycl/test-e2e/SpecConstants/2020/native_specialization_constant.cpp +++ b/sycl/test-e2e/SpecConstants/2020/native_specialization_constant.cpp @@ -4,6 +4,7 @@ // FIXME: This set is never satisfied all at once in our infrastructure. // REQUIRES: opencl, level-zero, cpu, gpu, opencl-aot, ocloc +// REQUIRES: build-and-run-mode // RUN: %clangxx -fsycl -DJIT %s -o %t.out // RUN: %{run} %t.out diff --git a/sycl/test-e2e/SpecConstants/2020/non_native/SpecConstBuffer.cpp b/sycl/test-e2e/SpecConstants/2020/non_native/SpecConstBuffer.cpp index 3ee1d4bd2490b..bc7145049ddcb 100644 --- a/sycl/test-e2e/SpecConstants/2020/non_native/SpecConstBuffer.cpp +++ b/sycl/test-e2e/SpecConstants/2020/non_native/SpecConstBuffer.cpp @@ -1,4 +1,5 @@ // REQUIRES: opencl-aot, cpu +// REQUIRES: build-and-run-mode // RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/Inputs/common.cpp -o %t.out \ // RUN: -fsycl-dead-args-optimization diff --git a/sycl/test-e2e/SpecConstants/2020/non_native/cpu.cpp b/sycl/test-e2e/SpecConstants/2020/non_native/cpu.cpp index 8453a6556ffec..f6b7b836e873c 100644 --- a/sycl/test-e2e/SpecConstants/2020/non_native/cpu.cpp +++ b/sycl/test-e2e/SpecConstants/2020/non_native/cpu.cpp @@ -1,4 +1,5 @@ // REQUIRES: opencl-aot, cpu +// REQUIRES: build-and-run-mode // RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %S/Inputs/common.cpp -o %t.out \ // RUN: -fsycl-dead-args-optimization diff --git a/sycl/test-e2e/Tracing/usm/queue_copy_released_pointer.cpp b/sycl/test-e2e/Tracing/usm/queue_copy_released_pointer.cpp index 9585a9dc485ed..a37e5b8f4238c 100644 --- a/sycl/test-e2e/Tracing/usm/queue_copy_released_pointer.cpp +++ b/sycl/test-e2e/Tracing/usm/queue_copy_released_pointer.cpp @@ -1,6 +1,6 @@ // UNSUPPORTED: windows || hip_amd // RUN: %{build} -o %t.out -// RUN: not env SYCL_TRACE_TERMINATE_ON_WARNING=1 %{run} sycl-trace --verify %t.out | FileCheck %s +// RUN: not --crash env SYCL_TRACE_TERMINATE_ON_WARNING=1 %{run} sycl-trace --verify %t.out | FileCheck %s // Test parameter analysis of USM function diff --git a/sycl/test-e2e/Tracing/usm/queue_single_task_nullptr.cpp b/sycl/test-e2e/Tracing/usm/queue_single_task_nullptr.cpp index 6d19f88dd5487..4c4299dd93d8e 100644 --- a/sycl/test-e2e/Tracing/usm/queue_single_task_nullptr.cpp +++ b/sycl/test-e2e/Tracing/usm/queue_single_task_nullptr.cpp @@ -1,6 +1,6 @@ // UNSUPPORTED: windows || hip_amd // RUN: %{build} -o %t.out -// RUN: not env SYCL_TRACE_TERMINATE_ON_WARNING=1 %{run} sycl-trace --verify %t.out | FileCheck %s +// RUN: not --crash env SYCL_TRACE_TERMINATE_ON_WARNING=1 %{run} sycl-trace --verify %t.out | FileCheck %s // Test parameter analysis of USM usage diff --git a/sycl/test-e2e/Tracing/usm/queue_single_task_released_pointer.cpp b/sycl/test-e2e/Tracing/usm/queue_single_task_released_pointer.cpp index f87717c8efc28..61e27b7927f7b 100644 --- a/sycl/test-e2e/Tracing/usm/queue_single_task_released_pointer.cpp +++ b/sycl/test-e2e/Tracing/usm/queue_single_task_released_pointer.cpp @@ -1,6 +1,6 @@ // UNSUPPORTED: windows || hip_amd // RUN: %{build} -o %t.out -// RUN: not env SYCL_TRACE_TERMINATE_ON_WARNING=1 %{run} sycl-trace --verify %t.out | FileCheck %s +// RUN: not --crash env SYCL_TRACE_TERMINATE_ON_WARNING=1 %{run} sycl-trace --verify %t.out | FileCheck %s // Test parameter analysis of USM usage diff --git a/sycl/test-e2e/format.py b/sycl/test-e2e/format.py index 74573007a681e..a69810145507d 100644 --- a/sycl/test-e2e/format.py +++ b/sycl/test-e2e/format.py @@ -248,7 +248,7 @@ def get_extra_env(sycl_devices): (is_run_line and test.config.test_mode == "build-only") or (not is_run_line and test.config.test_mode == "run-only") ): - directive.command = "" + continue if "%{run}" not in directive.command: new_script.append(directive) @@ -300,7 +300,13 @@ def get_extra_env(sycl_devices): conditions, recursion_limit=test.config.recursiveExpansionLimit, ) - useExternalSh = False + + # 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" + result = lit.TestRunner._runShTest( test, litConfig, useExternalSh, script, tmpBase )