Skip to content
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
44 changes: 2 additions & 42 deletions .github/workflows/sycl-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
toolchain_artifact: sycl_linux_default

# This job builds SYCL-CTS with -fsycl-use-spirv-backend-for-spirv-gen.
# TODO: Usually there are no new changes on weekends. Consider removing
# the ubuntu2204_build job and switching to nightly build instead.
build-sycl-cts:
needs: ubuntu2204_build
permissions:
Expand Down Expand Up @@ -72,45 +74,3 @@ jobs:
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

yarpgen:
if: ${{ !cancelled() }}
runs-on: ["Linux", "gen12"]
container:
# This workflow runs on Sundays, so in almost all cases there are no new
# commits on Saturday, and therefore the latest nightly can be used.
# TODO: Consider switching sycl-cts run to nightly build.
image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest
# Is it the minimum set of options to get a working toolchain?
options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
steps:
- name: Checkout actions/source-tbb
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
sparse-checkout: |
devops/actions/source-tbb
sparse-checkout-cone-mode: false
- name: Source OneAPI TBB vars.sh
uses: ./devops/actions/source-tbb
- name: Set up yarpgen
run: |
git clone https://github.com/intel/yarpgen.git
cmake -B yarpgen/build -G Ninja yarpgen/
ninja -C yarpgen/build
- run: sycl-ls
- name: Run yarpgen
run: |
cd yarpgen
python3 --version
# A system hits OOM when using all available threads.
python3 scripts/run_gen.py --target dpcpp --std sycl -t 60 -j 2
- name: Pack results
run: tar -czf yarpgen_results.tar.gz yarpgen/testing
- uses: actions/upload-artifact@v6
with:
name: yarpgen_results
path: yarpgen_results.tar.gz
retention-days: 7
- name: Clean up
if: always()
run: rm -rf devops yarpgen yarpgen_results.tar.gz
88 changes: 88 additions & 0 deletions .github/workflows/sycl-yarpgen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: SYCL Yarpgen

on:
workflow_dispatch:
inputs:
toolchain_run_id:
description: |
Run ID of a workflow run to download the toolchain artifact from.
If not set, the toolchain pre-installed in the container image is used.
type: string
default: ''
toolchain_artifact:
description: Name of the artifact to download.
type: string
default: 'sycl_linux_default'
schedule:
# At 00:00 on Sunday.
- cron: '0 0 * * 0'

permissions: read-all

jobs:
yarpgen:
runs-on: ["Linux", "gen12"]
container:
# This workflow runs on Sundays, so in almost all cases there are no new
# commits on Saturday, and therefore the latest nightly can be used.
image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest
options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN
steps:
- name: Checkout actions/source-tbb
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
sparse-checkout: |
devops/actions/source-tbb
sparse-checkout-cone-mode: false
persist-credentials: false

- name: Source OneAPI TBB vars.sh
uses: ./devops/actions/source-tbb

- name: Download SYCL toolchain
if: inputs.toolchain_run_id != ''
env:
GH_TOKEN: ${{ github.token }}
run: |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: is there a benefit to using gh run instead of the download artifact workflow we usually use?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes. We don't build the toolchain in this workflow, and the github action can only download artifacts from the same workflow. The idea is to make the workflow able to download artifacts from another runs, e.g. from nightlys.

gh run download ${{ inputs.toolchain_run_id }} \
-n ${{ inputs.toolchain_artifact }} \
-R ${{ github.repository }}

- name: Extract/Setup SYCL toolchain
if: inputs.toolchain_run_id != ''
run: |
mkdir toolchain
tar -xf ${{ inputs.toolchain_artifact }}/sycl_linux.tar.gz \
-C toolchain
echo PATH=$PWD/toolchain/bin/:$PATH >> $GITHUB_ENV
echo LD_LIBRARY_PATH=$PWD/toolchain/lib/:$LD_LIBRARY_PATH >> $GITHUB_ENV

- run: clang++ --version

- run: sycl-ls

- name: Set up yarpgen
run: |
git clone https://github.com/intel/yarpgen.git
cmake -B yarpgen/build -G Ninja yarpgen/
ninja -C yarpgen/build

- name: Run yarpgen
run: |
cd yarpgen
# A system hits OOM when using all available threads.
python3 scripts/run_gen.py --target dpcpp --std sycl -t 60 -j 2 | tee yarpgen_run.log
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: do we need 2>&1 here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nope, I don't think so

awk '/^YARPGEN runs stat:/{found=1} found {print}' yarpgen_run.log >> $GITHUB_STEP_SUMMARY

- name: Pack results
run: tar -czf yarpgen_results.tar.gz yarpgen/testing

- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: yarpgen_results
path: yarpgen_results.tar.gz
retention-days: 7

- name: Clean up
if: always()
run: rm -rf devops yarpgen yarpgen_results.tar.gz
Loading