diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 6079780044c68..7914bde02831d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -128,9 +128,6 @@ devops/ @intel/dpcpp-devops-reviewers # dev-igc driver update devops/dependencies-igc-dev.json @intel/sycl-matrix-reviewers @intel/dpcpp-esimd-reviewers @intel/dpcpp-devops-reviewers -# Benchmarking scripts -devops/scripts/benchmarks/ @intel/llvm-reviewers-benchmarking - # Kernel fusion JIT compiler sycl-jit/ @intel/dpcpp-kernel-fusion-reviewers sycl/doc/design/KernelFusionJIT.md @intel/dpcpp-kernel-fusion-reviewers @@ -211,4 +208,3 @@ llvm/test/Instrumentation/MemorySanitizer/ @intel/dpcpp-sanitizers-review llvm/test/Instrumentation/ThreadSanitizer/ @intel/dpcpp-sanitizers-review sycl/test-e2e/AddressSanitizer/ @intel/dpcpp-sanitizers-review sycl/test-e2e/MemorySanitizer/ @intel/dpcpp-sanitizers-review -sycl/test-e2e/ThreadSanitizer/ @intel/dpcpp-sanitizers-review diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 494fb660d9bec..07cce26cea833 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -65,7 +65,7 @@ jobs: fetch-depth: 1 - name: Get subprojects that have doc changes id: docs-changed-subprojects - uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1 + uses: tj-actions/changed-files@v45 with: files_yaml: | llvm: diff --git a/.github/workflows/pr-code-format.yml b/.github/workflows/pr-code-format.yml index dbcefec6f1048..ea5207fcd543e 100644 --- a/.github/workflows/pr-code-format.yml +++ b/.github/workflows/pr-code-format.yml @@ -34,7 +34,7 @@ jobs: - name: Get changed files id: changed-files - uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1 + uses: tj-actions/changed-files@v45 with: separator: "," skip_initial_fetch: true diff --git a/.github/workflows/sycl-linux-build.yml b/.github/workflows/sycl-linux-build.yml index b76609f9d66bd..f4e18f669df5c 100644 --- a/.github/workflows/sycl-linux-build.yml +++ b/.github/workflows/sycl-linux-build.yml @@ -167,7 +167,8 @@ jobs: -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DLLVM_INSTALL_UTILS=ON \ -DNATIVECPU_USE_OCK=Off \ - -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV + -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV \ + --level_zero_v1_and_v2 - name: Compile id: build run: cmake --build $GITHUB_WORKSPACE/build --target sycl-toolchain diff --git a/.github/workflows/sycl-linux-precommit-aws.yml b/.github/workflows/sycl-linux-precommit-aws.yml index e8bd368556aa9..85c26729372b6 100644 --- a/.github/workflows/sycl-linux-precommit-aws.yml +++ b/.github/workflows/sycl-linux-precommit-aws.yml @@ -21,6 +21,7 @@ permissions: jobs: create-check: + if: false runs-on: [Linux, aux-tasks] permissions: checks: write @@ -45,78 +46,107 @@ jobs: }) aws-start: + if: false runs-on: ubuntu-latest - environment: aws steps: - - uses: actions/checkout@v4 - with: - sparse-checkout: devops/actions/aws-ec2 - - run: npm install ./devops/actions/aws-ec2 - - uses: ./devops/actions/aws-ec2 - with: - mode: start - runs-on-list: '[{"runs-on":"aws_cuda-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}","aws-ami":"ami-01cb0573cb039ab24","aws-type":["g5.2xlarge","g5.4xlarge"],"aws-disk":"/dev/sda1:64","aws-spot":"false"}]' - GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} - AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} - AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} + - run: echo 'do nothing' + # create-check: + # runs-on: [Linux, aux-tasks] + # permissions: + # checks: write + # statuses: write + # steps: + # - uses: actions/github-script@v7 + # with: + # script: | + # const sha = context.payload.workflow_run.head_sha + # const run_id = '${{ github.run_id }}' + # const this_run_url = 'https://github.com/' + context.repo.owner + '/' + context.repo.repo + '/actions/runs/' + run_id - e2e-cuda: - needs: [aws-start] - uses: ./.github/workflows/sycl-linux-run-tests.yml - with: - name: CUDA E2E - runner: '["aws_cuda-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.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 - # No idea why but that seems to work and be in sync with the main - # pre-commit workflow. - repo_ref: ${{ github.event.workflow_run.referenced_workflows[0].sha }} + # // Create commit status. + # await github.request('POST /repos/{owner}/{repo}/statuses/{sha}', { + # owner: context.repo.owner, + # repo: context.repo.repo, + # sha: sha, + # state: 'pending', + # target_url: this_run_url, + # description: 'SYCL E2E on AWS CUDA', + # context: 'SYCL E2E on AWS CUDA', + # }) - sycl_toolchain_artifact: sycl_linux_default - sycl_toolchain_archive: llvm_sycl.tar.zst - sycl_toolchain_decompress_command: zstd + # aws-start: + # runs-on: ubuntu-latest + # environment: aws + # steps: + # - uses: actions/checkout@v4 + # with: + # sparse-checkout: devops/actions/aws-ec2 + # - run: npm install ./devops/actions/aws-ec2 + # - uses: ./devops/actions/aws-ec2 + # with: + # mode: start + # runs-on-list: '[{"runs-on":"aws_cuda-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}","aws-ami":"ami-01cb0573cb039ab24","aws-type":["g5.2xlarge","g5.4xlarge"],"aws-disk":"/dev/sda1:64","aws-spot":"false"}]' + # GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} + # AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} + # AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} - update-check: - needs: [create-check, e2e-cuda] - if: always() - runs-on: [Linux, aux-tasks] - permissions: - checks: write - statuses: write - steps: - - uses: actions/github-script@v7 - with: - script: | - const sha = context.payload.workflow_run.head_sha - const run_id = '${{ github.run_id }}' - const this_run_url = 'https://github.com/' + context.repo.owner + '/' + context.repo.repo + '/actions/runs/' + run_id + # e2e-cuda: + # needs: [aws-start] + # uses: ./.github/workflows/sycl-linux-run-tests.yml + # with: + # name: CUDA E2E + # runner: '["aws_cuda-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.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 + # # No idea why but that seems to work and be in sync with the main + # # pre-commit workflow. + # repo_ref: ${{ github.event.workflow_run.referenced_workflows[0].sha }} - // Update commit status. - await github.request('POST /repos/{owner}/{repo}/statuses/{sha}', { - owner: context.repo.owner, - repo: context.repo.repo, - sha: sha, - state: '${{ needs.e2e-cuda.result }}', - target_url: this_run_url, - description: 'SYCL E2E on AWS CUDA', - context: 'SYCL E2E on AWS CUDA', - }) + # sycl_toolchain_artifact: sycl_linux_default + # sycl_toolchain_archive: llvm_sycl.tar.zst + # sycl_toolchain_decompress_command: zstd - aws-stop: - needs: [aws-start, e2e-cuda] - if: always() - runs-on: ubuntu-latest - environment: aws - steps: - - uses: actions/checkout@v4 - with: - sparse-checkout: devops/actions/aws-ec2 - - run: npm install ./devops/actions/aws-ec2 - - uses: ./devops/actions/aws-ec2 - with: - mode: stop - runs-on-list: '[{"runs-on":"aws_cuda-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}","aws-ami":"ami-01cb0573cb039ab24","aws-type":["g5.2xlarge","g5.4xlarge"],"aws-disk":"/dev/sda1:64","aws-spot":"false"}]' - GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} - AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} - AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} + # update-check: + # needs: [create-check, e2e-cuda] + # if: always() + # runs-on: [Linux, aux-tasks] + # permissions: + # checks: write + # statuses: write + # steps: + # - uses: actions/github-script@v7 + # with: + # script: | + # const sha = context.payload.workflow_run.head_sha + # const run_id = '${{ github.run_id }}' + # const this_run_url = 'https://github.com/' + context.repo.owner + '/' + context.repo.repo + '/actions/runs/' + run_id + + # // Update commit status. + # await github.request('POST /repos/{owner}/{repo}/statuses/{sha}', { + # owner: context.repo.owner, + # repo: context.repo.repo, + # sha: sha, + # state: '${{ needs.e2e-cuda.result }}', + # target_url: this_run_url, + # description: 'SYCL E2E on AWS CUDA', + # context: 'SYCL E2E on AWS CUDA', + # }) + + # aws-stop: + # needs: [aws-start, e2e-cuda] + # if: always() + # runs-on: ubuntu-latest + # environment: aws + # steps: + # - uses: actions/checkout@v4 + # with: + # sparse-checkout: devops/actions/aws-ec2 + # - run: npm install ./devops/actions/aws-ec2 + # - uses: ./devops/actions/aws-ec2 + # with: + # mode: stop + # runs-on-list: '[{"runs-on":"aws_cuda-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}","aws-ami":"ami-01cb0573cb039ab24","aws-type":["g5.2xlarge","g5.4xlarge"],"aws-disk":"/dev/sda1:64","aws-spot":"false"}]' + # GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} + # AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} + # AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} diff --git a/.github/workflows/sycl-linux-precommit.yml b/.github/workflows/sycl-linux-precommit.yml index b1ea2fdb03eb6..2ac9f468f202d 100644 --- a/.github/workflows/sycl-linux-precommit.yml +++ b/.github/workflows/sycl-linux-precommit.yml @@ -12,7 +12,6 @@ on: paths-ignore: - '.github/ISSUE_TEMPLATE/**' - '.github/CODEOWNERS' - - 'sycl/cts_exclude_filter/**' - 'sycl/doc/**' - 'sycl/gdb/**' - 'clang/docs/**' @@ -38,7 +37,8 @@ jobs: build: needs: [detect_changes] - if: always() && success() + # if: always() && success() + if: false uses: ./.github/workflows/sycl-linux-build.yml with: build_ref: ${{ github.sha }} @@ -54,7 +54,8 @@ jobs: run_prebuilt_e2e_tests: needs: [build, detect_changes] - if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} + # if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }} + if: false strategy: fail-fast: false matrix: @@ -138,11 +139,12 @@ jobs: 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')) + # 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')) + if: false strategy: fail-fast: false matrix: diff --git a/.github/workflows/sycl-nightly.yml b/.github/workflows/sycl-nightly.yml index 1ccf4a2498e6b..a44dcf905af1c 100644 --- a/.github/workflows/sycl-nightly.yml +++ b/.github/workflows/sycl-nightly.yml @@ -194,12 +194,12 @@ jobs: with: mode: stop - build-sycl-cts-linux: + build-sycl-cts: needs: ubuntu2204_build if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }} uses: ./.github/workflows/sycl-linux-run-tests.yml with: - name: Build SYCL-CTS for Linux + name: Build SYCL-CTS runner: '["Linux", "build"]' cts_testing_mode: 'build-only' image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN @@ -208,10 +208,9 @@ jobs: sycl_toolchain_artifact: sycl_linux_default sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }} sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }} - sycl_cts_artifact: sycl_cts_bin_linux - run-sycl-cts-linux: - needs: [ubuntu2204_build, build-sycl-cts-linux] + run-sycl-cts: + needs: [ubuntu2204_build, build-sycl-cts] if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }} strategy: fail-fast: false @@ -238,41 +237,7 @@ jobs: sycl_toolchain_artifact: sycl_linux_default sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }} sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }} - sycl_cts_artifact: sycl_cts_bin_linux - - build-sycl-cts-win: - needs: build-win - if: ${{ always() && !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-e2e"]' - cts_testing_mode: 'build-only' - tests_selector: cts - repo_ref: ${{ github.sha }} - sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }} - sycl_cts_artifact: sycl_cts_bin_win - - run-sycl-cts-win: - needs: [build-win, build-sycl-cts-win] - if: ${{ always() && !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 }} - cts_testing_mode: 'run-only' - target_devices: ${{ matrix.target_devices }} - tests_selector: cts - repo_ref: ${{ github.sha }} - sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }} - sycl_cts_artifact: sycl_cts_bin_win + sycl_cts_artifact: sycl_cts_bin aggregate_benchmark_results: if: github.repository == 'intel/llvm' && !cancelled() diff --git a/.github/workflows/sycl-post-commit.yml b/.github/workflows/sycl-post-commit.yml index 95ae6f52ac547..43bdc3d1bf1f7 100644 --- a/.github/workflows/sycl-post-commit.yml +++ b/.github/workflows/sycl-post-commit.yml @@ -29,10 +29,6 @@ concurrency: permissions: read-all jobs: - detect_changes: - if: ${{ github.event_name == 'pull_request' }} - uses: ./.github/workflows/sycl-detect-changes.yml - build-lin: name: Linux (Self build + no-assertions) if: github.repository == 'intel/llvm' @@ -44,7 +40,7 @@ jobs: build_configure_extra_args: --no-assertions --hip --cuda --native_cpu -DSYCL_ENABLE_STACK_PRINTING=ON -DSYCL_LIB_WITH_DEBUG_SYMBOL=ON e2e-lin: - needs: [detect_changes, build-lin] + needs: [build-lin] if: ${{ always() && !cancelled() && needs.build-lin.outputs.build_conclusion == 'success' }} strategy: fail-fast: false @@ -88,13 +84,6 @@ jobs: sycl_toolchain_archive: ${{ needs.build-lin.outputs.artifact_archive_name }} sycl_toolchain_decompress_command: ${{ needs.build-lin.outputs.artifact_decompress_command }} - # 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: | always() diff --git a/.github/workflows/sycl-rel-nightly.yml b/.github/workflows/sycl-rel-nightly.yml index d85fbcadc960f..2ed4f914c2847 100644 --- a/.github/workflows/sycl-rel-nightly.yml +++ b/.github/workflows/sycl-rel-nightly.yml @@ -48,6 +48,7 @@ jobs: build_image: ghcr.io/intel/llvm/ubuntu2204_build:latest build_ref: ${{ inputs.testing_branch || 'sycl-rel-6_1_0' }} + # We upload the build for people to download/use, override its name and # prefer widespread gzip compression. artifact_archive_name: sycl_linux.tar.gz @@ -92,6 +93,7 @@ jobs: target_devices: ${{ matrix.target_devices }} tests_selector: ${{ matrix.tests_selector }} extra_lit_opts: ${{ matrix.extra_lit_opts }} + reset_intel_gpu: ${{ matrix.reset_intel_gpu }} repo_ref: ${{ inputs.testing_branch || 'sycl-rel-6_1_0' }} devops_ref: sycl sycl_toolchain_artifact: sycl_linux_default @@ -106,6 +108,7 @@ jobs: ref: ${{ inputs.testing_branch || 'sycl-rel-6_1_0' }} build_configure_extra_args: '--no-assertions --add_security_flags=sanitize' + # We upload both Linux/Windows build via Github's "Releases" # functionality, make sure Linux/Windows names follow the same pattern. artifact_archive_name: sycl_windows.tar.gz @@ -123,6 +126,7 @@ jobs: runner: '["Windows","gen12"]' sycl_toolchain_archive: ${{ needs.build-win.outputs.artifact_archive_name }} extra_lit_opts: --param gpu-intel-gen12=True + ref: sycl-rel-6_0_0 repo_ref: ${{ inputs.testing_branch || 'sycl-rel-6_1_0' }} devops_ref: sycl @@ -146,6 +150,7 @@ jobs: image_options: -u 1001 --gpus all --cap-add SYS_ADMIN --env NVIDIA_DISABLE_REQUIRE=1 target_devices: cuda:gpu repo_ref: ${{ inputs.testing_branch || 'sycl-rel-6_1_0' }} + devops_ref: sycl sycl_toolchain_artifact: sycl_linux_default @@ -161,6 +166,7 @@ jobs: mode: stop ref: ${{ inputs.testing_branch || 'sycl-rel-6_1_0' }} + build-sycl-cts: needs: ubuntu2204_build if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }} @@ -173,11 +179,9 @@ jobs: tests_selector: cts repo_ref: ${{ inputs.testing_branch || 'sycl-rel-6_1_0' }} devops_ref: sycl - tests_ref: ead7474b9cb2189ce48025550912ccad5a72bd30 sycl_toolchain_artifact: sycl_linux_default sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }} sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }} - sycl_cts_artifact: sycl_cts_bin_linux run-sycl-cts: needs: [ubuntu2204_build, build-sycl-cts] @@ -208,4 +212,4 @@ jobs: sycl_toolchain_artifact: sycl_linux_default sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }} sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }} - sycl_cts_artifact: sycl_cts_bin_linux + sycl_cts_artifact: sycl_cts_bin diff --git a/.github/workflows/sycl-weekly.yml b/.github/workflows/sycl-weekly.yml index 35da18c76ce9e..84e22c577d161 100644 --- a/.github/workflows/sycl-weekly.yml +++ b/.github/workflows/sycl-weekly.yml @@ -1,9 +1,11 @@ -name: SYCL Weekly +# This workflow builds SYCL-CTS with -fsycl-use-spirv-backend-for-spirv-gen and +# runs it with opencl:cpu & gen12 and level_zero:gpu & PVC on Sundays. + +name: SYCL-CTS with SPIR-V backend on: workflow_dispatch: schedule: - # At 00:00 on Sunday. - cron: '0 0 * * 0' permissions: read-all @@ -18,7 +20,6 @@ jobs: build_artifact_suffix: default build_configure_extra_args: '' - # This job builds SYCL-CTS with -fsycl-use-spirv-backend-for-spirv-gen. build-sycl-cts: needs: ubuntu2204_build if: ${{ always() && !cancelled() && needs.ubuntu2204_build.outputs.build_conclusion == 'success' }} @@ -34,7 +35,6 @@ jobs: sycl_toolchain_archive: ${{ needs.ubuntu2204_build.outputs.artifact_archive_name }} sycl_toolchain_decompress_command: ${{ needs.ubuntu2204_build.outputs.artifact_decompress_command }} extra_cmake_args: -DDPCPP_FLAGS=-fsycl-use-spirv-backend-for-spirv-gen - sycl_cts_artifact: sycl_cts_bin run-sycl-cts: needs: [ubuntu2204_build, build-sycl-cts] diff --git a/.github/workflows/sycl-windows-precommit.yml b/.github/workflows/sycl-windows-precommit.yml index a9cb32731d49b..810c5271ff7b5 100644 --- a/.github/workflows/sycl-windows-precommit.yml +++ b/.github/workflows/sycl-windows-precommit.yml @@ -10,7 +10,6 @@ on: paths-ignore: - '.github/ISSUE_TEMPLATE/**' - '.github/CODEOWNERS' - - 'sycl/cts_exclude_filter/**' - 'sycl/doc/**' - 'sycl/gdb/**' - 'clang/docs/**' @@ -37,9 +36,10 @@ jobs: build: needs: [detect_changes] - if: | - always() && success() - && github.repository == 'intel/llvm' + # if: | + # always() && success() + # && github.repository == 'intel/llvm' + if: false uses: ./.github/workflows/sycl-windows-build.yml with: changes: ${{ needs.detect_changes.outputs.filters }} @@ -47,10 +47,11 @@ jobs: e2e: needs: build # Continue if build was successful. - if: | - always() - && !cancelled() - && needs.build.outputs.build_conclusion == 'success' + # if: | + # always() + # && !cancelled() + # && needs.build.outputs.build_conclusion == 'success' + if: false strategy: fail-fast: false matrix: diff --git a/.github/workflows/sycl-windows-run-tests.yml b/.github/workflows/sycl-windows-run-tests.yml index d2ce1f0208c5a..5aadc277bb07d 100644 --- a/.github/workflows/sycl-windows-run-tests.yml +++ b/.github/workflows/sycl-windows-run-tests.yml @@ -6,43 +6,28 @@ on: name: type: string required: True - runner: type: string required: True - target_devices: - type: string - required: False - extra_cmake_args: - type: string - required: False - tests_selector: - description: | - Two possible options: "e2e" and "cts". - type: string - default: "e2e" - extra_lit_opts: description: | Extra options to be added to LIT_OPTS. type: string default: '' - - repo_ref: + ref: type: string required: False - description: | - Commit SHA or branch to checkout the intel/llvm repo. devops_ref: type: string required: False description: | - Commit SHA or branch to checkout the devops directory. - tests_ref: - type: string - required: False - description: Commit SHA or branch to checkout e2e/cts tests. + By default we checkout the devops directory from "inputs.ref" branch. + devops_ref may be specified to checkout the devops dir from different + branch. + Note: it doesn't affect ./devops/actions/run-tests/* as these actions + call checkout again and therefore override the devops directory, so + configs/dependecies from input.ref are used. sycl_toolchain_artifact: type: string @@ -63,23 +48,6 @@ on: required: false default: "cl" - cts_testing_mode: - description: | - Testing mode to run SYCL-CTS in, can be either `full`, `build-only` - or `run-only`. In `build-only` mode an artifact of the CTS binaries - will be uploaded. - type: string - default: 'full' - - sycl_cts_artifact: - type: string - default: '' - required: False - artifact_retention_days: - description: 'E2E/SYCL-CTS binaries artifact retention period.' - type: string - default: 1 - permissions: read-all jobs: @@ -103,7 +71,7 @@ jobs: with: sparse-checkout: | devops/actions - ref: ${{ inputs.devops_ref|| inputs.repo_ref || github.sha }} + ref: ${{ inputs.devops_ref|| inputs.ref || github.sha }} - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 with: arch: amd64 @@ -118,10 +86,9 @@ jobs: - name: Register cleanup after job is finished uses: ./devops/actions/cleanup - uses: ./devops/actions/cached_checkout - if: inputs.tests_selector == 'e2e' with: path: llvm - ref: ${{ inputs.repo_ref || github.sha }} + ref: ${{ inputs.ref || github.sha }} cache_path: "D:\\\\github\\\\_work\\\\repo_cache\\\\" - name: Download compiler toolchain uses: actions/download-artifact@v4 @@ -136,13 +103,11 @@ jobs: - name: Setup SYCL toolchain run: | echo "PATH=$env:GITHUB_WORKSPACE\\install\\bin;$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - echo "LIB=$env:GITHUB_WORKSPACE\\install\\lib;$env:LIB" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - run: | sycl-ls - run: | sycl-ls --verbose - name: Configure E2E with Level Zero target - if: inputs.tests_selector == 'e2e' shell: cmd run: | mkdir build-e2e @@ -152,6 +117,7 @@ jobs: shell: bash {0} env: LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param print_features=True ${{ inputs.extra_lit_opts }} + run: | # Run E2E tests. if [[ ${{inputs.compiler}} == 'icx' ]]; then @@ -178,7 +144,6 @@ jobs: sycl_cts_artifact: ${{ inputs.sycl_cts_artifact }} target_devices: ${{ inputs.target_devices }} retention-days: ${{ inputs.artifact_retention_days }} - - name: Detect hung tests if: always() shell: powershell @@ -193,4 +158,4 @@ jobs: if: always() run: | rmdir /q /s install - if exist build-e2e rmdir /q /s build-e2e + rmdir /q /s build-e2e diff --git a/.github/workflows/ur-benchmarks-reusable.yml b/.github/workflows/ur-benchmarks-reusable.yml index 029b4a1bebaa1..66ffcecd70314 100644 --- a/.github/workflows/ur-benchmarks-reusable.yml +++ b/.github/workflows/ur-benchmarks-reusable.yml @@ -1,8 +1,6 @@ name: Benchmarks Reusable # This workflow is a WIP: This workflow file acts as a placeholder. -# -# This workflow is set to be merged into benchmark.yml on: [ workflow_call ] diff --git a/.github/workflows/ur-benchmarks.yml b/.github/workflows/ur-benchmarks.yml index 5bf0461fcfef7..23fbb1ad903b4 100644 --- a/.github/workflows/ur-benchmarks.yml +++ b/.github/workflows/ur-benchmarks.yml @@ -1,8 +1,6 @@ name: Benchmarks # This workflow is a WIP: this workflow file acts as a placeholder. -# -# This workflow is set to be merged into benchmark.yml on: [ workflow_dispatch ] diff --git a/.github/workflows/ur-build-hw.yml b/.github/workflows/ur-build-hw.yml index a0f94ab10f538..75ca4cdeaa523 100644 --- a/.github/workflows/ur-build-hw.yml +++ b/.github/workflows/ur-build-hw.yml @@ -26,6 +26,14 @@ on: required: false type: string default: OFF + docker_image: + required: true + type: string + default: "" + image_options: + required: true + type: string + default: "" workflow_dispatch: inputs: adapter_name: @@ -51,9 +59,16 @@ on: required: false type: string default: OFF + docker_image: + required: true + type: string + default: "" + image_options: + required: true + type: string + default: "" -permissions: - contents: read +permissions: read-all env: UR_LOG_CUDA: "level:error;flush:error" @@ -61,12 +76,13 @@ env: UR_LOG_LEVEL_ZERO: "level:error;flush:error" UR_LOG_NATIVE_CPU: "level:error;flush:error" UR_LOG_OPENCL: "level:error;flush:error" + CURRENT_DIR: $(pwd) jobs: adapter_build_hw: name: Build & CTS # run only on upstream; forks won't have the HW - if: github.repository == 'intel/llvm' + # if: github.repository == 'intel/llvm' strategy: fail-fast: false matrix: @@ -83,6 +99,11 @@ jobs: compiler: [{c: gcc, cxx: g++}] runs-on: ${{inputs.runner_name}} + container: + image: ${{ inputs.docker_image }} + # TODO: options may differ for other GPU cards + options: ${{ inputs.image_options }} + # options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN steps: # TODO: @@ -94,27 +115,68 @@ jobs: - name: Checkout LLVM uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - # Latest distros do not allow global pip installation - - name: Install UR python dependencies in venv - working-directory: ${{github.workspace}}/unified-runtime + # TODO: how other workflows (using dockers) deal with the path change? + # also, note: I don't think it's needed anywhere now - I guess we can only use the relative paths...? + - name: Set working directory as environment variable run: | - python3 -m venv .venv - . .venv/bin/activate - echo "$PATH" >> $GITHUB_PATH - pip install -r third_party/requirements.txt + pwd + echo "${{github.workspace}}" + + # TODO: move installation of python3-venv to docker + # Latest distros do not allow global pip installation + # - name: Install UR python dependencies in venv + # working-directory: ./unified-runtime + # run: | + # sudo apt update + # sudo apt install -y python3-venv + # python3 -m venv .venv + # . .venv/bin/activate + # echo "${PWD}/.venv/bin" >> $GITHUB_PATH + # pip install -r third_party/requirements.txt - name: Download DPC++ run: | - wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-12-12/sycl_linux.tar.gz - mkdir dpcpp_compiler - tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler + wget -O dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2025-03-25/sycl_linux.tar.gz + mkdir -p dpcpp_compiler + tar -xvf dpcpp_compiler.tar.gz -C dpcpp_compiler + + # TODO_1: move this installation to docker? Perhaps there's other docker that already has these packages? we aren't the only ones using L0 ;-) + # TODO_2: if needed here, only install it for level zero jobs; and install required staff for other adapters under other 'if' + # + # it seems there's image for intel drivers (L0): + # ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps JESLI ZADZIALA TO BEZ INSTAL + # and for other adapters (HIP, CUDA): + # ghcr.io/intel/llvm/ubuntu2204_build:latest + # or + # ghcr.io/intel/llvm/ubuntu2404_build:latest + # not sure on OpenCL and NativeCPU - to be checked. + # - name: Install Intel Level Zero GPU + # # if: ${{ inputs.adapter_name == 'L0' || inputs.adapter_name == 'L0_V2' }} + # run: | + # wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | \ + # sudo gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg + # echo "deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy unified" | \ + # sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list + # sudo apt-get update + # sudo apt-get install -y libze-intel-gpu1 libze1 libze-dev intel-opencl-icd + # # libstdc++-12-dev + # + + # - name: Install OpenCL + # if: ${{ inputs.adapter_name == 'OPENCL' }} + # run: | + # wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \ + # | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null + # echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list + # sudo apt-get update + # sudo apt-get install -y intel-oneapi-runtime-opencl intel-oneapi-base-toolkit - name: Configure Unified Runtime project - working-directory: ${{github.workspace}}/unified-runtime # ">" is used to avoid adding "\" at the end of each line; this command is quite long run: > cmake - -B${{github.workspace}}/build + -S unified-runtime + -B build -DCMAKE_C_COMPILER=${{matrix.compiler.c}} -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} @@ -126,34 +188,35 @@ jobs: ${{ matrix.adapter.other_name != '' && format('-DUR_BUILD_ADAPTER_{0}=ON', matrix.adapter.other_name) || '' }} -DUR_STATIC_LOADER=${{matrix.adapter.static_Loader}} -DUR_STATIC_ADAPTER_${{matrix.adapter.name}}=${{matrix.adapter.static_adapter}} - -DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++ - -DUR_SYCL_LIBRARY_DIR=${{github.workspace}}/dpcpp_compiler/lib - -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install + -DUR_DPCXX=./dpcpp_compiler/bin/clang++ + -DUR_SYCL_LIBRARY_DIR=./dpcpp_compiler/lib + -DCMAKE_INSTALL_PREFIX=./install ${{ matrix.adapter.name == 'HIP' && '-DUR_CONFORMANCE_AMD_ARCH=gfx1030' || '' }} ${{ matrix.adapter.name == 'HIP' && '-DUR_HIP_PLATFORM=AMD' || '' }} - name: Build # This is so that device binaries can find the sycl runtime library - run: cmake --build ${{github.workspace}}/build -j $(nproc) + run: cmake --build build -j $(nproc) - name: Install # This is to check that install command does not fail - run: cmake --install ${{github.workspace}}/build + run: cmake --install build - - name: Test adapter specific + - name: Test adapter specific. env: ZE_ENABLE_LOADER_DEBUG_TRACE: 1 ZE_DEBUG: 1 - run: ctest -C ${{matrix.build_type}} --test-dir ${{github.workspace}}/build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600 -VV + run: ctest -C ${{matrix.build_type}} --test-dir build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600 # Don't run adapter specific tests when building multiple adapters if: ${{ matrix.adapter.other_name == '' }} - - name: Test adapters + - name: Test adapters. env: ZE_ENABLE_LOADER_DEBUG_TRACE: 1 ZE_DEBUG: 1 - run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --test-dir ${{github.workspace}}/build --output-on-failure -L "conformance" --timeout 600 -VV + UR_SYCL_LIBRARY_DIR: "./dpcpp_compiler/lib" + run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --test-dir build --output-on-failure -L "conformance" --timeout 600 - name: Get information about platform if: ${{ always() }} - run: ${{github.workspace}}/unified-runtime/.github/scripts/get_system_info.sh + run: ./unified-runtime/.github/scripts/get_system_info.sh diff --git a/.github/workflows/ur-precommit.yml b/.github/workflows/ur-precommit.yml index 0f32c89a2ee96..7419061f226c6 100644 --- a/.github/workflows/ur-precommit.yml +++ b/.github/workflows/ur-precommit.yml @@ -5,6 +5,9 @@ name: Unified Runtime Pre Commit # Note: the trigger is copy-pasted from sycl-linux-precommit.yml - probably to be fine-tuned. on: + push: + branches-ignore: + - 'dependabot/**' # We rely on "Fork pull request workflows from outside collaborators" - # "Require approval for all outside collaborators" at # https://github.com/intel/llvm/settings/actions for security. @@ -40,75 +43,123 @@ jobs: name: Detect Changes uses: ./.github/workflows/sycl-detect-changes.yml - source_checks: - name: Source Checks - needs: [detect_changes] - if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} - uses: ./.github/workflows/ur-source-checks.yml + # source_checks: + # name: Source Checks + # needs: [detect_changes] + # if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} + # uses: ./.github/workflows/ur-source-checks.yml adapters: name: Adapters - needs: [detect_changes, source_checks] - if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} + # needs: [detect_changes, source_checks] + # if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} + # needs: [detect_changes, source_checks] + # if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} strategy: matrix: + include: + - name: L0 + runner: UR_L0 + docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN + - name: L0_V2 + runner: UR_L0 + docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN + - name: L0 + runner: UR_L0 + docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN + static: ON + - name: L0 + runner: UR_L0 + docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN + other_adapter: NATIVE_CPU + - name: HIP + runner: UR_HIP + docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + image_options: -u 1001 --device=/dev/dri --device=/dev/kfd --cap-add=SYS_ADMIN + - name: CUDA + runner: UR_CUDA + docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + image_options: -u 1001 --privileged --cap-add SYS_ADMIN --gpus all + - name: OPENCL + runner: UR_OPENCL + platform: "Intel(R) OpenCL" + docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + image_options: -u 1001 --device=/dev/dri --device=/dev/kfd --privileged --cap-add SYS_ADMIN + - name: OPENCL + runner: UR_OPENCL + platform: "OPENCL:Intel(R) OpenCL" + docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + image_options: -u 1001 --device=/dev/dri --device=/dev/kfd --privileged --cap-add SYS_ADMIN + other_adapter: NATIVE_CPU + - name: NATIVE_CPU + runner: UR_NATIVE_CPU + docker_image: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps" + image_options: -u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN + # Extra native CPU jobs are here to force the loader to be used. # UR will not use the loader if there is only one target. - adapter: [ - {name: L0, runner: UR_L0}, - {name: L0_V2, runner: UR_L0}, - {name: L0, runner: UR_L0, static: ON}, - {name: OPENCL, runner: UR_OPENCL, platform: "Intel(R) OpenCL"}, - {name: CUDA, runner: UR_CUDA}, - {name: HIP, runner: UR_HIP}, - {name: NATIVE_CPU, runner: UR_NATIVE_CPU}, - {name: OPENCL, runner: UR_OPENCL, other_adapter: NATIVE_CPU, platform: "OPENCL:Intel(R) OpenCL"}, - {name: L0, runner: UR_L0, other_adapter: NATIVE_CPU}, - ] + # adapter: [ + # {name: L0, runner: UR_L0, docker_image: "ghcr.io/intel/llvm/ubuntu2204_build:latest"}, + # {name: L0_V2, runner: UR_L0}, + # {name: L0, runner: UR_L0, static: ON}, + # {name: OPENCL, runner: UR_OPENCL, platform: "Intel(R) OpenCL"}, + # {name: CUDA, runner: UR_CUDA}, + # {name: HIP, runner: UR_HIP}, + # {name: NATIVE_CPU, runner: UR_NATIVE_CPU}, + # {name: OPENCL, runner: UR_OPENCL, other_adapter: NATIVE_CPU, platform: "OPENCL:Intel(R) OpenCL"}, + # {name: L0, runner: UR_L0, other_adapter: NATIVE_CPU}, + # ] uses: ./.github/workflows/ur-build-hw.yml with: - adapter_name: ${{ matrix.adapter.name }} - runner_name: ${{ matrix.adapter.runner }} - static_loader: ${{ matrix.adapter.static || 'OFF' }} - static_adapter: ${{ matrix.adapter.static || 'OFF' }} - platform: ${{ matrix.adapter.platform || '' }} - other_adapter_name: ${{ matrix.adapter.other_adapter || '' }} + adapter_name: ${{ matrix.name }} + runner_name: ${{ matrix.runner }} + static_loader: ${{ matrix.static || 'OFF' }} + static_adapter: ${{ matrix.static || 'OFF' }} + platform: ${{ matrix.platform || '' }} + other_adapter_name: ${{ matrix.other_adapter || '' }} + docker_image: ${{ matrix.docker_image }} + image_options: ${{ matrix.image_options || '' }} - macos: - name: MacOS build only - needs: [detect_changes, source_checks] - if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} - strategy: - matrix: - os: ['macos-13'] - runs-on: ${{matrix.os}} + # macos: + # name: MacOS build only + # needs: [detect_changes, source_checks] + # if: ${{ always() && !cancelled() && contains(needs.detect_changes.outputs.filters, 'ur') }} + # strategy: + # matrix: + # os: ['macos-13'] + # runs-on: ${{matrix.os}} + + # steps: + # - name: Checkout LLVM + # uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - steps: - - name: Checkout LLVM - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.0.0 - with: - python-version: 3.9 + # - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.0.0 + # with: + # python-version: 3.9 - - name: Install prerequisites - working-directory: ${{github.workspace}}/unified-runtime - run: python3 -m pip install -r third_party/requirements.txt + # - name: Install prerequisites + # working-directory: ${{github.workspace}}/unified-runtime + # run: python3 -m pip install -r third_party/requirements.txt - - name: Install hwloc - run: brew install hwloc + # - name: Install hwloc + # run: brew install hwloc - - name: Configure Unified Runtime project - working-directory: ${{github.workspace}}/unified-runtime - run: > - cmake - -B${{github.workspace}}/build - -DUR_ENABLE_TRACING=ON - -DUR_DEVELOPER_MODE=ON - -DCMAKE_BUILD_TYPE=Release - -DUR_BUILD_TESTS=ON - -DUR_FORMAT_CPP_STYLE=ON - -DUMF_ENABLE_POOL_TRACKING=ON + # - name: Configure Unified Runtime project + # working-directory: ${{github.workspace}}/unified-runtime + # run: > + # cmake + # -B${{github.workspace}}/build + # -DUR_ENABLE_TRACING=ON + # -DUR_DEVELOPER_MODE=ON + # -DCMAKE_BUILD_TYPE=Release + # -DUR_BUILD_TESTS=ON + # -DUR_FORMAT_CPP_STYLE=ON + # -DUMF_ENABLE_POOL_TRACKING=ON - - name: Build - run: cmake --build ${{github.workspace}}/build -j $(sysctl -n hw.logicalcpu) + # - name: Build + # run: cmake --build ${{github.workspace}}/build -j $(sysctl -n hw.logicalcpu)