|
| 1 | +name: SYCL Yarpgen |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + toolchain_run_id: |
| 7 | + description: | |
| 8 | + Run ID of a workflow run to download the toolchain artifact from. |
| 9 | + If not set, the toolchain pre-installed in the container image is used. |
| 10 | + type: string |
| 11 | + default: '' |
| 12 | + toolchain_artifact: |
| 13 | + description: Name of the artifact to download. |
| 14 | + type: string |
| 15 | + default: 'sycl_linux_default' |
| 16 | + schedule: |
| 17 | + # At 00:00 on Sunday. |
| 18 | + - cron: '0 0 * * 0' |
| 19 | + |
| 20 | +permissions: read-all |
| 21 | + |
| 22 | +jobs: |
| 23 | + yarpgen: |
| 24 | + runs-on: ["Linux", "gen12"] |
| 25 | + container: |
| 26 | + # This workflow runs on Sundays, so in almost all cases there are no new |
| 27 | + # commits on Saturday, and therefore the latest nightly can be used. |
| 28 | + image: ghcr.io/intel/llvm/sycl_ubuntu2404_nightly:latest |
| 29 | + options: -u 1001 --device=/dev/dri -v /dev/dri/by-path:/dev/dri/by-path --privileged --cap-add SYS_ADMIN |
| 30 | + steps: |
| 31 | + - name: Checkout actions/source-tbb |
| 32 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 33 | + with: |
| 34 | + sparse-checkout: | |
| 35 | + devops/actions/source-tbb |
| 36 | + sparse-checkout-cone-mode: false |
| 37 | + persist-credentials: false |
| 38 | + |
| 39 | + - name: Source OneAPI TBB vars.sh |
| 40 | + uses: ./devops/actions/source-tbb |
| 41 | + |
| 42 | + - name: Download SYCL toolchain |
| 43 | + if: inputs.toolchain_run_id != '' |
| 44 | + env: |
| 45 | + GH_TOKEN: ${{ github.token }} |
| 46 | + run: | |
| 47 | + gh run download ${{ inputs.toolchain_run_id }} \ |
| 48 | + -n ${{ inputs.toolchain_artifact }} \ |
| 49 | + -R ${{ github.repository }} |
| 50 | +
|
| 51 | + - name: Extract/Setup SYCL toolchain |
| 52 | + if: inputs.toolchain_run_id != '' |
| 53 | + run: | |
| 54 | + mkdir toolchain |
| 55 | + tar -xf ${{ inputs.toolchain_artifact }}/sycl_linux.tar.gz \ |
| 56 | + -C toolchain |
| 57 | + echo PATH=$PWD/toolchain/bin/:$PATH >> $GITHUB_ENV |
| 58 | + echo LD_LIBRARY_PATH=$PWD/toolchain/lib/:$LD_LIBRARY_PATH >> $GITHUB_ENV |
| 59 | +
|
| 60 | + - run: clang++ --version |
| 61 | + |
| 62 | + - run: sycl-ls |
| 63 | + |
| 64 | + - name: Set up yarpgen |
| 65 | + run: | |
| 66 | + git clone https://github.com/intel/yarpgen.git |
| 67 | + cmake -B yarpgen/build -G Ninja yarpgen/ |
| 68 | + ninja -C yarpgen/build |
| 69 | +
|
| 70 | + - name: Run yarpgen |
| 71 | + run: | |
| 72 | + cd yarpgen |
| 73 | + # A system hits OOM when using all available threads. |
| 74 | + python3 scripts/run_gen.py --target dpcpp --std sycl -t 60 -j 2 | tee yarpgen_run.log |
| 75 | + awk '/^YARPGEN runs stat:/{found=1} found {print}' yarpgen_run.log >> $GITHUB_STEP_SUMMARY |
| 76 | +
|
| 77 | + - name: Pack results |
| 78 | + run: tar -czf yarpgen_results.tar.gz yarpgen/testing |
| 79 | + |
| 80 | + - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 |
| 81 | + with: |
| 82 | + name: yarpgen_results |
| 83 | + path: yarpgen_results.tar.gz |
| 84 | + retention-days: 7 |
| 85 | + |
| 86 | + - name: Clean up |
| 87 | + if: always() |
| 88 | + run: rm -rf devops yarpgen yarpgen_results.tar.gz |
0 commit comments