Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/sycl' into llvmspirv_pulldown
Browse files Browse the repository at this point in the history
 Conflicts:
	clang/test/Driver/linker-wrapper.c
  • Loading branch information
jsji committed Jan 29, 2025
2 parents e85366d + 70f92a0 commit f57a0ba
Show file tree
Hide file tree
Showing 190 changed files with 4,763 additions and 3,262 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/sycl-issues-ping-assignee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run:
permissions:
issues: write
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Filter issues and ping
run: |
days_to_stale=60
days_to_stale=90
current_time=$(date +%s)
cat issues.json | jq -c '.[]' | while read -r issue; do
Expand Down
51 changes: 39 additions & 12 deletions .github/workflows/sycl-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
build_image:
type: string
required: false
default: "ghcr.io/intel/llvm/ubuntu2404_build:latest"
default: "ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps"
build_ref:
type: string
required: false
Expand All @@ -40,16 +40,13 @@ on:
description: 'Filter matches for the changed files in the PR'
default: '[llvm, clang, sycl, llvm_spirv, xptifw, libclc, libdevice]'
required: false
merge_ref:
description: |
Commit-ish to merge post-checkout if non-empty. Must be reachable from
the default_branch input paramter.
type: string
default: 'FETCH_HEAD'
retention-days:
description: 'Artifacts retention period'
type: string
default: 3
e2e_binaries_artifact:
type: string
required: False

outputs:
build_conclusion:
Expand All @@ -70,7 +67,7 @@ on:
build_image:
type: choice
options:
- "ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:build"
- 'ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest'
cc:
type: choice
options:
Expand Down Expand Up @@ -150,7 +147,6 @@ jobs:
with:
path: src
ref: ${{ inputs.build_ref || github.sha }}
merge_ref: ${{ inputs.merge_ref }}
cache_path: "/__w/repo_cache/"
- name: Setup oneAPI env
if: ${{ inputs.cc == 'icx' || inputs.cxx == 'icpx' }}
Expand Down Expand Up @@ -199,9 +195,6 @@ jobs:
cmake --build $GITHUB_WORKSPACE/build --target check-sycl-unittests
- name: check-llvm-spirv
if: always() && !cancelled() && contains(inputs.changes, 'llvm_spirv')
# Temporary workaround to disable running tests requiring spirv-tools.
env:
LIT_OPTS: "--param disable-spirv-tools=True"
run: |
cmake --build $GITHUB_WORKSPACE/build --target check-llvm-spirv
- name: check-xptifw
Expand Down Expand Up @@ -252,3 +245,37 @@ jobs:
name: sycl_linux_${{ inputs.build_artifact_suffix }}
path: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
retention-days: ${{ inputs.retention-days }}

- name: Copy toolchain
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
# We must have the compiler in the same location as it will be in the E2E
# run-tests job.
run: cp -r $GITHUB_WORKSPACE/build/install $GITHUB_WORKSPACE/toolchain

- name: Source OneAPI TBB vars.sh
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
shell: bash
run: |
# https://github.com/actions/runner/issues/1964 prevents us from using
# the ENTRYPOINT in the image.
env | sort > env_before
if [ -e /runtimes/oneapi-tbb/env/vars.sh ]; then
source /runtimes/oneapi-tbb/env/vars.sh;
elif [ -e /opt/runtimes/oneapi-tbb/env/vars.sh ]; then
source /opt/runtimes/oneapi-tbb/env/vars.sh;
else
echo "no TBB vars in /opt/runtimes or /runtimes";
fi
env | sort > env_after
comm -13 env_before env_after >> $GITHUB_ENV
rm env_before env_after
- name: Build E2E tests
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
uses: ./devops/actions/run-tests/e2e
with:
ref: ${{ inputs.ref || github.sha }}
testing_mode: build-only
target_devices: all
binaries_artifact: ${{ inputs.e2e_binaries_artifact }}
cxx_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
1 change: 0 additions & 1 deletion .github/workflows/sycl-linux-precommit-aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ jobs:
# No idea why but that seems to work and be in sync with the main
# pre-commit workflow.
ref: ${{ github.event.workflow_run.referenced_workflows[0].sha }}
merge_ref: ''

sycl_toolchain_artifact: sycl_linux_default
sycl_toolchain_archive: llvm_sycl.tar.zst
Expand Down
35 changes: 3 additions & 32 deletions .github/workflows/sycl-linux-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ jobs:
uses: ./.github/workflows/sycl-linux-build.yml
with:
build_ref: ${{ github.sha }}
merge_ref: ''
build_cache_root: "/__w/"
build_artifact_suffix: "default"
build_cache_suffix: "default"
# Docker image has last nightly pre-installed and added to the PATH
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:build"
build_image: "ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest"
cc: clang
cxx: clang++
changes: ${{ needs.detect_changes.outputs.filters }}
e2e_binaries_artifact: sycl_e2e_bin_default

determine_arc_tests:
name: Decide which Arc tests to run
Expand All @@ -73,31 +73,15 @@ jobs:
echo 'arc_tests="Matrix/"' >> "$GITHUB_OUTPUT"
fi
build_e2e_tests:
needs: [build]
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
uses: ./.github/workflows/sycl-linux-run-tests.yml
with:
name: Build e2e tests
runner: '["Linux", "build"]'
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps
image_options: -u 1001
ref: ${{ github.sha }}
merge_ref: ''
sycl_toolchain_artifact: sycl_linux_default
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
sycl_toolchain_decompress_command: ${{ needs.build.outputs.artifact_decompress_command }}
e2e_testing_mode: 'build-only'
run_prebuilt_e2e_tests:
needs: [build, build_e2e_tests]
needs: [build]
if: ${{ always() && !cancelled() && needs.build.outputs.build_conclusion == 'success' }}
strategy:
fail-fast: false
matrix:
include:
- name: Intel
runner: '["Linux", "gen12"]'
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
target_devices: level_zero:gpu;opencl:gpu;opencl:cpu
reset_intel_gpu: true
Expand All @@ -106,13 +90,11 @@ jobs:
with:
name: ${{ matrix.name }}
runner: ${{ matrix.runner }}
image: ${{ matrix.image }}
image_options: ${{ matrix.image_options }}
target_devices: ${{ matrix.target_devices }}
extra_lit_opts: --param fallback-to-build-if-requires-build-and-run=True ${{ matrix.extra_lit_opts }}
reset_intel_gpu: ${{ matrix.reset_intel_gpu }}
ref: ${{ github.sha }}
merge_ref: ''
sycl_toolchain_artifact: sycl_linux_default
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
sycl_toolchain_decompress_command: ${{ needs.build.outputs.artifact_decompress_command }}
Expand All @@ -128,18 +110,15 @@ jobs:
include:
- name: NVIDIA/CUDA
runner: '["Linux", "cuda"]'
image: ghcr.io/intel/llvm/ubuntu2404_build:latest
image_options: -u 1001 --gpus all --cap-add SYS_ADMIN
target_devices: cuda:gpu
- name: AMD/HIP
runner: '["Linux", "amdgpu"]'
image: ghcr.io/intel/llvm/ubuntu2404_build:latest
image_options: -u 1001 --device=/dev/dri --device=/dev/kfd
target_devices: hip:gpu
reset_intel_gpu: false
- name: E2E tests on Intel Arc A-Series Graphics
runner: '["Linux", "arc"]'
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
target_devices: level_zero:gpu;opencl:gpu
reset_intel_gpu: true
Expand All @@ -156,7 +135,6 @@ jobs:
use_igc_dev: true
- name: E2E tests on Intel Ponte Vecchio GPU
runner: '["Linux", "pvc"]'
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest
image_options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
target_devices: level_zero:gpu;opencl:gpu
extra_lit_opts: -j 50
Expand Down Expand Up @@ -194,7 +172,6 @@ jobs:
skip_run: ${{matrix.use_igc_dev && contains(github.event.pull_request.labels.*.name, 'ci-no-devigc') || 'false'}}

ref: ${{ github.sha }}
merge_ref: ''

sycl_toolchain_artifact: sycl_linux_default
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
Expand All @@ -214,27 +191,22 @@ jobs:
include:
- name: Intel GEN12 Graphics system
runner: '["Linux", "gen12"]'
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest
image_extra_opts: --device=/dev/dri
reset_intel_gpu: true
- name: Intel Arc A-Series Graphics system
runner: '["Linux", "arc"]'
image: ghcr.io/intel/llvm/ubuntu2404_intel_drivers:latest
image_extra_opts: --device=/dev/dri
reset_intel_gpu: true
- name: AMD system
runner: '["Linux", "amdgpu"]'
image: ghcr.io/intel/llvm/ubuntu2404_build:latest
image_extra_opts: --device=/dev/dri --device=/dev/kfd
- name: CUDA system
runner: '["Linux", "cuda"]'
image: ghcr.io/intel/llvm/ubuntu2404_build:latest
image_extra_opts: --gpus all
uses: ./.github/workflows/sycl-linux-run-tests.yml
with:
name: Perf tests on ${{ matrix.name }}
runner: ${{ matrix. runner }}
image: ${{ matrix.image }}
image_options: -u 1001 --privileged --cap-add SYS_ADMIN ${{ matrix.image_extra_opts }}
target_devices: all
reset_intel_gpu: ${{ matrix.reset_intel_gpu }}
Expand All @@ -243,7 +215,6 @@ jobs:
extra_lit_opts: -a -j 1 --param enable-perf-tests=True

ref: ${{ github.sha }}
merge_ref: ''

sycl_toolchain_artifact: sycl_linux_default
sycl_toolchain_archive: ${{ needs.build.outputs.artifact_archive_name }}
Expand Down
38 changes: 14 additions & 24 deletions .github/workflows/sycl-linux-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
required: True
image:
type: string
required: True
required: False
image_options:
type: string
required: True
Expand All @@ -38,13 +38,6 @@ on:
ref:
type: string
required: True
merge_ref:
description: |
Commit-ish to merge post-checkout if non-empty. Must be reachable from
the default_branch input paramter.
type: string
default: 'FETCH_HEAD'
required: False

sycl_toolchain_artifact:
type: string
Expand All @@ -61,23 +54,18 @@ on:

e2e_binaries_artifact:
description: |
By setting this the E2E binaries folder will not be created, rather it
will be downloaded and extracted from the specified artifact. When
running tests in `run-only` mode this must be provided.
Must be set if `e2e_testing_mode` is equal to `run-only` and the
artifact must exist. Can be set in other modes resulting in artifact
upload.
type: string
default: ''
required: False
e2e_testing_mode:
description: |
Testing mode to run E2E tests in, can be either `full`, `build-only`
or `run-only`. In `build-only` mode an artifact of the E2E binaries
will be uploaded.
or `run-only`.
type: string
default: 'full'
artifact_suffix:
description: 'Suffix for E2E binaries artifact that is output when in `build-only`.'
type: string
default: 'default'
retention-days:
description: 'E2E/SYCL-CTS binaries artifact retention period.'
type: string
Expand Down Expand Up @@ -126,25 +114,29 @@ on:
- '["Linux", "pvc"]'
- '["cts-cpu"]'
- '["Linux", "build"]'
- '["cuda"]'
image:
type: choice
options:
- 'ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest'
- 'ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps'
image_options:
description: |
Use option with "--device=/dev/kfd" for AMDGPU, without it for the rest.
type: choice
options:
- '-u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN'
- '-u 1001 --device=/dev/dri --device=/dev/kfd --privileged --cap-add SYS_ADMIN'
- '-u 1001 --device=/dev/dri --privileged --cap-add SYS_ADMIN'
- '-u 1001 --gpus all --cap-add SYS_ADMIN'
target_devices:
type: choice
options:
- 'level_zero:gpu'
- 'opencl:cpu'
- 'opencl:gpu'
- 'opencl:fpga'
- 'level_zero:gpu'
- 'hip:gpu'
- 'cuda:gpu'
tests_selector:
type: choice
options:
Expand Down Expand Up @@ -194,7 +186,7 @@ jobs:
name: ${{ inputs.name }}
runs-on: ${{ fromJSON(inputs.runner) }}
container:
image: ${{ inputs.image }}
image: ${{ inputs.image || 'ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps'}}
options: ${{ inputs.image_options }}
env: ${{ fromJSON(inputs.env) }}
steps:
Expand Down Expand Up @@ -296,13 +288,11 @@ jobs:
uses: ./devops/actions/run-tests/e2e
with:
ref: ${{ inputs.ref || github.sha }}
merge_ref: ${{ inputs.merge_ref }}
e2e_binaries_artifact: ${{ inputs.e2e_binaries_artifact }}
binaries_artifact: ${{ inputs.e2e_binaries_artifact }}
testing_mode: ${{ inputs.e2e_testing_mode }}
extra_cmake_args: ${{ inputs.extra_cmake_args }}
e2e_testing_mode: ${{ inputs.e2e_testing_mode }}
target_devices: ${{ inputs.target_devices }}
extra_lit_opts: ${{ inputs.extra_lit_opts }}
artifact_suffix: ${{ inputs.artifact_suffix }}
retention-days: ${{ inputs.retention-days }}

- name: Run SYCL CTS Tests
Expand Down
Loading

0 comments on commit f57a0ba

Please sign in to comment.