diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index e3b350fbac3cb..52e771a80411f 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -206,6 +206,7 @@ jobs: -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DLLVM_INSTALL_UTILS=ON \ -DSYCL_UR_FORCE_FETCH_LEVEL_ZERO=ON + # DSYCL_UR_USE_LEVEL_ZERO_V2=1 - name: Compile id: build # Emulate default value for manual dispatch as we've run out of available arguments. diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index bef9396b049eb..5f1b86c922d00 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -69,39 +69,39 @@ jobs: # Build and run native cpu e2e tests separately as cannot currently # build all the e2e tests - build_run_native_cpu_e2e_tests: - if: ${{ !cancelled() && needs.build.outputs.build_conclusion == 'success' }} - runs-on: [Linux, build] - needs: [build] - container: - image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest - options: -u 1001:1001 - steps: - - uses: actions/checkout@v5 - with: - sparse-checkout: | - devops/ + # build_run_native_cpu_e2e_tests: + # if: ${{ !cancelled() && needs.build.outputs.build_conclusion == 'success' }} + # runs-on: [Linux, build] + # needs: [build] + # container: + # image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest + # options: -u 1001:1001 + # steps: + # - uses: actions/checkout@v5 + # with: + # sparse-checkout: | + # devops/ - # download build artefact - - name: Download toolchain - uses: actions/download-artifact@v6 - with: - name: sycl_linux_default - - name: Extract SYCL toolchain - shell: bash - run: | - mkdir toolchain - tar -xf llvm_sycl.tar.zst -C toolchain - rm llvm_sycl.tar.zst - - name: Build and run E2E tests - uses: ./devops/actions/run-tests/e2e - with: - ref: ${{ inputs.ref || github.sha }} - testing_mode: full - target_devices: native_cpu:cpu - sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++ - extra_lit_opts: --param sycl_build_targets="native_cpu" - extra_cmake_args: -DSYCL_TEST_E2E_TARGETS="native_cpu:cpu" -DSYCL_TEST_E2E_STANDALONE=ON + # # download build artefact + # - name: Download toolchain + # uses: actions/download-artifact@v6 + # with: + # name: sycl_linux_default + # - name: Extract SYCL toolchain + # shell: bash + # run: | + # mkdir toolchain + # tar -xf llvm_sycl.tar.zst -C toolchain + # rm llvm_sycl.tar.zst + # - name: Build and run E2E tests + # uses: ./devops/actions/run-tests/e2e + # with: + # ref: ${{ inputs.ref || github.sha }} + # testing_mode: full + # target_devices: native_cpu:cpu + # sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++ + # extra_lit_opts: --param sycl_build_targets="native_cpu" + # extra_cmake_args: -DSYCL_TEST_E2E_TARGETS="native_cpu:cpu" -DSYCL_TEST_E2E_STANDALONE=ON # 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 @@ -151,44 +151,49 @@ jobs: 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 - binaries_artifact: e2e_bin_preview + # - 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 + # binaries_artifact: e2e_bin_preview + - name: L0 v2 + runner: '["TEST_PERF"]' + # runner: '["Linux", "L0v2"]' + target_devices: level_zero_v2:arch-intel_gpu_mtl_u + extra_lit_opts: -j 12 # We're in an ABI-breaking window, so these don't make sense for now. - name: ABI compatibility / sycl-rel-6_2 @@ -236,44 +241,44 @@ jobs: skip_run: ${{matrix.use_igc_dev && contains(github.event.pull_request.labels.*.name, 'ci-no-devigc') || matrix.skip_run || 'false'}} env: ${{ matrix.env || (contains(needs.detect_changes.outputs.filters, 'esimd') && '{}' || '{"LIT_FILTER_OUT":"ESIMD/"}') }} - test-perf: - needs: [build, detect_changes] - permissions: - contents: write - packages: read - if: | - !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 + # test-perf: + # needs: [build, detect_changes] + # permissions: + # contents: write + # packages: read + # if: | + # !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 + # env: '{"LIT_FILTER":"PerformanceTests/"}' + # extra_lit_opts: -a -j 1 --param enable-perf-tests=True - repo_ref: ${{ github.sha }} + # 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 }} + # 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 }} diff --git a/.github/workflows/sycl-linux-run-tests.yml b/.github/workflows/sycl-linux-run-tests.yml index 8d857fc27dff9..6befd75d049ac 100644 --- a/.github/workflows/sycl-linux-run-tests.yml +++ b/.github/workflows/sycl-linux-run-tests.yml @@ -158,6 +158,7 @@ on: - '["Linux", "build"]' - '["cuda"]' - '["PVC_PERF"]' + - '["Linux", "L0v2"]' image: type: choice options: @@ -181,6 +182,7 @@ on: - 'opencl:gpu' - 'hip:gpu' - 'cuda:gpu' + - 'level_zero_v2:arch-intel_gpu_mtl_u' tests_selector: type: choice options: @@ -243,6 +245,14 @@ jobs: sparse-checkout: | devops sycl/cts_exclude_filter + - name: Show checkout information + shell: bash + run: | + echo "Current branch: $(git branch --show-current)" + echo "Current commit: $(git rev-parse HEAD)" + echo "Current commit (short): $(git rev-parse --short HEAD)" + echo "Commit message: $(git log -1 --pretty=%B)" + git log -1 --oneline - name: Register cleanup after job is finished uses: ./devops/actions/cleanup - name: Reset Intel GPU diff --git a/.github/workflows/sycl-post-commit.yml b/.github/workflows/sycl-post-commit.yml index 8c311ec499912..83dcbe0f8a303 100644 --- a/.github/workflows/sycl-post-commit.yml +++ b/.github/workflows/sycl-post-commit.yml @@ -1,141 +1,141 @@ -name: SYCL Post Commit - -on: - workflow_dispatch: - - push: - branches: - - sycl - - sycl-rel-** - - pull_request: - branches: - - sycl - paths: - - .github/workflows/sycl-post-commit.yml - - .github/workflows/sycl-linux-build.yml - - .github/workflows/sycl-linux-run-tests.yml - - .github/workflows/sycl-macos-build-and-test.yml - - ./devops/actions/cleanup - - ./devops/actions/cached_checkout - - ./devops/dependencies.json - - ./devops/dependencies-igc-dev.json - -concurrency: - # Cancel a currently running workflow from the same PR or commit hash. - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true - -permissions: read-all - -jobs: - detect_changes: - if: ${{ github.event_name == 'pull_request' }} - uses: ./.github/workflows/sycl-detect-changes.yml - - build-lin: - name: Linux (GCC + no-assertions) - if: github.repository == 'intel/llvm' - uses: ./.github/workflows/sycl-linux-build.yml - with: - build_cache_root: "/__w/llvm" - build_cache_suffix: default - build_configure_extra_args: --no-assertions --hip --cuda --native_cpu -DSYCL_ENABLE_STACK_PRINTING=ON -DSYCL_LIB_WITH_DEBUG_SYMBOL=ON - - toolchain_artifact: sycl_linux_default - e2e_binaries_spirv_backend_artifact: e2e_bin_spirv_backend - - e2e-lin: - needs: [detect_changes, build-lin] - if: ${{ !cancelled() && needs.build-lin.outputs.build_conclusion == 'success' }} - permissions: - contents: write - packages: read - strategy: - fail-fast: false - matrix: - include: - - name: Intel GEN12 Graphics with Level Zero - runner: '["Linux", "gen12"]' - target_devices: level_zero:gpu - - name: Intel Arc A-Series Graphics with Level Zero - runner: '["Linux", "arc"]' - # Performance tests below. Specifics: - # - only run performance tests (use LIT_FILTER env) - # - ask llvm-lit to show all the output, even for PASS (-a) - # - run in single thread (-j 1) - # - enable the tests in LIT (--param enable-perf-tests=True) - # - run on all available devices. - - name: Perf tests on Intel GEN12 Graphics system - runner: '["Linux", "gen12"]' - env: '{"LIT_FILTER":"PerformanceTests/"}' - extra_lit_opts: -a -j 1 --param enable-perf-tests=True - target_devices: all - - name: Perf tests on Intel Arc A-Series Graphics system - runner: '["Linux", "arc"]' - env: '{"LIT_FILTER":"PerformanceTests/"}' - extra_lit_opts: -a -j 1 --param enable-perf-tests=True - target_devices: all - - name: SPIR-V Backend / 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:gpu;opencl:gpu;opencl:cpu - extra_lit_opts: --param spirv-backend=True - binaries_artifact: e2e_bin_spirv_backend - testing_mode: 'run-only' - uses: ./.github/workflows/sycl-linux-run-tests.yml - with: - name: ${{ matrix.name }} - runner: ${{ matrix. runner }} - 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 || 'level_zero:gpu' }} - - extra_lit_opts: ${{ matrix.extra_lit_opts }} - env: ${{ matrix.env || '{}' }} - - repo_ref: ${{ github.sha }} - - toolchain_artifact: ${{ needs.build-lin.outputs.toolchain_artifact }} - toolchain_artifact_filename: ${{ needs.build-lin.outputs.toolchain_artifact_filename }} - toolchain_decompress_command: ${{ needs.build-lin.outputs.toolchain_decompress_command }} - - binaries_artifact: ${{ matrix.binaries_artifact }} - testing_mode: ${{ matrix.testing_mode || 'full' }} - - # Do not install drivers on AMD and CUDA runners. - install_igc_driver: >- - ${{ github.event_name == 'pull_request' }} && - ${{ !contains(matrix.target_devices, 'cuda') && - !contains(matrix.target_devices, 'hip') && - contains(needs.detect_changes.outputs.filters, 'drivers') }} - - build-win: - if: | - success() && - github.repository == 'intel/llvm' - uses: ./.github/workflows/sycl-windows-build.yml - with: - cxx: icx - build_configure_extra_args: -DCMAKE_C_FLAGS="/fp:precise /clang:-Wno-nonportable-include-path /clang:-Wno-cast-function-type-mismatch" -DCMAKE_CXX_FLAGS="/fp:precise /clang:-Wno-nonportable-include-path /clang:-Wno-cast-function-type-mismatch" -DCMAKE_EXE_LINKER_FLAGS=/manifest:no -DCMAKE_MODULE_LINKER_FLAGS=/manifest:no -DCMAKE_SHARED_LINKER_FLAGS=/manifest:no - build_cache_suffix: icx - - e2e-win: - needs: build-win - # Continue if build was successful. - if: | - !cancelled() && - needs.build-win.outputs.build_conclusion == 'success' - uses: ./.github/workflows/sycl-windows-run-tests.yml - with: - name: Intel GEN12 Graphics with Level Zero - runner: '["Windows","gen12"]' - target_devices: "level_zero:gpu" - toolchain_artifact_filename: ${{ needs.build-win.outputs.toolchain_artifact_filename }} - cxx: icx - # https://github.com/intel/llvm/issues/18458 - env: "{'LIT_FILTER_OUT':'std_array.cpp|compile_on_win_with_mdd.cpp'}" - - macos_default: - name: macOS - if: github.repository == 'intel/llvm' - uses: ./.github/workflows/sycl-macos-build-and-test.yml +# name: SYCL Post Commit + +# on: +# workflow_dispatch: + +# push: +# branches: +# - sycl +# - sycl-rel-** + +# pull_request: +# branches: +# - sycl +# paths: +# - .github/workflows/sycl-post-commit.yml +# - .github/workflows/sycl-linux-build.yml +# - .github/workflows/sycl-linux-run-tests.yml +# - .github/workflows/sycl-macos-build-and-test.yml +# - ./devops/actions/cleanup +# - ./devops/actions/cached_checkout +# - ./devops/dependencies.json +# - ./devops/dependencies-igc-dev.json + +# concurrency: +# # Cancel a currently running workflow from the same PR or commit hash. +# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} +# cancel-in-progress: true + +# permissions: read-all + +# jobs: +# detect_changes: +# if: ${{ github.event_name == 'pull_request' }} +# uses: ./.github/workflows/sycl-detect-changes.yml + +# build-lin: +# name: Linux (GCC + no-assertions) +# if: github.repository == 'intel/llvm' +# uses: ./.github/workflows/sycl-linux-build.yml +# with: +# build_cache_root: "/__w/llvm" +# build_cache_suffix: default +# build_configure_extra_args: --no-assertions --hip --cuda --native_cpu -DSYCL_ENABLE_STACK_PRINTING=ON -DSYCL_LIB_WITH_DEBUG_SYMBOL=ON + +# toolchain_artifact: sycl_linux_default +# e2e_binaries_spirv_backend_artifact: e2e_bin_spirv_backend + +# e2e-lin: +# needs: [detect_changes, build-lin] +# if: ${{ !cancelled() && needs.build-lin.outputs.build_conclusion == 'success' }} +# permissions: +# contents: write +# packages: read +# strategy: +# fail-fast: false +# matrix: +# include: +# - name: Intel GEN12 Graphics with Level Zero +# runner: '["Linux", "gen12"]' +# target_devices: level_zero:gpu +# - name: Intel Arc A-Series Graphics with Level Zero +# runner: '["Linux", "arc"]' +# # Performance tests below. Specifics: +# # - only run performance tests (use LIT_FILTER env) +# # - ask llvm-lit to show all the output, even for PASS (-a) +# # - run in single thread (-j 1) +# # - enable the tests in LIT (--param enable-perf-tests=True) +# # - run on all available devices. +# - name: Perf tests on Intel GEN12 Graphics system +# runner: '["Linux", "gen12"]' +# env: '{"LIT_FILTER":"PerformanceTests/"}' +# extra_lit_opts: -a -j 1 --param enable-perf-tests=True +# target_devices: all +# - name: Perf tests on Intel Arc A-Series Graphics system +# runner: '["Linux", "arc"]' +# env: '{"LIT_FILTER":"PerformanceTests/"}' +# extra_lit_opts: -a -j 1 --param enable-perf-tests=True +# target_devices: all +# - name: SPIR-V Backend / 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:gpu;opencl:gpu;opencl:cpu +# extra_lit_opts: --param spirv-backend=True +# binaries_artifact: e2e_bin_spirv_backend +# testing_mode: 'run-only' +# uses: ./.github/workflows/sycl-linux-run-tests.yml +# with: +# name: ${{ matrix.name }} +# runner: ${{ matrix. runner }} +# 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 || 'level_zero:gpu' }} + +# extra_lit_opts: ${{ matrix.extra_lit_opts }} +# env: ${{ matrix.env || '{}' }} + +# repo_ref: ${{ github.sha }} + +# toolchain_artifact: ${{ needs.build-lin.outputs.toolchain_artifact }} +# toolchain_artifact_filename: ${{ needs.build-lin.outputs.toolchain_artifact_filename }} +# toolchain_decompress_command: ${{ needs.build-lin.outputs.toolchain_decompress_command }} + +# binaries_artifact: ${{ matrix.binaries_artifact }} +# testing_mode: ${{ matrix.testing_mode || 'full' }} + +# # Do not install drivers on AMD and CUDA runners. +# install_igc_driver: >- +# ${{ github.event_name == 'pull_request' }} && +# ${{ !contains(matrix.target_devices, 'cuda') && +# !contains(matrix.target_devices, 'hip') && +# contains(needs.detect_changes.outputs.filters, 'drivers') }} + +# build-win: +# if: | +# success() && +# github.repository == 'intel/llvm' +# uses: ./.github/workflows/sycl-windows-build.yml +# with: +# cxx: icx +# build_configure_extra_args: -DCMAKE_C_FLAGS="/fp:precise /clang:-Wno-nonportable-include-path /clang:-Wno-cast-function-type-mismatch" -DCMAKE_CXX_FLAGS="/fp:precise /clang:-Wno-nonportable-include-path /clang:-Wno-cast-function-type-mismatch" -DCMAKE_EXE_LINKER_FLAGS=/manifest:no -DCMAKE_MODULE_LINKER_FLAGS=/manifest:no -DCMAKE_SHARED_LINKER_FLAGS=/manifest:no +# build_cache_suffix: icx + +# e2e-win: +# needs: build-win +# # Continue if build was successful. +# if: | +# !cancelled() && +# needs.build-win.outputs.build_conclusion == 'success' +# uses: ./.github/workflows/sycl-windows-run-tests.yml +# with: +# name: Intel GEN12 Graphics with Level Zero +# runner: '["Windows","gen12"]' +# target_devices: "level_zero:gpu" +# toolchain_artifact_filename: ${{ needs.build-win.outputs.toolchain_artifact_filename }} +# cxx: icx +# # https://github.com/intel/llvm/issues/18458 +# env: "{'LIT_FILTER_OUT':'std_array.cpp|compile_on_win_with_mdd.cpp'}" + +# macos_default: +# name: macOS +# if: github.repository == 'intel/llvm' +# uses: ./.github/workflows/sycl-macos-build-and-test.yml diff --git a/devops/actions/run-tests/e2e/action.yml b/devops/actions/run-tests/e2e/action.yml index f277e02518359..eeeee8a6b3e44 100644 --- a/devops/actions/run-tests/e2e/action.yml +++ b/devops/actions/run-tests/e2e/action.yml @@ -62,6 +62,12 @@ runs: if [ -n "$CMAKE_EXTRA_ARGS" ]; then echo "opts=$CMAKE_EXTRA_ARGS" >> $GITHUB_OUTPUT fi + - name: Check cpu + shell: bash + run: | + lscpu + lscpu | grep "Model name" + - name: Configure E2E tests if: inputs.testing_mode != 'run-only' shell: bash @@ -73,7 +79,9 @@ runs: shell: bash env: LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param print_features=True --param test-mode=${{ inputs.testing_mode }} --param sycl_devices=${{ inputs.target_devices }} ${{ inputs.extra_lit_opts }} + # LIT_OPTS: -j 12 -v --param "sycl_devices=level_zero_v2:arch-intel_gpu_mtl_u" sycl/test-e2e/ run: | + echo "LIT_OPTS: $LIT_OPTS" ninja -C build-e2e check-sycl-e2e > e2e.log 2>&1 # Two steps below are duplicated between Lin/Win actions, updates must change both - name: E2E logs diff --git a/sycl/test-e2e/AddressSanitizer/lit.local.cfg b/sycl/test-e2e/AddressSanitizer/lit.local.cfg index 50308766f8292..7694aea414c55 100644 --- a/sycl/test-e2e/AddressSanitizer/lit.local.cfg +++ b/sycl/test-e2e/AddressSanitizer/lit.local.cfg @@ -31,4 +31,5 @@ unsupported_san_flags = [ if any(flag in config.cxx_flags for flag in unsupported_san_flags): config.unsupported=True -config.environment["ZE_AFFINITY_MASK"] = "0" +if config.ze_affinity_mask is not None: + config.environment["ZE_AFFINITY_MASK"] = config.ze_affinity_mask diff --git a/sycl/test-e2e/MemorySanitizer/lit.local.cfg b/sycl/test-e2e/MemorySanitizer/lit.local.cfg index a3cbd769b9d5c..18c7f7bd8f73f 100644 --- a/sycl/test-e2e/MemorySanitizer/lit.local.cfg +++ b/sycl/test-e2e/MemorySanitizer/lit.local.cfg @@ -39,4 +39,5 @@ unsupported_san_flags = [ if any(flag in config.cxx_flags for flag in unsupported_san_flags): config.unsupported=True -config.environment["ZE_AFFINITY_MASK"] = "0" +if config.ze_affinity_mask is not None: + config.environment["ZE_AFFINITY_MASK"] = config.ze_affinity_mask diff --git a/sycl/test-e2e/ThreadSanitizer/lit.local.cfg b/sycl/test-e2e/ThreadSanitizer/lit.local.cfg index c8234bc536a41..83db05b539f5b 100644 --- a/sycl/test-e2e/ThreadSanitizer/lit.local.cfg +++ b/sycl/test-e2e/ThreadSanitizer/lit.local.cfg @@ -34,4 +34,5 @@ unsupported_san_flags = [ if any(flag in config.cxx_flags for flag in unsupported_san_flags): config.unsupported=True -config.environment["ZE_AFFINITY_MASK"] = "0" +if config.ze_affinity_mask is not None: + config.environment["ZE_AFFINITY_MASK"] = config.ze_affinity_mask diff --git a/sycl/test-e2e/lit.cfg.py b/sycl/test-e2e/lit.cfg.py index d39cd7134e603..45b460f6527d0 100644 --- a/sycl/test-e2e/lit.cfg.py +++ b/sycl/test-e2e/lit.cfg.py @@ -96,6 +96,7 @@ "LIBCLANG_NOTHREADS", "LIBCLANG_RESOURCE_USAGE", "LIBCLANG_CODE_COMPLETION_LOGGING", + "ZE_AFFINITY_MASK", ] # Names of the Release and Debug versions of the XPTIFW library @@ -917,12 +918,14 @@ def get_sycl_ls_verbose(sycl_device, env): env = copy.copy(llvm_config.config.environment) + backend_for_selector = backend.replace("_v2", "").replace("_v1", "") + # Find all available devices under the backend - env["ONEAPI_DEVICE_SELECTOR"] = backend + ":*" + env["ONEAPI_DEVICE_SELECTOR"] = backend_for_selector + ":*" detected_architectures = [] - platform_devices = remove_level_zero_suffix(backend + ":*") + platform_devices = backend_for_selector + ":*" for line in get_sycl_ls_verbose(platform_devices, env).stdout.splitlines(): if re.match(r" *Architecture:", line): @@ -948,6 +951,15 @@ def get_sycl_ls_verbose(sycl_device, env): config.sycl_devices = filtered_sycl_devices +# Determine ZE_AFFINITY_MASK for Level Zero devices. +# Sanitizer tests need to set ZE_AFFINITY_MASK to a single device index +config.ze_affinity_mask = None +for sycl_device in remove_level_zero_suffix(config.sycl_devices): + be, dev = sycl_device.split(":") + if be == "level_zero" and dev.isdigit(): + config.ze_affinity_mask = dev + break + for sycl_device in remove_level_zero_suffix(config.sycl_devices): be, dev = sycl_device.split(":") config.available_features.add("any-device-is-" + dev) @@ -1114,6 +1126,13 @@ def get_sycl_ls_verbose(sycl_device, env): features.update(device_family) be, dev = sycl_device.split(":") + if dev.isdigit(): + backend_devices = available_devices.get(be, "gpu") + if isinstance(backend_devices, tuple): + # arch-selection is typically used to select gpu device + dev = "gpu" + else: + dev = backend_devices features.add(dev.replace("fpga", "accelerator")) if "level_zero_v2" in full_name: features.add("level_zero_v2_adapter")