Skip to content

[CI][sycl-rel] Update sycl-rel CI #18986

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

Merged
merged 3 commits into from
Jun 16, 2025
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
90 changes: 90 additions & 0 deletions .github/workflows/sycl-hardening-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: SYCL hardening check

permissions: read-all

on:
workflow_call:
inputs:
sycl_linux_artifact:
type: string
sycl_linux_archive:
type: string
sycl_linux_decompress_command:
type: string

sycl_windows_artifact:
type: string
sycl_windows_archive:
type: string

jobs:
hardening_check:
runs-on: ubuntu-latest

steps:
- name: Install hardening-check
run: |
sudo apt update
sudo apt install -y devscripts

- name: Download SYCL toolchain
uses: actions/download-artifact@v4
with:
name: ${{ inputs.sycl_linux_artifact }}

- name: Extract SYCL toolchain
run: |
mkdir toolchain
tar -I '${{ inputs.sycl_linux_decompress_command }}' -xf ${{ inputs.sycl_linux_archive }} -C toolchain

- name: Perform checks
run: |
for file in ./toolchain/bin/*; do
hardening-check "$file" | tee -a "./hardening-check.txt"
done

for file in $(find ./toolchain/lib/ -type f -name "*.so*"); do
hardening-check "$file" | tee -a "./hardening-check.txt"
done

- uses: actions/upload-artifact@v4
with:
name: hardening-check
path: hardening-check.txt

winchecksec:
runs-on: windows-latest

steps:
- name: Install winchecksec
run: |
curl -LO https://github.com/trailofbits/winchecksec/releases/download/v3.1.0/windows.x64.Release.zip
mkdir winchecksec
unzip "windows.x64.Release.zip" -d winchecksec

- name: Download SYCL toolchain
uses: actions/download-artifact@v4
with:
name: ${{ inputs.sycl_windows_artifact }}

- name: Extract SYCL toolchain
shell: bash
run: |
mkdir toolchain
tar -xf ${{ inputs.sycl_windows_archive }} -C toolchain

- name: Download and check Windows artifacts
shell: bash
run: |
for file in $(find ./toolchain/bin/ -type f -name "*.exe"); do
./winchecksec/build/Release/winchecksec.exe "$file" | tee -a "./winchecksec.txt"
done

for file in $(find ./toolchain/bin/ -type f -name "*.dll"); do
./winchecksec/build/Release/winchecksec.exe "$file" | tee -a "./winchecksec.txt"
done

- uses: actions/upload-artifact@v4
with:
name: winchecksec
path: winchecksec.txt
54 changes: 48 additions & 6 deletions .github/workflows/sycl-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ on:
build_artifact_suffix:
type: string
required: true
build_target:
type: string
required: false
default: sycl-toolchain
artifact_archive_name:
type: string
default: llvm_sycl.tar.zst
Expand All @@ -46,7 +50,10 @@ on:
default: 3
e2e_binaries_artifact:
type: string
required: False
required: false
pack_release:
type: string
required: false

outputs:
build_conclusion:
Expand Down Expand Up @@ -100,6 +107,10 @@ on:
options:
- 3

pack_release:
type: string
required: false

permissions: read-all

jobs:
Expand Down Expand Up @@ -170,7 +181,8 @@ jobs:
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SPIRV
- name: Compile
id: build
run: cmake --build $GITHUB_WORKSPACE/build --target sycl-toolchain
# Emulate default value for manual dispatch as we've run out of available arguments.
run: cmake --build $GITHUB_WORKSPACE/build --target ${{ inputs.build_target || 'sycl-toolchain' }}
- name: check-llvm
if: always() && !cancelled() && contains(inputs.changes, 'llvm')
run: |
Expand Down Expand Up @@ -215,11 +227,26 @@ jobs:
# TODO consider moving this to Dockerfile.
export LD_LIBRARY_PATH=/usr/local/cuda/compat/:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
LIT_OPTS="--allow-empty-runs" LIT_FILTER="e2e_test_requirements" cmake --build $GITHUB_WORKSPACE/build --target check-sycl
- name: Install
- name: Install sycl-toolchain
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
# TODO replace utility installation with a single CMake target
run: |
cmake --build $GITHUB_WORKSPACE/build --target deploy-sycl-toolchain

- name: Pack toolchain release
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.pack_release == 'true' }}
run: tar -I '${{ steps.artifact_info.outputs.COMPRESS }}' -cf ${{ steps.artifact_info.outputs.ARCHIVE_NAME }} -C $GITHUB_WORKSPACE/build/install .
- name: Upload toolchain release
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' && inputs.pack_release == 'true' }}
uses: actions/upload-artifact@v4
with:
name: sycl_linux_release
path: ${{ steps.artifact_info.outputs.ARCHIVE_NAME }}
retention-days: ${{ inputs.retention-days }}

- name: Install utilities
if: ${{ always() && !cancelled() && steps.build.conclusion == 'success' }}
# TODO replace utility installation with a single CMake target
run: |
cmake --build $GITHUB_WORKSPACE/build --target utils/FileCheck/install
cmake --build $GITHUB_WORKSPACE/build --target utils/count/install
cmake --build $GITHUB_WORKSPACE/build --target utils/not/install
Expand Down Expand Up @@ -278,7 +305,7 @@ jobs:
testing_mode: build-only
target_devices: all
binaries_artifact: ${{ inputs.e2e_binaries_artifact }}
cxx_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
extra_lit_opts: --param sycl_build_targets="spir;nvidia;amd"

- name: Remove E2E tests before spirv-backend run
Expand All @@ -293,5 +320,20 @@ jobs:
testing_mode: build-only
target_devices: all
binaries_artifact: ${{ inputs.e2e_binaries_artifact }}_spirv_backend
cxx_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
extra_lit_opts: --param spirv-backend=True

- name: Remove E2E tests before preview-mode run
if: ${{ inputs.e2e_binaries_artifact && always() && !cancelled() && steps.build.conclusion == 'success' }}
run: rm -rf build-e2e

- name: Build E2E tests in Preview Mode
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 }}_preview
sycl_compiler: $GITHUB_WORKSPACE/toolchain/bin/clang++
extra_lit_opts: --param test-preview-mode=True
73 changes: 40 additions & 33 deletions .github/workflows/sycl-linux-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
required: False
tests_selector:
description: |
Three possible options: "e2e", "cts", and "compute-benchmarks".
Three possible options: "e2e", "cts", and "benchmarks".
type: string
default: "e2e"

Expand Down Expand Up @@ -82,9 +82,6 @@ on:
type: string
default: 1

reset_intel_gpu:
type: string
required: False
install_igc_driver:
type: string
required: False
Expand Down Expand Up @@ -114,6 +111,33 @@ on:
default: ''
required: False

benchmark_upload_results:
description: |
Set to true to upload results to git repository storing benchmarking
results.
type: string
default: 'false'
required: False
benchmark_save_name:
description: |
Save name to use for benchmark results: Save names are stored in
metadata of result file, and are used to identify benchmark results in
the same series (e.g. same configuration, same device, etc.).

Note: Currently, benchmark result filenames are in the format of
<benchmark_save_name>_<Device>_<Backend>_YYYYMMDD_HHMMSS.json
type: string
default: ''
required: False
benchmark_preset:
description: |
Name of benchmark preset to run.

See /devops/scripts/benchmarks/presets.py for all presets available.
type: string
default: 'Minimal'
required: False

workflow_dispatch:
inputs:
runner:
Expand Down Expand Up @@ -153,7 +177,7 @@ on:
options:
- e2e
- cts
- compute-benchmarks
- benchmarks

env:
description: |
Expand All @@ -171,14 +195,6 @@ on:
Extra options to be added to LIT_OPTS.
default: ''

reset_intel_gpu:
description: |
Reset Intel GPUs
type: choice
options:
- false
- true

e2e_testing_mode:
type: choice
options:
Expand All @@ -199,31 +215,15 @@ jobs:
options: ${{ inputs.image_options }}
env: ${{ fromJSON(inputs.env) }}
steps:
- name: Reset Intel GPU
if: inputs.reset_intel_gpu == 'true'
shell: bash
run: |
if [[ '${{ inputs.runner }}' == '["Linux", "bmg"]' ]]; then
sudo bash -c 'echo 0000:05:00.0 > /sys/bus/pci/drivers/xe/unbind'
sudo bash -c 'echo 1 > /sys/bus/pci/devices/0000:05:00.0/reset'
sudo bash -c 'echo 0000:05:00.0 > /sys/bus/pci/drivers/xe/bind'
else
sudo mount -t debugfs none /sys/kernel/debug
base_dir="/sys/kernel/debug/dri"

for dir in "$base_dir"/*; do
if [ -f "$dir/i915_wedged" ]; then
sudo bash -c 'echo 1 > $0/i915_wedged' $dir
fi
done
fi
- uses: actions/checkout@v4
with:
ref: ${{ inputs.devops_ref || inputs.repo_ref }}
sparse-checkout: |
devops
- name: Register cleanup after job is finished
uses: ./devops/actions/cleanup
- name: Reset Intel GPU
uses: ./devops/actions/reset_gpu
- name: Install drivers
if: inputs.install_igc_driver == 'true' || inputs.install_dev_igc_driver == 'true'
env:
Expand Down Expand Up @@ -308,6 +308,7 @@ jobs:
- name: Run E2E Tests
if: inputs.tests_selector == 'e2e'
uses: ./devops/actions/run-tests/e2e
timeout-minutes: 60
with:
ref: ${{ inputs.tests_ref || inputs.repo_ref || github.sha }}
binaries_artifact: ${{ inputs.e2e_binaries_artifact }}
Expand All @@ -320,6 +321,9 @@ jobs:
- name: Run SYCL CTS Tests
if: inputs.tests_selector == 'cts'
uses: ./devops/actions/run-tests/cts
# Normally this job takes less than 10m. But sometimes it hangs up and
# reaches the 360m limit. Set a lower limit to free up the runner earlier.
timeout-minutes: 35
with:
ref: ${{ inputs.tests_ref || 'main' }}
cts_exclude_ref: ${{ inputs.repo_ref }}
Expand All @@ -329,11 +333,14 @@ jobs:
target_devices: ${{ inputs.target_devices }}
retention-days: ${{ inputs.retention-days }}

- name: Run compute-benchmarks on SYCL
if: inputs.tests_selector == 'compute-benchmarks'
- name: Run benchmarks
if: inputs.tests_selector == 'benchmarks'
uses: ./devops/actions/run-tests/benchmark
with:
target_devices: ${{ inputs.target_devices }}
upload_results: ${{ inputs.benchmark_upload_results }}
save_name: ${{ inputs.benchmark_save_name }}
preset: ${{ inputs.benchmark_preset }}
env:
RUNNER_TAG: ${{ inputs.runner }}
GITHUB_TOKEN: ${{ secrets.LLVM_SYCL_BENCHMARK_TOKEN }}
Loading
Loading