[E2E] Enable end-to-end tests supported by the SPIR-V backend #24880
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SYCL Pre Commit on Linux | |
on: | |
# We rely on "Fork pull request workflows from outside collaborators" - | |
# "Require approval for all outside collaborators" at | |
# https://github.com/intel/llvm/settings/actions for security. | |
pull_request: | |
branches: | |
- sycl | |
- sycl-rel-** | |
# Do not run builds if changes are only in the following locations | |
paths-ignore: | |
- '.github/ISSUE_TEMPLATE/**' | |
- '.github/CODEOWNERS' | |
- 'sycl/cts_exclude_filter/**' | |
- 'sycl/doc/**' | |
- 'sycl/gdb/**' | |
- 'clang/docs/**' | |
- '**.md' | |
- '**.rst' | |
- '.github/workflows/sycl-windows-*.yml' | |
- '.github/workflows/sycl-macos-*.yml' | |
- '.github/workflows/sycl-nightly.yml' | |
- '.github/workflows/sycl-rel-nightly.yml' | |
- '.github/workflows/sycl-rel-nightly-launch.yml' | |
- '.github/workflows/trivy.yml' | |
- 'devops/containers/**' | |
- 'devops/actions/build_container/**' | |
- 'unified-runtime/examples/**' | |
- 'unified-runtime/scripts/**' | |
- 'unified-runtime/test/**' | |
- 'unified-runtime/third_party/**' | |
- 'unified-runtime/tools/**' | |
concurrency: | |
# Cancel a currently running workflow from the same PR, branch or tag. | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
permissions: read-all | |
jobs: | |
detect_changes: | |
uses: ./.github/workflows/sycl-detect-changes.yml | |
build: | |
name: Self build | |
needs: [detect_changes] | |
if: always() && success() | |
uses: ./.github/workflows/sycl-linux-build.yml | |
with: | |
build_ref: ${{ github.sha }} | |
build_cache_root: "/__w/" | |
build_cache_suffix: "default" | |
# Docker image has last nightly pre-installed and added to the PATH | |
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest" | |
cc: clang | |
cxx: clang++ | |
changes: ${{ needs.detect_changes.outputs.filters }} | |
toolchain_artifact: sycl_linux_default | |
e2e_binaries_artifact: e2e_bin | |
e2e_binaries_preview_artifact: e2e_bin_preview | |
# If a PR changes CUDA adapter, run the build on Ubuntu 22.04 as well. | |
# Ubuntu 22.04 container has CUDA 12.1 installed while Ubuntu 24.0 image | |
# has CUDA 12.6.1 installed. | |
# The idea is to ensure that the code works with both CUDA versions. | |
build_ubuntu2204: | |
needs: [detect_changes] | |
if: always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur_cuda_adapter') | |
uses: ./.github/workflows/sycl-linux-build.yml | |
with: | |
build_ref: ${{ github.sha }} | |
build_cache_root: "/__w/" | |
build_cache_suffix: "ubuntu22" | |
build_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest" | |
changes: ${{ needs.detect_changes.outputs.filters }} | |
toolchain_artifact: sycl_linux_ubuntu22 | |
compat_read_exclude: | |
name: Read compatibility testing exclude list | |
runs-on: [Linux, aux-tasks] | |
outputs: | |
FILTER_6_2: ${{ steps.result.outputs.FILTER_6_2 }} | |
FILTER_6_3: ${{ steps.result.outputs.FILTER_6_3 }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
devops/ | |
- name: Register cleanup after job is finished | |
uses: ./devops/actions/cleanup | |
- id: result | |
shell: bash | |
run: | | |
# Transform to format expected by `llvm-lit --filter-out "pattern1|pattern2|..."`. | |
# First, remove comments/empty lines, then join lines with "|" as separator. | |
echo FILTER_6_2="$(grep -v '^#\|^\W*$' devops/compat_ci_exclude.sycl-rel-6_2 | paste -sd '|')" >> $GITHUB_OUTPUT | |
echo FILTER_6_3="$(grep -v '^#\|^\W*$' devops/compat_ci_exclude.sycl-rel-6_3 | paste -sd '|')" >> $GITHUB_OUTPUT | |
E2E: | |
needs: [build, detect_changes, compat_read_exclude] | |
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: Intel / GEN 12 Integrated | |
runner: '["Linux", "gen12"]' | |
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu | |
- name: NVIDIA/CUDA | |
runner: '["Linux", "cuda"]' | |
image_options: -u 1001 --gpus all --cap-add SYS_ADMIN | |
target_devices: cuda:gpu | |
- name: AMD/HIP | |
runner: '["Linux", "amdgpu"]' | |
image_options: -u 1001 --device=/dev/dri --device=/dev/kfd | |
target_devices: hip:gpu | |
extra_lit_opts: -j 1 | |
- name: Intel / Arc A-Series Graphics | |
runner: '["Linux", "arc"]' | |
target_devices: level_zero:gpu;opencl:gpu;level_zero_v2:gpu | |
- name: Intel Dev IGC / Arc A-Series Graphics | |
runner: '["Linux", "arc"]' | |
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:devigc | |
target_devices: level_zero:gpu | |
use_igc_dev: true | |
env: '{"LIT_FILTER":"Matrix/"}' | |
- name: Intel / Ponte Vecchio GPU | |
runner: '["Linux", "pvc"]' | |
target_devices: level_zero:gpu;opencl:gpu;level_zero_v2:gpu | |
- name: Intel Dev IGC / Ponte Vecchio GPU | |
runner: '["Linux", "pvc"]' | |
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:devigc | |
target_devices: level_zero:gpu | |
use_igc_dev: true | |
env: '{"LIT_FILTER":"Matrix/"}' | |
- name: Intel / Battlemage Graphics | |
runner: '["Linux", "bmg"]' | |
target_devices: level_zero_v1:gpu;level_zero_v2:gpu | |
- name: Preview Mode | |
runner: '["Linux", "gen12"]' | |
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu | |
extra_lit_opts: --param test-preview-mode=True | |
e2e_binaries_artifact: e2e_bin_preview | |
- name: ABI compatibility / sycl-rel-6_2 | |
runner: '["Linux", "pvc"]' | |
image: ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_2 | |
target_devices: level_zero:gpu | |
extra_lit_opts: '--param test-preview-mode=False --filter-out "${{ needs.compat_read_exclude.outputs.FILTER_6_2 }}"' | |
e2e_binaries_artifact: 'in-container' | |
- name: ABI compatibility / sycl-rel-6_3 | |
runner: '["Linux", "pvc"]' | |
image: ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_3 | |
target_devices: level_zero:gpu | |
extra_lit_opts: '--param test-preview-mode=False --filter-out "${{ needs.compat_read_exclude.outputs.FILTER_6_3 }}"' | |
e2e_binaries_artifact: 'in-container' | |
uses: ./.github/workflows/sycl-linux-run-tests.yml | |
with: | |
name: ${{ matrix.name }} | |
runner: ${{ matrix.runner }} | |
image: ${{ matrix.image }} | |
image_options: ${{ matrix.image_options || '-u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN' }} | |
target_devices: ${{ matrix.target_devices }} | |
extra_lit_opts: ${{ matrix.extra_lit_opts }} | |
repo_ref: ${{ github.sha }} | |
toolchain_artifact: ${{ needs.build.outputs.toolchain_artifact }} | |
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }} | |
toolchain_decompress_command: ${{ needs.build.outputs.toolchain_decompress_command }} | |
e2e_binaries_artifact: ${{ matrix.e2e_binaries_artifact || 'e2e_bin' }} | |
e2e_testing_mode: 'run-only' | |
# Do not install drivers on AMD and CUDA runners. | |
install_igc_driver: >- | |
${{ !contains(matrix.target_devices, 'cuda') && | |
!contains(matrix.target_devices, 'hip') && | |
contains(needs.detect_changes.outputs.filters, 'drivers') }} | |
install_dev_igc_driver: >- | |
${{ !contains(matrix.target_devices, 'cuda') && | |
!contains(matrix.target_devices, 'hip') && | |
matrix.use_igc_dev && | |
(contains(needs.detect_changes.outputs.filters, 'devigccfg') || contains(needs.detect_changes.outputs.filters, 'drivers')) || | |
'false' }} | |
# Run only if the PR does not have the 'ci-no-devigc' label. | |
skip_run: ${{matrix.use_igc_dev && contains(github.event.pull_request.labels.*.name, 'ci-no-devigc') || 'false'}} | |
env: ${{ matrix.env || (contains(needs.detect_changes.outputs.filters, 'esimd') && '{}' || '{"LIT_FILTER_OUT":"ESIMD/"}') }} | |
test_benchmark_scripts: | |
needs: [build, detect_changes] | |
if: | | |
always() && !cancelled() | |
&& needs.build.outputs.build_conclusion == 'success' | |
&& contains(needs.detect_changes.outputs.filters, 'benchmarks') | |
uses: ./.github/workflows/sycl-linux-run-tests.yml | |
with: | |
name: Benchmark suite precommit testing | |
runner: '["PVC_PERF"]' | |
image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly: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' | |
tests_selector: benchmarks | |
benchmark_upload_results: false | |
benchmark_preset: 'Minimal' | |
benchmark_dry_run: true | |
repo_ref: ${{ github.sha }} | |
toolchain_artifact: ${{ needs.build.outputs.toolchain_artifact }} | |
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }} | |
toolchain_decompress_command: ${{ needs.build.outputs.toolchain_decompress_command }} | |
test-perf: | |
needs: [build, detect_changes] | |
if: | | |
always() && !cancelled() | |
&& needs.build.outputs.build_conclusion == 'success' | |
&& (contains(github.event.pull_request.labels.*.name, 'run-perf-tests') | |
|| contains(needs.detect_changes.outputs.filters, 'perf-tests')) | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: Intel GEN12 Graphics system | |
runner: '["Linux", "gen12"]' | |
image_extra_opts: --device=/dev/dri | |
- name: Intel Arc A-Series Graphics system | |
runner: '["Linux", "arc"]' | |
image_extra_opts: --device=/dev/dri | |
- name: AMD system | |
runner: '["Linux", "amdgpu"]' | |
image_extra_opts: --device=/dev/dri --device=/dev/kfd | |
- name: CUDA system | |
runner: '["Linux", "cuda"]' | |
image_extra_opts: --gpus all | |
uses: ./.github/workflows/sycl-linux-run-tests.yml | |
with: | |
name: Perf tests on ${{ matrix.name }} | |
runner: ${{ matrix. runner }} | |
image_options: -u 1001 --privileged --cap-add SYS_ADMIN ${{ matrix.image_extra_opts }} | |
target_devices: all | |
env: '{"LIT_FILTER":"PerformanceTests/"}' | |
extra_lit_opts: -a -j 1 --param enable-perf-tests=True | |
repo_ref: ${{ github.sha }} | |
toolchain_artifact: ${{ needs.build.outputs.toolchain_artifact }} | |
toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }} | |
toolchain_decompress_command: ${{ needs.build.outputs.toolchain_decompress_command }} |