From 24abdd849ed8f49f27f1a8ecbe5cb19877c75dda Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Tue, 5 Aug 2025 15:04:06 -0700 Subject: [PATCH 1/6] [CI] Add backward ABI-compatibility testing to pre-commit --- .github/workflows/sycl-linux-precommit.yml | 192 ++++----------------- devops/compat_ci_exclude.sycl-rel-6_2 | 61 +++++++ 2 files changed, 90 insertions(+), 163 deletions(-) create mode 100644 devops/compat_ci_exclude.sycl-rel-6_2 diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 37c79b2640add..65e099dafee9f 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -40,12 +40,8 @@ concurrency: 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: @@ -56,172 +52,42 @@ jobs: build_image: "ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest" cc: clang cxx: clang++ - changes: ${{ needs.detect_changes.outputs.filters }} + changes: '[]' 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 - run_prebuilt_e2e_tests: - needs: [build, detect_changes] + compat_read_exclude: + name: Read compatibility testing exclude list + runs-on: [Linux, build] + outputs: + FILTER: ${{ steps.result.outputs.FILTER }} + 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: | + echo FILTER="$(grep -v '^#\|^\W*$' devops/compat_ci_exclude.sycl-rel-6_2 | paste -sd '|')" >> $GITHUB_OUTPUT + + + compatibility: + needs: [build, compat_read_exclude] if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} - strategy: - fail-fast: false - matrix: - include: - - name: GEN 12 Integrated - runner: '["Linux", "gen12"]' - 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 - extra_lit_opts: --param gpu-intel-gen12=True - - 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"]' - 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;level_zero_v2:gpu - extra_lit_opts: --param matrix-xmx8=True - - name: E2E tests with dev igc on Intel Arc A-Series Graphics - runner: '["Linux", "arc"]' - image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:devigc - 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 - extra_lit_opts: --param matrix-xmx8=True - use_igc_dev: true - env: '{"LIT_FILTER":"Matrix/"}' - - name: E2E tests on Intel Ponte Vecchio GPU - runner: '["Linux", "pvc"]' - 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;level_zero_v2:gpu - - name: Dev IGC on Intel Ponte Vecchio GPU - runner: '["Linux", "pvc"]' - image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:devigc - 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 - use_igc_dev: true - env: '{"LIT_FILTER":"Matrix/"}' - - name: 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_v1:gpu;level_zero_v2:gpu - - name: Preview Mode - runner: '["Linux", "gen12"]' - 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 - extra_lit_opts: --param test-preview-mode=True - e2e_binaries_artifact: e2e_bin_preview - - 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 }} - 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 + name: E2E Backward ABI compatibility + runner: '["Linux", "pvc"]' + # FIXME: + # image: ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_2 + image: ghcr.io/intel/llvm/sycl_prebuilt_tests:e2e-preview-param 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 }} - + target_devices: level_zero:gpu 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 }} + extra_lit_opts: '--param test-preview-mode=False --filter-out "${{ needs.compat_read_exclude.outputs.FILTER }}"' + e2e_testing_mode: 'run-only' diff --git a/devops/compat_ci_exclude.sycl-rel-6_2 b/devops/compat_ci_exclude.sycl-rel-6_2 new file mode 100644 index 0000000000000..6c14856d86538 --- /dev/null +++ b/devops/compat_ci_exclude.sycl-rel-6_2 @@ -0,0 +1,61 @@ +# https://github.com/intel/llvm/pull/18253 broke at least some of the pre-built +# E2E binaries, but we don't provide backward compatibility for binaries built +# with sanitizers. +Sanitizer + +# https://github.com/intel/llvm/pull/19238 +NonUniformGroups/opportunistic_group.cpp + +# https://github.com/intel/llvm/pull/18314 (need to address?) +Assert/assert_in_kernels.cpp +Assert/assert_in_multiple_tus.cpp +Assert/assert_in_multiple_tus_one_ndebug.cpp +Assert/assert_in_one_kernel.cpp +Assert/assert_in_simultaneous_kernels.cpp +Assert/assert_in_simultaneously_multiple_tus.cpp +Assert/assert_in_simultaneously_multiple_tus_one_ndebug.cpp + +# https://github.com/intel/llvm/pull/17955 +AsyncAlloc/device/async_alloc_from_pool.cpp +AsyncAlloc/device/async_alloc_zero_init.cpp +AsyncAlloc/device/ooo_queue_async_alloc_from_pool.cpp + +# https://github.com/intel/llvm/pull/18059 made property a no-op, so `FileCheck` +# fails, but that isn't an actual ABI break. +DiscardEvents/discard_events_accessors.cpp +DiscardEvents/discard_events_using_assert_ndebug.cpp +DiscardEvents/discard_events_usm.cpp +DiscardEvents/invalid_event.cpp +DiscardEvents/invalid_event_exceptions.cpp + +# https://github.com/intel/llvm/pull/17442 (unclear if need to address) +KernelCompiler/opencl.cpp +KernelCompiler/opencl_cache_eviction.cpp +KernelCompiler/opencl_queries.cpp + +# Pulldown https://github.com/intel/llvm/pull/18403 (why? TODO!!!) +DeviceImageDependencies/NewOffloadDriver/dynamic.cpp +DeviceImageDependencies/NewOffloadDriver/free_function_kernels.cpp +DeviceImageDependencies/NewOffloadDriver/math_device_lib.cpp +DeviceImageDependencies/NewOffloadDriver/objects.cpp +DeviceImageDependencies/NewOffloadDriver/singleDynamicLibrary.cpp +NewOffloadDriver/aot-gpu.cpp +NewOffloadDriver/buffer.cpp +NewOffloadDriver/multisource.cpp +NewOffloadDriver/spirv_device_obj_smoke.cpp +NewOffloadDriver/split-per-source-main.cpp +NewOffloadDriver/sycl-external-with-optional-features.cpp + +# https://github.com/intel/llvm/pull/18277 (unclear if need to address) +InOrderEventsExt/get_last_event.cpp +InorderQueue/in_order_ext_oneapi_submit_barrier.cpp + +# https://github.com/intel/llvm/pull/18565 (CHECKs reordered) +KernelAndProgram/disable-caching.cpp + +# https://github.com/intel/llvm/pull/18287 +# Throw exception instead of returning garbage +Basic/info.cpp + +# https://github.com/intel/llvm/pull/19328 +Adapters/interop-level-zero-buffer-ownership.cpp From 984bd3dbcae90417fac7a255f699cbeb64ef33cb Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Thu, 7 Aug 2025 07:21:31 -0700 Subject: [PATCH 2/6] Restore pre-commit --- .github/workflows/sycl-linux-precommit.yml | 183 +++++++++++++++++++-- 1 file changed, 172 insertions(+), 11 deletions(-) diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 65e099dafee9f..30dbde789ea0c 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -40,8 +40,12 @@ concurrency: 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: @@ -52,9 +56,29 @@ jobs: build_image: "ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest" cc: clang cxx: clang++ + # changes: ${{ needs.detect_changes.outputs.filters }} changes: '[]' 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: false && 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 @@ -73,21 +97,158 @@ jobs: run: | echo FILTER="$(grep -v '^#\|^\W*$' devops/compat_ci_exclude.sycl-rel-6_2 | paste -sd '|')" >> $GITHUB_OUTPUT - - compatibility: - needs: [build, compat_read_exclude] + run_prebuilt_e2e_tests: + needs: [build, detect_changes, compat_read_exclude] if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} + strategy: + fail-fast: false + matrix: + include: + - name: GEN 12 Integrated + runner: '["Linux", "gen12"]' + 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 + extra_lit_opts: --param gpu-intel-gen12=True + - 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"]' + 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;level_zero_v2:gpu + extra_lit_opts: --param matrix-xmx8=True + - name: E2E tests with dev igc on Intel Arc A-Series Graphics + runner: '["Linux", "arc"]' + image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:devigc + 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 + extra_lit_opts: --param matrix-xmx8=True + use_igc_dev: true + env: '{"LIT_FILTER":"Matrix/"}' + - name: E2E tests on Intel Ponte Vecchio GPU + runner: '["Linux", "pvc"]' + 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;level_zero_v2:gpu + - name: Dev IGC on Intel Ponte Vecchio GPU + runner: '["Linux", "pvc"]' + image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:devigc + 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 + use_igc_dev: true + env: '{"LIT_FILTER":"Matrix/"}' + - name: 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_v1:gpu;level_zero_v2:gpu + - name: Preview Mode + runner: '["Linux", "gen12"]' + 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 + extra_lit_opts: --param test-preview-mode=True + e2e_binaries_artifact: e2e_bin_preview + - name: ABI compatibility against sycl-rel-6_2 + runner: '["Linux", "pvc"]' + image: ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_2 + 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 + extra_lit_opts: '--param test-preview-mode=False --filter-out "${{ needs.compat_read_exclude.outputs.FILTER }}"' + # Use pre-built E2E from the container: + e2e_binaries_artifact: '' + uses: ./.github/workflows/sycl-linux-run-tests.yml with: - name: E2E Backward ABI compatibility - runner: '["Linux", "pvc"]' - # FIXME: - # image: ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_2 - image: ghcr.io/intel/llvm/sycl_prebuilt_tests:e2e-preview-param - 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 + 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 }} + 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 }} - extra_lit_opts: '--param test-preview-mode=False --filter-out "${{ needs.compat_read_exclude.outputs.FILTER }}"' + 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'}} + skip_run: ${{ matrix.image != 'ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_2' }} + env: ${{ matrix.env || (contains(needs.detect_changes.outputs.filters, 'esimd') && '{}' || '{"LIT_FILTER_OUT":"ESIMD/"}') }} + + test_benchmark_scripts: + needs: [build, detect_changes] + if: | + false && 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: | + false && 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 }} From f98151eced10f24f8e02e5ee610d8c819d3fde64 Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Thu, 7 Aug 2025 07:45:30 -0700 Subject: [PATCH 3/6] in-container special value --- .github/workflows/sycl-linux-precommit.yml | 3 +-- .github/workflows/sycl-linux-run-tests.yml | 5 +++-- devops/actions/run-tests/e2e/action.yml | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 30dbde789ea0c..5fd5a6587ac90 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -158,8 +158,7 @@ jobs: 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 extra_lit_opts: '--param test-preview-mode=False --filter-out "${{ needs.compat_read_exclude.outputs.FILTER }}"' - # Use pre-built E2E from the container: - e2e_binaries_artifact: '' + e2e_binaries_artifact: 'in-container' uses: ./.github/workflows/sycl-linux-run-tests.yml with: diff --git a/.github/workflows/sycl-linux-run-tests.yml b/.github/workflows/sycl-linux-run-tests.yml index d77be16d2227b..f37b5e59a54a6 100644 --- a/.github/workflows/sycl-linux-run-tests.yml +++ b/.github/workflows/sycl-linux-run-tests.yml @@ -62,8 +62,9 @@ on: description: | When set in modes other than `run-only` results in artifact upload. For `run-only` mode, if specified, means downloading pre-built - binaries from the artifact, otherwise they are expected to be part of - the container. + binaries from the artifact. If set to special value `in-container` + then the binaries are expected to be stored in the container image + instead of coming from an artifact. type: string default: '' required: False diff --git a/devops/actions/run-tests/e2e/action.yml b/devops/actions/run-tests/e2e/action.yml index 1457bbe264c2c..2b0564bd1bc2e 100644 --- a/devops/actions/run-tests/e2e/action.yml +++ b/devops/actions/run-tests/e2e/action.yml @@ -24,7 +24,7 @@ runs: using: "composite" steps: - name: Checkout E2E tests - if: ${{ !(inputs.testing_mode == 'run-only' && inputs.binaries_artifact == '') }} + if: ${{ !(inputs.testing_mode == 'run-only' && inputs.binaries_artifact == 'in-container') }} uses: actions/checkout@v4 with: path: llvm @@ -33,19 +33,19 @@ runs: llvm/utils/lit sycl/test-e2e - name: Download E2E Binaries - if: ${{ inputs.testing_mode == 'run-only' && inputs.binaries_artifact != '' }} + if: ${{ inputs.testing_mode == 'run-only' && inputs.binaries_artifact != 'in-container' }} uses: actions/download-artifact@v4 with: name: ${{ inputs.binaries_artifact }} - name: Extract E2E Binaries - if: ${{ inputs.testing_mode == 'run-only' && inputs.binaries_artifact != '' }} + if: ${{ inputs.testing_mode == 'run-only' && inputs.binaries_artifact != 'in-container' }} shell: bash run: | mkdir build-e2e tar -I 'zstd' -xf e2e_binaries.tar.zst -C build-e2e - name: Extract E2E tests from container image - if: ${{ inputs.testing_mode == 'run-only' && inputs.binaries_artifact == '' }} + if: ${{ inputs.testing_mode == 'run-only' && inputs.binaries_artifact == 'in-container' }} shell: bash run: | mkdir build-e2e llvm From b6fdc951b0ac44b9acbb6119a76099980dcb8da9 Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Thu, 7 Aug 2025 08:22:02 -0700 Subject: [PATCH 4/6] Close to the final version --- .github/workflows/sycl-linux-precommit.yml | 16 +++-- .github/workflows/sycl-windows-precommit.yml | 1 + devops/compat_ci_exclude.sycl-rel-6_2 | 66 ++++++++++++-------- 3 files changed, 48 insertions(+), 35 deletions(-) diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 5fd5a6587ac90..1dfa5f5e41bab 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -56,12 +56,11 @@ jobs: build_image: "ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest" cc: clang cxx: clang++ - # changes: ${{ needs.detect_changes.outputs.filters }} - changes: '[]' + changes: ${{ needs.detect_changes.outputs.filters }} toolchain_artifact: sycl_linux_default - # e2e_binaries_artifact: e2e_bin - # e2e_binaries_preview_artifact: e2e_bin_preview + 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 @@ -69,7 +68,7 @@ jobs: # The idea is to ensure that the code works with both CUDA versions. build_ubuntu2204: needs: [detect_changes] - if: false && always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur_cuda_adapter') + if: always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur_cuda_adapter') uses: ./.github/workflows/sycl-linux-build.yml with: build_ref: ${{ github.sha }} @@ -187,14 +186,13 @@ jobs: (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'}} - skip_run: ${{ matrix.image != 'ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_2' }} + 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: | - false && always() && !cancelled() + always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' && contains(needs.detect_changes.outputs.filters, 'benchmarks') uses: ./.github/workflows/sycl-linux-run-tests.yml @@ -216,7 +214,7 @@ jobs: test-perf: needs: [build, detect_changes] if: | - false && always() && !cancelled() + 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')) diff --git a/.github/workflows/sycl-windows-precommit.yml b/.github/workflows/sycl-windows-precommit.yml index 8caa7304747c4..b8f8c675151d2 100644 --- a/.github/workflows/sycl-windows-precommit.yml +++ b/.github/workflows/sycl-windows-precommit.yml @@ -25,6 +25,7 @@ on: - '.github/workflows/trivy.yml' - 'devops/containers/**' - 'devops/actions/build_container/**' + - 'devops/compat_ci_exclude.sycl-rel-6_2' - 'unified-runtime/examples/**' - 'unified-runtime/scripts/**' - 'unified-runtime/test/**' diff --git a/devops/compat_ci_exclude.sycl-rel-6_2 b/devops/compat_ci_exclude.sycl-rel-6_2 index 6c14856d86538..d34b3ab81ab12 100644 --- a/devops/compat_ci_exclude.sycl-rel-6_2 +++ b/devops/compat_ci_exclude.sycl-rel-6_2 @@ -1,12 +1,45 @@ +# Known OK: + +# https://github.com/intel/llvm/pull/18059 made property a no-op, so `FileCheck` +# fails, but that isn't an actual ABI break. +DiscardEvents/discard_events_accessors.cpp +DiscardEvents/discard_events_using_assert_ndebug.cpp +DiscardEvents/discard_events_usm.cpp +DiscardEvents/invalid_event.cpp +DiscardEvents/invalid_event_exceptions.cpp + +# https://github.com/intel/llvm/pull/18287 +# Throw exception instead of returning garbage +Basic/info.cpp + +# Likely OK, but need author to provide justification, get approval/confirmation +# from someone: + +# https://github.com/intel/llvm/pull/18565 +# This one should have probably be done in multiple PRs, first improving the +# test's CHECKs and then making an actual functional change. +# +# Based on the title, I'd expect to see reduction in number of ur*retain/release +# calls, but it only moves a few ur*release CHECKs, so I'll let the author +# update this explanation. +KernelAndProgram/disable-caching.cpp + # https://github.com/intel/llvm/pull/18253 broke at least some of the pre-built -# E2E binaries, but we don't provide backward compatibility for binaries built -# with sanitizers. +# E2E binaries, but do we really need to provide backward compatibility for +# binaries built with sanitizers? Sanitizer # https://github.com/intel/llvm/pull/19238 NonUniformGroups/opportunistic_group.cpp -# https://github.com/intel/llvm/pull/18314 (need to address?) +# https://github.com/intel/llvm/pull/17955, experimental extension +AsyncAlloc/device/async_alloc_from_pool.cpp +AsyncAlloc/device/async_alloc_zero_init.cpp +AsyncAlloc/device/ooo_queue_async_alloc_from_pool.cpp + +# Need more investigation by the author: + +# https://github.com/intel/llvm/pull/18314 Assert/assert_in_kernels.cpp Assert/assert_in_multiple_tus.cpp Assert/assert_in_multiple_tus_one_ndebug.cpp @@ -15,25 +48,13 @@ Assert/assert_in_simultaneous_kernels.cpp Assert/assert_in_simultaneously_multiple_tus.cpp Assert/assert_in_simultaneously_multiple_tus_one_ndebug.cpp -# https://github.com/intel/llvm/pull/17955 -AsyncAlloc/device/async_alloc_from_pool.cpp -AsyncAlloc/device/async_alloc_zero_init.cpp -AsyncAlloc/device/ooo_queue_async_alloc_from_pool.cpp - -# https://github.com/intel/llvm/pull/18059 made property a no-op, so `FileCheck` -# fails, but that isn't an actual ABI break. -DiscardEvents/discard_events_accessors.cpp -DiscardEvents/discard_events_using_assert_ndebug.cpp -DiscardEvents/discard_events_usm.cpp -DiscardEvents/invalid_event.cpp -DiscardEvents/invalid_event_exceptions.cpp - -# https://github.com/intel/llvm/pull/17442 (unclear if need to address) +# https://github.com/intel/llvm/pull/17442 KernelCompiler/opencl.cpp KernelCompiler/opencl_cache_eviction.cpp KernelCompiler/opencl_queries.cpp -# Pulldown https://github.com/intel/llvm/pull/18403 (why? TODO!!!) +# https://github.com/intel/llvm/pull/18403 (pulldown, so probably offload-tools +# team should be looking into this) DeviceImageDependencies/NewOffloadDriver/dynamic.cpp DeviceImageDependencies/NewOffloadDriver/free_function_kernels.cpp DeviceImageDependencies/NewOffloadDriver/math_device_lib.cpp @@ -46,16 +67,9 @@ NewOffloadDriver/spirv_device_obj_smoke.cpp NewOffloadDriver/split-per-source-main.cpp NewOffloadDriver/sycl-external-with-optional-features.cpp -# https://github.com/intel/llvm/pull/18277 (unclear if need to address) +# https://github.com/intel/llvm/pull/18277 InOrderEventsExt/get_last_event.cpp InorderQueue/in_order_ext_oneapi_submit_barrier.cpp -# https://github.com/intel/llvm/pull/18565 (CHECKs reordered) -KernelAndProgram/disable-caching.cpp - -# https://github.com/intel/llvm/pull/18287 -# Throw exception instead of returning garbage -Basic/info.cpp - # https://github.com/intel/llvm/pull/19328 Adapters/interop-level-zero-buffer-ownership.cpp From 2405ebe7b69e6787d7c224636132c967ab9ba4cc Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Thu, 7 Aug 2025 09:26:00 -0700 Subject: [PATCH 5/6] Add a comment as per code review feedback --- .github/workflows/sycl-linux-precommit.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 1dfa5f5e41bab..4864779be6cfd 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -94,6 +94,8 @@ jobs: - 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="$(grep -v '^#\|^\W*$' devops/compat_ci_exclude.sycl-rel-6_2 | paste -sd '|')" >> $GITHUB_OUTPUT run_prebuilt_e2e_tests: From fd6a97df4d657a008799e5ebb29c59c75818c802 Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Thu, 7 Aug 2025 09:45:17 -0700 Subject: [PATCH 6/6] Use default image_options --- .github/workflows/sycl-linux-precommit.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index 4864779be6cfd..f3002412c0895 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -156,7 +156,6 @@ jobs: - name: ABI compatibility against sycl-rel-6_2 runner: '["Linux", "pvc"]' image: ghcr.io/intel/llvm/sycl_prebuilt_tests:sycl-rel-6_2 - 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 extra_lit_opts: '--param test-preview-mode=False --filter-out "${{ needs.compat_read_exclude.outputs.FILTER }}"' e2e_binaries_artifact: 'in-container' @@ -166,7 +165,7 @@ jobs: name: ${{ matrix.name }} runner: ${{ matrix.runner }} image: ${{ matrix.image }} - image_options: ${{ matrix.image_options }} + 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 }}