Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Use single reusable workflow for E2E tests on Linux #10292

Merged
merged 1 commit into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/linux_matrix_e2e_on_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,33 @@ jobs:
- name: AMD/HIP
runner: '["Linux", "amdgpu"]'
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:build
extra_cmake_args: -DHIP_PLATFORM="AMD" -DAMD_ARCH="gfx1031"
extra_image_opts: --device=/dev/kfd
extra_cmake_args: -DHIP_PLATFORM="AMD" -DAMD_ARCH="gfx1031"
target_devices: ext_oneapi_hip:gpu
reset_gpu: false

- name: Intel
runner: '["Linux", "gen9"]'
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:latest
extra_cmake_args:
extra_image_opts: -u 1001
extra_cmake_args:
target_devices: ext_oneapi_level_zero:gpu;opencl:gpu;opencl:cpu
reset_gpu: true

- name: ESIMD Emu
runner: '["Linux", "x86-cpu"]'
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:latest
extra_cmake_args:
extra_image_opts: -u 1001
extra_cmake_args:
target_devices: ext_intel_esimd_emulator:gpu
reset_gpu: false
uses: ./.github/workflows/linux_single_e2e_on_nightly.yml
uses: ./.github/workflows/linux_single_e2e.yml
with:
name: ${{ matrix.name }}
runner: ${{ matrix. runner }}
image: ${{ matrix.image }}
image_options: --device=/dev/dri --privileged --cap-add SYS_ADMIN ${{ matrix.extra_image_opts }}
extra_cmake_args: ${{ matrix.extra_cmake_args }}
extra_image_opts: ${{ matrix.extra_image_opts }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we using extra_image_opts someplace else? I thought -u 1001 was required for some reason that I can't remember ( same user as when containers are created? )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved offline.

target_devices: ${{ matrix.target_devices }}
ref: ${{ inputs.ref }}
reset_gpu: ${{ matrix.reset_gpu }}
Expand All @@ -64,13 +64,13 @@ jobs:
linux_e2e_on_nightly_aws:
name: '[AWS][CUDA] E2E on Nightly'
needs: [aws_start]
uses: ./.github/workflows/linux_single_e2e_on_nightly.yml
uses: ./.github/workflows/linux_single_e2e.yml
with:
name: CUDA
runner: '["aws-cuda_${{ inputs.uniq }}"]'
image: ghcr.io/intel/llvm/sycl_ubuntu2204_nightly:build
image_options: --device=/dev/dri --privileged --cap-add SYS_ADMIN --gpus all
extra_cmake_args:
extra_image_opts: --gpus all
target_devices: all
ref: ${{ inputs.ref }}
reset_gpu: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: SYCL E2E on Nightly build
name: SYCL E2E

on:
workflow_call:
Expand All @@ -9,9 +9,9 @@ on:
type: string
image:
type: string
extra_cmake_args:
image_options:
type: string
extra_image_opts:
extra_cmake_args:
type: string
target_devices:
type: string
Expand All @@ -20,13 +20,28 @@ on:
reset_gpu:
type: string

sycl_toolchain_artifact:
type: string
default: ''
sycl_toolchain_archive:
type: string
default: ''
sycl_toolchain_decompress_command:
type: string
default: ''

env:
type: string
default: '{}'

jobs:
lin_e2e_only:
name: ${{ inputs.name }}
runs-on: ${{ fromJSON(inputs.runner) }}
container:
image: ${{ inputs.image }}
options: --device=/dev/dri --privileged --cap-add SYS_ADMIN ${{ inputs.extra_image_opts }}
options: ${{ inputs.image_options }}
env: ${{ fromJSON(inputs.env) }}
steps:
- name: Reset GPU
if: inputs.reset_gpu == 'true'
Expand All @@ -39,29 +54,56 @@ jobs:
ref: ${{ inputs.ref }}
sparse-checkout: |
devops/actions
devops/scripts/get_release.py
sycl/test-e2e
llvm/utils
- name: Install drivers
if: env.compute_runtime_tag != ''
run: |
if [ -e /opt/install_drivers.sh ]; then
# TODO pack this script into container
sudo cp llvm/devops/scripts/get_release.py /opt/
sudo -E /opt/install_drivers.sh --all
fi
- name: Register cleanup after job is finished
uses: ./llvm/devops/actions/cleanup
- name: Configure
run: |
cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DSYCL_TEST_E2E_TARGETS="${{ inputs.target_devices }}" -DCMAKE_CXX_COMPILER="clang++" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ inputs.extra_cmake_args }}
# opencl:cpu backend won't be visible in the sycl-ls commands below, see the
# comment below referencing https://github.com/actions/runner/issues/1964.
- run: sycl-ls --verbose
- run: SYCL_PI_TRACE=-1 sycl-ls
- name: SYCL End-to-end tests
env:
LIT_OPTS: -v --no-progress-bar --show-unsupported --max-time 3600 --time-tests
- name: Source OneAPI TBB vars.sh
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: Download SYCL toolchain
if: inputs.sycl_toolchain_artifact != ''
uses: actions/download-artifact@v3
with:
name: ${{ inputs.sycl_toolchain_artifact }}
- name: Extract/Setup SYCL toolchain
if: inputs.sycl_toolchain_artifact != ''
run: |
mkdir toolchain
tar -I '${{ inputs.sycl_toolchain_decompress_command }}' -xf ${{ inputs.sycl_toolchain_archive }} -C toolchain
rm -f ${{ inputs.sycl_toolchain_archive }}
echo PATH=$PWD/toolchain/bin/:$PATH >> $GITHUB_ENV
echo LD_LIBRARY_PATH=$PWD/toolchain/lib/:$LD_LIBRARY_PATH >> $GITHUB_ENV
- run: which clang++ sycl-ls
- run: sycl-ls --verbose
- run: SYCL_PI_TRACE=-1 sycl-ls
- name: Configure
run: |
cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DSYCL_TEST_E2E_TARGETS="${{ inputs.target_devices }}" -DCMAKE_CXX_COMPILER="$(which clang++)" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ inputs.extra_cmake_args }}
- name: SYCL End-to-end tests
env:
LIT_OPTS: -v --no-progress-bar --show-unsupported --max-time 3600 --time-tests
run: |
ninja -C build-e2e check-sycl-e2e
53 changes: 15 additions & 38 deletions .github/workflows/sycl_linux_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,45 +222,22 @@ jobs:
fail-fast: false
matrix:
include: ${{ fromJSON(inputs.lts_matrix) }}
name: ${{ matrix.name }}
runs-on: ${{ matrix.runs-on }}
env: ${{ matrix.env }}
container:
uses: ./.github/workflows/linux_single_e2e.yml
with:
name: ${{ matrix.name }}
runner: ${{ toJSON(matrix.runs-on) }}
image: ${{ matrix.image }}
options: ${{ matrix.container_options }}
steps:
- name: Reset GPU
if: ${{ contains(matrix.runs-on, 'gen9') && contains(matrix.runs-on, 'Linux') }}
run: |
sudo mount -t debugfs none /sys/kernel/debug
sudo bash -c 'echo 1 > /sys/kernel/debug/dri/0/i915_wedged'
- run: cp -r /actions .
- name: Register cleanup after job is finished
uses: ./actions/cleanup
- name: Install drivers
if: env.compute_runtime_tag != ''
run: |
if [ -e /opt/install_drivers.sh ]; then
# TODO pack this script into container
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/scripts/get_release.py
sudo mv get_release.py /opt/
sudo -E /opt/install_drivers.sh --all
fi
# FIXME cached_checkout fails here, but works everywhere else
- uses: actions/checkout@v3
with:
persist-credentials: false
path: llvm
ref: ${{ inputs.build_ref || github.sha }}
# TODO should this action be packed into container as well?
- uses: ./llvm/devops/actions/e2e-tests
name: Run SYCL End-to-End tests
with:
sycl_artifact: sycl_linux_${{ inputs.build_artifact_suffix }}
sycl_archive: ${{ inputs.artifact_archive_name }}
decompress_command: ${{ inputs.artifact_decompress_command }}
targets: ${{ matrix.targets }}
cmake_args: '${{ matrix.cmake_args }} ${{ inputs.lts_cmake_extra_args }}'
image_options: ${{ matrix.container_options }}
extra_cmake_args: '${{ matrix.cmake_args }} ${{ inputs.lts_cmake_extra_args }}'
target_devices: ${{ matrix.targets }}
ref: ${{ inputs.build_ref || github.sha }}
reset_gpu: ${{ contains(matrix.runs-on, 'gen9') && contains(matrix.runs-on, 'Linux') }}

sycl_toolchain_artifact: sycl_linux_${{ inputs.build_artifact_suffix }}
sycl_toolchain_archive: ${{ inputs.artifact_archive_name }}
sycl_toolchain_decompress_command: ${{ inputs.artifact_decompress_command }}

env: ${{ toJSON(matrix.env) }}

khronos_sycl_cts:
needs: build
Expand Down
71 changes: 0 additions & 71 deletions devops/actions/e2e-tests/action.yml

This file was deleted.