diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index 13583e7a44142..7e0a5d6207428 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -223,47 +223,6 @@ jobs: fi cmake --build $GITHUB_WORKSPACE/build --target check-llvm - - name: check-clang - if: ${{ !cancelled() && contains(inputs.changes, 'clang') }} - env: - # Can't inline to support possible quotes inside: - BUILD_CONFIGURE_EXTRA_ARGS: ${{ inputs.build_configure_extra_args }} - run: | - # Can we move this to Dockerfile? Hopefully, noop on Windows. - export XDG_CACHE_HOME=$GITHUB_WORKSPACE/os_cache - if [[ "${BUILD_CONFIGURE_EXTRA_ARGS}" == *"--use-libcxx"* ]]; then - # https://github.com/llvm/llvm-project/issues/59428 - export LIT_FILTER_OUT="(E|e)xception" - fi - cmake --build $GITHUB_WORKSPACE/build --target check-clang - - name: check-sycl - if: ${{ !cancelled() && contains(inputs.changes, 'sycl') }} - run: | - # TODO consider moving this to Dockerfile. - export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH - cmake --build $GITHUB_WORKSPACE/build --target check-sycl - - name: check-sycl-unittests - if: ${{ !cancelled() && contains(inputs.changes, 'sycl') }} - run: | - # TODO consider moving this to Dockerfile. - export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH - cmake --build $GITHUB_WORKSPACE/build --target check-sycl-unittests - - name: check-llvm-spirv - if: ${{ !cancelled() && contains(inputs.changes, 'llvm_spirv') }} - run: | - cmake --build $GITHUB_WORKSPACE/build --target check-llvm-spirv - - name: check-xptifw - if: ${{ !cancelled() && contains(inputs.changes, 'xptifw') }} - run: | - cmake --build $GITHUB_WORKSPACE/build --target check-xptifw - - name: check-libclc - if: ${{ !cancelled() && contains(inputs.changes, 'libclc') }} - run: | - cmake --build $GITHUB_WORKSPACE/build --target check-libclc - - name: check-libdevice - if: ${{ !cancelled() && contains(inputs.changes, 'sycl') }} - run: | - cmake --build $GITHUB_WORKSPACE/build --target check-libdevice - name: Check E2E test requirements if: ${{ !cancelled() && !contains(inputs.changes, 'sycl') }} run: | @@ -368,3 +327,18 @@ jobs: binaries_artifact: ${{ inputs.e2e_binaries_preview_artifact }} sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++ extra_lit_opts: --param test-preview-mode=True + + - name: Build E2E tests with NewOffloadModel + if: | + inputs.e2e_binaries_preview_artifact && + !cancelled() + && steps.build.conclusion == 'success' && + contains(github.event.pull_request.labels.*.name, 'new-offload-model') + uses: ./devops/actions/run-tests/e2e + with: + ref: ${{ inputs.ref || github.sha }} + testing_mode: build-only + target_devices: all + binaries_artifact: ${{ inputs.e2e_binaries_with_new_offload_model }} + sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++ + extra_lit_opts: --param enable_new_offload_model=True \ No newline at end of file diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index bef9396b049eb..2f7b32f454a00 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -219,7 +219,105 @@ jobs: toolchain_artifact_filename: ${{ needs.build.outputs.toolchain_artifact_filename }} toolchain_decompress_command: ${{ needs.build.outputs.toolchain_decompress_command }} binaries_artifact: ${{ matrix.binaries_artifact || 'e2e_bin' }} - testing_mode: 'run-only' + testing_mode: ${{ matrix.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') || matrix.skip_run || 'false'}} + env: ${{ matrix.env || (contains(needs.detect_changes.outputs.filters, 'esimd') && '{}' || '{"LIT_FILTER_OUT":"ESIMD/"}') }} + + E2E-with-new-offload-model: + needs: [build, detect_changes, compat_read_exclude] + if: | + !cancelled() && + needs.build.outputs.build_conclusion == 'success' && + contains(github.event.pull_request.labels.*.name, 'new-offload-model') + permissions: + contents: write + packages: read + 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 + binaries_artifact: e2e_bin_preview + + # We're in an ABI-breaking window, so these don't make sense for now. + - 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 }}"' + binaries_artifact: 'in-container' + skip_run: true + - 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 }}"' + binaries_artifact: 'in-container' + skip_run: true + + 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 }} " --param enable_new_offload_model=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 }} + binaries_artifact: ${{ matrix.binaries_artifact || 'e2e_bin' }} + testing_mode: ${{ matrix.testing_mode || 'run-only' }} # Do not install drivers on AMD and CUDA runners. install_igc_driver: >- diff --git a/.github/workflows/sycl-nightly.yml b/.github/workflows/sycl-nightly.yml index e09db20b90369..e4c00b1e58ae7 100644 --- a/.github/workflows/sycl-nightly.yml +++ b/.github/workflows/sycl-nightly.yml @@ -1,5 +1,6 @@ name: SYCL Nightly + on: workflow_dispatch: schedule: @@ -8,23 +9,6 @@ on: permissions: read-all jobs: - check_abi_symbols: - name: Check ABI symbols tests match release branch - runs-on: [Linux, build] - # We're in the ABI breaking window now, disabling until the next major - # release. - if: github.repository == 'intel/llvm' && false - container: ghcr.io/intel/llvm/ubuntu2404_build - steps: - - uses: actions/checkout@v5 - with: - sparse-checkout: | - sycl/test/abi - - run: | - git fetch --depth=1 origin sycl-rel-6_3 - git diff --exit-code -I "^# RUN" origin/sycl-rel-6_3:sycl/test/abi/sycl_symbols_linux.dump sycl/test/abi/sycl_symbols_linux-sycl-rel-6_3.dump - git diff --exit-code -I "^# RUN" origin/sycl-rel-6_3:sycl/test/abi/sycl_symbols_windows.dump sycl/test/abi/sycl_symbols_windows-sycl-rel-6_3.dump - get_date: runs-on: ubuntu-latest outputs: @@ -49,48 +33,6 @@ jobs: # prefer widespread gzip compression. toolchain_artifact_filename: sycl_linux.tar.gz - # Build used for performance testing only: not intended for testing - linux_shared_build: - if: github.repository == 'intel/llvm' - uses: ./.github/workflows/sycl-linux-build.yml - secrets: inherit - with: - build_cache_root: "/__w/" - build_cache_suffix: sprod_shared - build_configure_extra_args: '--shared-libs --hip --cuda --native_cpu --no-assertions' - build_target: all - - toolchain_artifact: sycl_linux_sprod_shared - toolchain_artifact_filename: sycl_linux_shared.tar.zst - - ubuntu2404_oneapi_build: - if: github.repository == 'intel/llvm' - uses: ./.github/workflows/sycl-linux-build.yml - secrets: inherit - with: - build_cache_root: "/__w/" - build_cache_suffix: oneapi - build_configure_extra_args: -DCMAKE_C_FLAGS="-no-intel-lib -ffp-model=precise" -DCMAKE_CXX_FLAGS="-no-intel-lib -ffp-model=precise" - cc: icx - cxx: icpx - - toolchain_artifact: sycl_linux_oneapi - toolchain_artifact_filename: sycl_linux_oneapi.tar.zst - - ubuntu2404_libcxx_build: - if: github.repository == 'intel/llvm' - uses: ./.github/workflows/sycl-linux-build.yml - secrets: inherit - with: - build_cache_root: "/__w/" - build_cache_suffix: libcxx - build_configure_extra_args: --use-libcxx -DLLVM_SPIRV_ENABLE_LIBSPIRV_DIS=OFF - cc: clang-18 - cxx: clang++-18 - - toolchain_artifact: sycl_linux_libcxx - toolchain_artifact_filename: sycl_linux_libcxx.tar.zst - ubuntu2204_test: needs: [ubuntu2204_build] permissions: @@ -167,6 +109,66 @@ jobs: runner: '["Linux", "pvc"]' target_devices: level_zero:gpu extra_lit_opts: --param test-preview-mode=True + + - name: AMD/HIP with NewOffloadModel + runner: '["Linux", "amdgpu"]' + image_options: -u 1001 --device=/dev/dri --device=/dev/kfd + target_devices: hip:gpu + extra_lit_opts: --param enable_new_offload_model=True --param enable_new_offload_model=True + + - name: NVIDIA/CUDA with NewOffloadModel + runner: '["Linux", "cuda"]' + image_options: -u 1001 --gpus all --cap-add SYS_ADMIN + target_devices: cuda:gpu + extra_lit_opts: --param enable_new_offload_model=True + + - name: Intel L0 Gen12 GPU with NewOffloadModel + runner: '["Linux", "gen12"]' + target_devices: level_zero:gpu + extra_lit_opts: --param enable_new_offload_model=True + + - name: Intel L0 Ponte Vecchio GPU with NewOffloadModel + runner: '["Linux", "pvc"]' + target_devices: level_zero:gpu + extra_lit_opts: --param enable_new_offload_model=True + + - name: Intel L0 Battlemage GPU with NewOffloadModel + runner: '["Linux", "bmg"]' + target_devices: level_zero:gpu + extra_lit_opts: --param enable_new_offload_model=True + + - name: Preview mode on Intel L0 Battlemage GPU with NewOffloadModel + runner: '["Linux", "bmg"]' + target_devices: level_zero:gpu + extra_lit_opts: --param test-preview-mode=True + + - name: Intel L0 Arc A-Series GPU with NewOffloadModel + runner: '["Linux", "arc"]' + target_devices: level_zero:gpu + extra_lit_opts: --param enable_new_offload_model=True + + - name: Intel OCL Gen12 GPU with NewOffloadModel + runner: '["Linux", "gen12"]' + target_devices: opencl:gpu + extra_lit_opts: --param enable_new_offload_model=True + + - name: OCL CPU (AMD) with NewOffloadModel + runner: '["Linux", "amdcpu"]' + image_options: -u 1001 + target_devices: opencl:cpu + extra_lit_opts: --param enable_new_offload_model=True + + - name: OCL CPU (Intel/GEN12) with NewOffloadModel + runner: '["Linux", "gen12"]' + image_options: -u 1001 --privileged --cap-add SYS_ADMIN + target_devices: opencl:cpu + extra_lit_opts: --param enable_new_offload_model=True + + - name: OCL CPU (Intel/Arc) with NewOffloadModel + runner: '["Linux", "arc"]' + image_options: -u 1001 + target_devices: opencl:cpu + extra_lit_opts: --param enable_new_offload_model=True uses: ./.github/workflows/sycl-linux-run-tests.yml with: @@ -181,24 +183,6 @@ jobs: toolchain_artifact_filename: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact_filename }} toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.toolchain_decompress_command }} - ubuntu2404_oneapi_test: - needs: [ubuntu2404_oneapi_build] - permissions: - contents: write - packages: read - if: ${{ !cancelled() && needs.ubuntu2404_oneapi_build.outputs.build_conclusion == 'success' }} - uses: ./.github/workflows/sycl-linux-run-tests.yml - with: - name: Intel PVC L0 oneAPI - runner: '["Linux", "pvc"]' - target_devices: level_zero:gpu - extra_lit_opts: -j 50 - image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN - repo_ref: ${{ github.sha }} - toolchain_artifact: ${{ needs.ubuntu2404_oneapi_build.outputs.toolchain_artifact }} - toolchain_artifact_filename: ${{ needs.ubuntu2404_oneapi_build.outputs.toolchain_artifact_filename }} - toolchain_decompress_command: ${{ needs.ubuntu2404_oneapi_build.outputs.toolchain_decompress_command }} - build-win: needs: get_date uses: ./.github/workflows/sycl-windows-build.yml @@ -222,215 +206,212 @@ jobs: fail-fast: false matrix: include: - - name: Intel L0 Gen12 GPU + #- name: Intel L0 Gen12 GPU + # runner: '["Windows", "gen12"]' + # target_devices: level_zero:gpu + + #- name: Intel L0 Arc GPU + # runner: '["Windows", "arc"]' + # target_devices: level_zero:gpu + + #- name: Intel L0 Battlemage GPU + # runner: '["Windows", "bmg"]' + # target_devices: level_zero:gpu + + - name: Intel L0 Gen12 GPU with NewOffloadModel runner: '["Windows", "gen12"]' target_devices: level_zero:gpu + extra_lit_opts: --param enable_new_offload_model=True - - name: Intel L0 Arc GPU + - name: Intel L0 Arc GPU with NewOffloadModel runner: '["Windows", "arc"]' target_devices: level_zero:gpu + extra_lit_opts: --param enable_new_offload_model=True - - name: Intel L0 Battlemage GPU + - name: Intel L0 Battlemage GPU with NewOffloadModel runner: '["Windows", "bmg"]' target_devices: level_zero:gpu + extra_lit_opts: --param enable_new_offload_model=True uses: ./.github/workflows/sycl-windows-run-tests.yml with: name: ${{ matrix.name }} runner: ${{ matrix.runner }} target_devices: ${{ matrix.target_devices }} + extra_lit_opts: ${{ matrix.extra_lit_opts }} toolchain_artifact_filename: ${{ needs.build-win.outputs.toolchain_artifact_filename }} - cuda-aws-start: - needs: [ubuntu2204_build] - if: ${{ !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }} - uses: ./.github/workflows/sycl-aws.yml - secrets: inherit - with: - mode: start - - cuda-run-tests: - needs: [ubuntu2204_build, cuda-aws-start] - permissions: - contents: write - packages: read - if: ${{ !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }} - uses: ./.github/workflows/sycl-linux-run-tests.yml - with: - name: CUDA E2E - runner: '["aws_cuda-${{ github.run_id }}-${{ github.run_attempt }}"]' - image: ghcr.io/intel/llvm/ubuntu2204_build:latest - image_options: -u 1001 --gpus all --cap-add SYS_ADMIN --env NVIDIA_DISABLE_REQUIRE=1 - target_devices: cuda:gpu - repo_ref: ${{ github.sha }} - - toolchain_artifact: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact }} - toolchain_artifact_filename: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact_filename }} - toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.toolchain_decompress_command }} - - cuda-aws-stop: - needs: [cuda-aws-start, cuda-run-tests] - if: ${{ needs.cuda-aws-start.result != 'skipped' }} - uses: ./.github/workflows/sycl-aws.yml - secrets: inherit - with: - mode: stop - - build-sycl-cts-linux: - needs: ubuntu2204_build - permissions: - contents: write - packages: read - if: ${{ !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }} - uses: ./.github/workflows/sycl-linux-run-tests.yml - with: - name: Build SYCL-CTS for Linux - runner: '["Linux", "build"]' - testing_mode: 'build-only' - image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN - tests_selector: cts - repo_ref: ${{ github.sha }} - toolchain_artifact: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact }} - toolchain_artifact_filename: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact_filename }} - toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.toolchain_decompress_command }} - binaries_artifact: sycl_cts_bin_linux - - run-sycl-cts-linux: - needs: [ubuntu2204_build, build-sycl-cts-linux] - permissions: - contents: write - packages: read - if: ${{ !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }} - strategy: - fail-fast: false - matrix: - include: - - name: SYCL-CTS on OCL CPU - runner: '["Linux", "gen12"]' - image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN - target_devices: opencl:cpu - - - name: SYCL-CTS on L0 gen12 - runner: '["Linux", "gen12"]' - image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN - target_devices: level_zero:gpu - uses: ./.github/workflows/sycl-linux-run-tests.yml - with: - name: ${{ matrix.name }} - runner: ${{ matrix.runner }} - testing_mode: 'run-only' - image_options: ${{ matrix.image_options }} - target_devices: ${{ matrix.target_devices }} - tests_selector: cts - repo_ref: ${{ github.sha }} - toolchain_artifact: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact }} - toolchain_artifact_filename: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact_filename }} - toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.toolchain_decompress_command }} - binaries_artifact: sycl_cts_bin_linux - - build-sycl-cts-win: - needs: build-win - if: ${{ !cancelled() && needs.build-win.outputs.build_conclusion == 'success' }} - uses: ./.github/workflows/sycl-windows-run-tests.yml - with: - name: Build SYCL-CTS for Windows - runner: '["Windows", "build"]' - testing_mode: 'build-only' - tests_selector: cts - repo_ref: ${{ github.sha }} - toolchain_artifact_filename: ${{ needs.build-win.outputs.toolchain_artifact_filename }} - binaries_artifact: sycl_cts_bin_win - - run-sycl-cts-win: - needs: [build-win, build-sycl-cts-win] - if: ${{ !cancelled() && needs.build-win.outputs.build_conclusion == 'success' }} - strategy: - fail-fast: false - matrix: - include: - - name: SYCL-CTS on L0 gen12 - runner: '["Windows", "gen12"]' - target_devices: level_zero:gpu - uses: ./.github/workflows/sycl-windows-run-tests.yml - with: - name: ${{ matrix.name }} - runner: ${{ matrix.runner }} - testing_mode: 'run-only' - target_devices: ${{ matrix.target_devices }} - tests_selector: cts - repo_ref: ${{ github.sha }} - toolchain_artifact_filename: ${{ needs.build-win.outputs.toolchain_artifact_filename }} - binaries_artifact: sycl_cts_bin_win - - # Verification example: - # cosign-windows-amd64.exe verify-blob sycl_linux.tar.gz \ - # --bundle sycl_linux.tar.gz.sigstore.json \ - # --certificate-oidc-issuer https://token.actions.githubusercontent.com \ - # --certificate-identity https://github.com/intel/llvm/.github/workflows/sycl-nightly.yml@refs/heads/sycl - nightly_build_upload: - name: Nightly Build Upload - if: ${{ github.ref_name == 'sycl' }} - needs: [get_date, ubuntu2204_build, build-win] - runs-on: ubuntu-latest - permissions: - contents: write - id-token: write - steps: - - uses: actions/download-artifact@v6 - with: - name: sycl_linux_default - - uses: actions/download-artifact@v6 - with: - name: sycl_windows_default - - name: Sign with sigstore/cosign - uses: sigstore/gh-action-sigstore-python@f832326173235dcb00dd5d92cd3f353de3188e6c # v3.1.0 - with: - inputs: sycl_linux.tar.gz sycl_windows.tar.gz - - name: Compute tag - id: tag - run: | - if [ "${{ github.event_name == 'schedule' }}" == "true" ]; then - echo "TAG=${{ needs.get_date.outputs.date }}" >> "$GITHUB_OUTPUT" - else - # TODO: Use date of the commit? - echo "TAG=${{ needs.get_date.outputs.date }}-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" - fi - - name: Upload binaries - uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1 - with: - files: | - sycl_linux.tar.gz - sycl_windows.tar.gz - sycl_linux.tar.gz.sigstore.json - sycl_windows.tar.gz.sigstore.json - tag_name: nightly-${{ steps.tag.outputs.TAG }} - name: DPC++ daily ${{ steps.tag.outputs.TAG }} - prerelease: true - body: "Daily build ${{ steps.tag.outputs.TAG }}" - target_commitish: ${{ github.sha }} - - docker_build_push: - if: github.repository == 'intel/llvm' - runs-on: [Linux, build] - permissions: - packages: write - needs: ubuntu2204_build - steps: - - uses: actions/checkout@v5 - - uses: actions/download-artifact@v6 - with: - name: sycl_linux_default - path: devops/ - - name: Build and Push Container - uses: ./devops/actions/build_container - with: - push: ${{ github.ref_name == 'sycl' }} - file: nightly - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - build-args: | - base_image=ghcr.io/intel/llvm/ubuntu2404_intel_drivers - base_tag=alldeps - tags: | - ghcr.io/${{ github.repository }}/sycl_ubuntu2404_nightly:${{ github.sha }} - ghcr.io/${{ github.repository }}/sycl_ubuntu2404_nightly:latest + #build-sycl-cts-linux: + # needs: ubuntu2204_build + # permissions: + # contents: write + # packages: read + # if: ${{ !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }} + # uses: ./.github/workflows/sycl-linux-run-tests.yml + # with: + # name: Build SYCL-CTS for Linux + # runner: '["Linux", "build"]' + # testing_mode: 'build-only' + # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN + # tests_selector: cts + # repo_ref: ${{ github.sha }} + # toolchain_artifact: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact }} + # toolchain_artifact_filename: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact_filename }} + # toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.toolchain_decompress_command }} + # binaries_artifact: sycl_cts_bin_linux + + #run-sycl-cts-linux: + # needs: [ubuntu2204_build, build-sycl-cts-linux] + # permissions: + # contents: write + # packages: read + # if: ${{ !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }} + # strategy: + # fail-fast: false + # matrix: + # include: + # - name: SYCL-CTS on OCL CPU + # runner: '["Linux", "gen12"]' + # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN + # target_devices: opencl:cpu +# + # - name: SYCL-CTS on L0 gen12 + # runner: '["Linux", "gen12"]' + # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN + # target_devices: level_zero:gpu + # uses: ./.github/workflows/sycl-linux-run-tests.yml + # with: + # name: ${{ matrix.name }} + # runner: ${{ matrix.runner }} + # testing_mode: 'run-only' + # image_options: ${{ matrix.image_options }} + # target_devices: ${{ matrix.target_devices }} + # tests_selector: cts + # repo_ref: ${{ github.sha }} + # toolchain_artifact: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact }} + # toolchain_artifact_filename: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact_filename }} + # toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.toolchain_decompress_command }} + # binaries_artifact: sycl_cts_bin_linux + + #build-with-new-offload-sycl-cts-linux: + # needs: ubuntu2204_build + # permissions: + # contents: write + # packages: read + # if: ${{ !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }} + # uses: ./.github/workflows/sycl-linux-run-tests.yml + # with: + # name: Build SYCL-CTS for Linux + # runner: '["Linux", "build"]' + # testing_mode: 'build-only' + # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN + # tests_selector: cts + # extra_lit_opts: "--param enable_new_offload_model=True" + # repo_ref: ${{ github.sha }} + # toolchain_artifact: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact }} + # toolchain_artifact_filename: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact_filename }} + # toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.toolchain_decompress_command }} + # binaries_artifact: sycl_cts_bin_linux_with_new_offload_model + + #run-with-new-offload-sycl-cts-linux: + # needs: [ubuntu2204_build, build-with-new-offload-sycl-cts-linux] + # permissions: + # contents: write + # packages: read + # if: ${{ !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }} + # strategy: + # fail-fast: false + # matrix: + # include: + # - name: SYCL-CTS on OCL CPU + # runner: '["Linux", "gen12"]' + # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN + # target_devices: opencl:cpu +# + # - name: SYCL-CTS on L0 gen12 + # runner: '["Linux", "gen12"]' + # image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN + # target_devices: level_zero:gpu + # uses: ./.github/workflows/sycl-linux-run-tests.yml + # with: + # name: ${{ matrix.name }} + # runner: ${{ matrix.runner }} + # testing_mode: 'run-only' + # image_options: ${{ matrix.image_options }} + # target_devices: ${{ matrix.target_devices }} + # tests_selector: cts + # extra_lit_opts: "--param enable_new_offload_model=True" + # repo_ref: ${{ github.sha }} + # toolchain_artifact: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact }} + # toolchain_artifact_filename: ${{ needs.ubuntu2204_build.outputs.toolchain_artifact_filename }} + # toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.toolchain_decompress_command }} + # binaries_artifact: sycl_cts_bin_linux_with_new_offload_model + + #build-sycl-cts-win: + # needs: build-win + # if: ${{ !cancelled() && needs.build-win.outputs.build_conclusion == 'success' }} + # uses: ./.github/workflows/sycl-windows-run-tests.yml + # with: + # name: Build SYCL-CTS for Windows + # runner: '["Windows", "build"]' + # testing_mode: 'build-only' + # tests_selector: cts + # repo_ref: ${{ github.sha }} + # toolchain_artifact_filename: ${{ needs.build-win.outputs.toolchain_artifact_filename }} + # binaries_artifact: sycl_cts_bin_win + + #run-sycl-cts-win: + # needs: [build-win, build-sycl-cts-win] + # if: ${{ !cancelled() && needs.build-win.outputs.build_conclusion == 'success' }} + # strategy: + # fail-fast: false + # matrix: + # include: + # - name: SYCL-CTS on L0 gen12 + # runner: '["Windows", "gen12"]' + # target_devices: level_zero:gpu + # uses: ./.github/workflows/sycl-windows-run-tests.yml + # with: + # name: ${{ matrix.name }} + # runner: ${{ matrix.runner }} + # testing_mode: 'run-only' + # target_devices: ${{ matrix.target_devices }} + # tests_selector: cts + # repo_ref: ${{ github.sha }} + # toolchain_artifact_filename: ${{ needs.build-win.outputs.toolchain_artifact_filename }} + # binaries_artifact: sycl_cts_bin_win + + #build-with-new-offload-model-sycl-cts-win: + # needs: build-win + # if: ${{ !cancelled() && needs.build-win.outputs.build_conclusion == 'success' }} + # uses: ./.github/workflows/sycl-windows-run-tests.yml + # with: + # name: Build SYCL-CTS for Windows + # runner: '["Windows", "build"]' + # testing_mode: 'build-only' + # tests_selector: cts + # extra_lit_opts: "--param enable_new_offload_model=True" + # repo_ref: ${{ github.sha }} + # toolchain_artifact_filename: ${{ needs.build-win.outputs.toolchain_artifact_filename }} + # binaries_artifact: sycl_cts_bin_win_with_new_offload_model + + #run-with-new-offload-sycl-cts-win: + # needs: [build-win, build-with-new-offload-model-sycl-cts-win] + # if: ${{ !cancelled() && needs.build-win.outputs.build_conclusion == 'success' }} + # strategy: + # fail-fast: false + # matrix: + # include: + # - name: SYCL-CTS on L0 gen12 + # runner: '["Windows", "gen12"]' + # target_devices: level_zero:gpu + # uses: ./.github/workflows/sycl-windows-run-tests.yml + # with: + # name: ${{ matrix.name }} + # runner: ${{ matrix.runner }} + # testing_mode: 'run-only' + # target_devices: ${{ matrix.target_devices }} + # tests_selector: cts + # repo_ref: ${{ github.sha }} + # toolchain_artifact_filename: ${{ needs.build-win.outputs.toolchain_artifact_filename }} + # binaries_artifact: sycl_cts_bin_win_with_new_offload_model diff --git a/.github/workflows/sycl-windows-build.yml b/.github/workflows/sycl-windows-build.yml index 829031649dab1..66fa805967dcd 100644 --- a/.github/workflows/sycl-windows-build.yml +++ b/.github/workflows/sycl-windows-build.yml @@ -160,49 +160,6 @@ jobs: run: | cmake --build build --target ${{ inputs.build_target }} - run: build/bin/clang++ --version - - name: check-llvm - if: ${{ !cancelled() && contains(inputs.changes, 'llvm') }} - shell: bash - run: | - cmake --build build --target check-llvm - - name: check-clang - if: ${{ !cancelled() && contains(inputs.changes, 'clang') }} - run: | - cmake --build build --target check-clang - - name: check-sycl - if: ${{ !cancelled() && contains(inputs.changes, 'sycl') }} - shell: bash - run: | - cmake --build build --target check-sycl - - name: check-sycl-unittests - if: ${{ !cancelled() && contains(inputs.changes, 'sycl') }} - run: | - cmake --build build --target check-sycl-unittests - - name: check-llvm-spirv - if: ${{ !cancelled() && contains(inputs.changes, 'llvm_spirv') }} - run: | - cmake --build build --target check-llvm-spirv - - name: check-xptifw - if: ${{ !cancelled() && contains(inputs.changes, 'xptifw') }} - run: | - cmake --build build --target check-xptifw - - name: check-libdevice - if: ${{ !cancelled() && contains(inputs.changes, 'sycl') }} - run: | - cmake --build build --target check-libdevice - - name: Generate/diff new ABI symbols - if: ${{ !cancelled() && contains(inputs.changes, 'sycl') }} - shell: bash - run: | - LLVM_BIN_PATH="build/bin" python.exe src/sycl/tools/abi_check.py --mode dump_symbols --output build/new_sycl_symbols_windows.dump build/bin/sycl?.dll - diff -Naur src/sycl/test/abi/sycl_symbols_windows.dump build/new_sycl_symbols_windows.dump || true - - name: Upload new ABI symbols - if: ${{ !cancelled() && contains(inputs.changes, 'sycl') }} - uses: actions/upload-artifact@v5 - with: - name: sycl_windows_abi_symbols - path: build/new_sycl_symbols_windows.dump - retention-days: ${{ inputs.retention-days }} - name: Install sycl-toolchain if: ${{ !cancelled() && steps.build.conclusion == 'success' }} run: | @@ -255,6 +212,21 @@ jobs: extra_lit_opts: --param sycl_build_targets="spir" cxx: ${{ inputs.cxx }} + - name: Build E2E tests with New Offload Model + if: | + inputs.e2e_binaries_artifact && + !cancelled() && + steps.build.conclusion == 'success' && + contains(github.event.pull_request.labels.*.name, 'new-offload-model') + uses: ./devops/actions/run-tests/windows/e2e + with: + ref: ${{ inputs.ref || github.sha }} + testing_mode: build-only + target_devices: all + binaries_artifact: ${{ inputs.e2e_binaries_artifact_with_new_offload_model }} + extra_lit_opts: --param sycl_build_targets="spir" --param enable_new_offload_model=True + cxx: ${{ inputs.cxx }} + - name: Detect hung tests if: always() shell: powershell diff --git a/sycl/test-e2e/Compression/compression_separate_compile.cpp b/sycl/test-e2e/Compression/compression_separate_compile.cpp index 210d0372b41e0..36c782d8a5193 100644 --- a/sycl/test-e2e/Compression/compression_separate_compile.cpp +++ b/sycl/test-e2e/Compression/compression_separate_compile.cpp @@ -9,6 +9,9 @@ // XFAIL: target-native_cpu // XFAIL-TRACKER: https://github.com/intel/llvm/issues/20397 +// XFAIL: new-offload-model +// XFAIL-TRACKER: CMPLRLLVM-71777 + // CPU AOT targets host isa, so we compile everything on the run system instead. ////////////////////// Compile device images // RUN: %{run-aux} %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/E2EExpr.py b/sycl/test-e2e/E2EExpr.py index d39ee5f6a1f09..7afeec4c15166 100644 --- a/sycl/test-e2e/E2EExpr.py +++ b/sycl/test-e2e/E2EExpr.py @@ -48,6 +48,7 @@ class E2EExpr(BooleanExpression): "pdtracker", "ze_debug", "device-config-file", + "new-offload-model", } def __init__(self, string, variables, build_only_mode, final_unknown_value): diff --git a/sycl/test-e2e/README.md b/sycl/test-e2e/README.md index 159dbb8f2d3cc..5975e8e91b4d8 100644 --- a/sycl/test-e2e/README.md +++ b/sycl/test-e2e/README.md @@ -323,6 +323,7 @@ configure specific single test execution in the command line: by CMake variable HIP_LIBS_DIR (autodetected). * **run_launcher** - part of `%{run*}` expansion/substitution to alter execution of the test by, e.g., running it through Valgrind. +* **enable_new_offload_model** - enables New Offload Model driver mode for all tests. Example: diff --git a/sycl/test-e2e/SeparateCompile/test.cpp b/sycl/test-e2e/SeparateCompile/test.cpp index 920714e72e0f0..804b1f635958d 100644 --- a/sycl/test-e2e/SeparateCompile/test.cpp +++ b/sycl/test-e2e/SeparateCompile/test.cpp @@ -1,3 +1,6 @@ +// XFAIL: new-offload-model +// XFAIL-TRACKER: CMPLRLLVM-71777 + // REQUIRES: target-spir // // FIXME Disabled fallback assert as it'll require either online linking or diff --git a/sycl/test-e2e/lit.cfg.py b/sycl/test-e2e/lit.cfg.py index d39cd7134e603..2ae20f0aa8f0e 100644 --- a/sycl/test-e2e/lit.cfg.py +++ b/sycl/test-e2e/lit.cfg.py @@ -984,6 +984,11 @@ def get_sycl_ls_verbose(sycl_device, env): "sycl-jit was not found. Tests requiring sycl-jit will be skipped." ) +# Check for enabled NewOffloadModel +if lit_config.params.get("enable_new_offload_model", "False") != "False": + config.available_features.add("new-offload-model") + config.cxx_flags += " --offload-new-driver " + # That has to be executed last so that all device-independent features have been # discovered already. config.sycl_dev_features = {}