Sycl nightly workflow #19
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: SYCL | |
| on: | |
| workflow_call: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| latest-release: | |
| # run only on upstream; forks will not have the HW | |
| if: github.repository == 'oneapi-src/unified-memory-framework' | |
| name: Latest release | |
| runs-on: [DSS-LEVEL_ZERO, DSS-UBUNTU] | |
| steps: | |
| # Install sycl | |
| - name: Clean up | |
| run: rm -rf llvm sycl_repo sycl_linux.tar.gz | |
| - name: Download latest llvm release | |
| run: | | |
| latest_release=$(curl -s https://api.github.com/repos/intel/llvm/releases/latest | grep "tag_name" | cut -d '"' -f 4) | |
| download_url="https://github.com/intel/llvm/archive/refs/tags/${latest_release}.tar.gz" | |
| wget --no-verbose $download_url -O sycl_linux.tar.gz | |
| - name: Extract llvm | |
| run: | | |
| mkdir sycl_repo | |
| tar -xzf sycl_linux.tar.gz -C sycl_repo --strip-components=1 | |
| - name: Build llvm | |
| working-directory: sycl_repo | |
| run: | | |
| python3 buildbot/configure.py --cmake-opt CMAKE_INSTALL_PREFIX=${{ github.workspace }}/llvm | |
| python3 buildbot/compile.py -j $(nproc) | |
| - name: Remove UMF installed with llvm | |
| run: rm -f llvm/lib/libumf* | |
| - name: Print sycl files | |
| run: | | |
| tree -L 2 llvm/ | |
| - name: Add sycl to PATH | |
| run: | | |
| echo "${{ github.workspace }}/llvm/bin:$PATH" >> $GITHUB_PATH | |
| # Install UMF | |
| - name: Checkout UMF | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| path: umf_repo | |
| fetch-depth: 0 | |
| - name: Configure UMF | |
| working-directory: umf_repo | |
| run: > | |
| cmake | |
| -B build | |
| -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/llvm | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DCMAKE_C_COMPILER=gcc | |
| -DCMAKE_CXX_COMPILER=g++ | |
| -DUMF_BUILD_SHARED_LIBRARY=ON | |
| -DUMF_BUILD_TESTS=OFF | |
| -DUMF_BUILD_EXAMPLES=OFF | |
| - name: Build and install UMF | |
| working-directory: umf_repo | |
| run: cmake --build build --target install -j$(nproc) | |
| - name: Print installed lib files | |
| run: ls -l llvm/lib | |
| # Test sycl | |
| - name: Run sycl-ls | |
| env: | |
| LD_LIBRARY_PATH: ${{ github.workspace }}/llvm/lib:$LD_LIBRARY_PATH | |
| run: | | |
| ./llvm/bin/sycl-ls | |
| - name: Run sycl tests built locally | |
| env: | |
| LD_LIBRARY_PATH: ${{ github.workspace }}/llvm/lib:$LD_LIBRARY_PATH | |
| working-directory: sycl_repo | |
| run: | | |
| clang++ -fsycl sycl/test-e2e/AbiNeutral/submit-kernel.cpp -o submit-kernel -Iinclude | |
| ONEAPI_DEVICE_SELECTOR=level_zero:gpu ./submit-kernel | |
| - name: Run llvm-lit sycl tests | |
| env: | |
| LD_LIBRARY_PATH: ${{ github.workspace }}/llvm/lib:$LD_LIBRARY_PATH | |
| working-directory: sycl_repo | |
| run: | | |
| llvm-lit --param sycl_devices="level_zero:gpu" sycl/test-e2e | |
| latest-daily: | |
| # run only on upstream; forks will not have the HW | |
| if: github.repository == 'oneapi-src/unified-memory-framework' | |
| name: Latest daily build | |
| runs-on: ["DSS-LEVEL_ZERO", "DSS-UBUNTU"] | |
| steps: | |
| # Install sycl | |
| - name: Clean up | |
| run: rm -rf llvm sycl_linux.tar.gz | |
| - name: Download latest llvm daily release | |
| run: | | |
| latest_tag=$(curl -s https://api.github.com/repos/intel/llvm/releases | awk -F'"' '/"tag_name":/ {print $4; exit}') | |
| download_url="https://github.com/intel/llvm/releases/download/${latest_tag}/sycl_linux.tar.gz" | |
| wget --no-verbose $download_url -O sycl_linux.tar.gz | |
| - name: Extract llvm | |
| run: | | |
| mkdir llvm | |
| tar -xzf sycl_linux.tar.gz -C llvm --strip-components=1 | |
| - name: Add sycl to PATH | |
| run: | | |
| echo "${{ github.workspace }}/llvm/bin:$PATH" >> $GITHUB_PATH | |
| echo "${{ github.workspace }}/llvm/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
| # Install UMF | |
| - name: Checkout UMF | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| path: umf_repo | |
| fetch-depth: 0 | |
| - name: Configure UMF | |
| working-directory: umf_repo | |
| run: > | |
| cmake | |
| -B build | |
| -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/llvm | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DCMAKE_C_COMPILER=gcc | |
| -DCMAKE_CXX_COMPILER=g++ | |
| -DUMF_BUILD_SHARED_LIBRARY=ON | |
| -DUMF_BUILD_TESTS=OFF | |
| -DUMF_BUILD_EXAMPLES=OFF | |
| - name: Remove UMF installed with llvm | |
| run: rm -f llvm/lib/libumf* | |
| - name: Build and install UMF | |
| working-directory: umf_repo | |
| run: cmake --build build --target install -j$(nproc) | |
| - name: Print installed lib files | |
| run: ls -l llvm/lib | |
| # Test sycl-ls | |
| - name: Run sycl-ls | |
| run: | | |
| ./llvm/bin/sycl-ls | |
| # Test several sycl e2e test | |
| - name: Checkout sycl | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| repository: intel/llvm | |
| path: sycl_repo | |
| fetch-depth: 1 | |
| ref: sycl | |
| - name: Build standalone tests | |
| working-directory: sycl_repo/sycl/test-e2e | |
| run: > | |
| cmake | |
| -B build | |
| -DCMAKE_CXX_COMPILER=clang++ | |
| -DSYCL_TEST_E2E_TARGETS="level_zero:gpu" | |
| - name: Run standalone tests | |
| working-directory: sycl_repo/sycl/test-e2e | |
| run: cmake --build build --target check-sycl-e2e | |
| - name: Run sycl tests built locally | |
| env: | |
| LD_LIBRARY_PATH: ${{ github.workspace }}/llvm/lib:$LD_LIBRARY_PATH | |
| working-directory: sycl_repo | |
| run: | | |
| clang++ -fsycl sycl/test-e2e/AbiNeutral/submit-kernel.cpp -o submit-kernel -Iinclude | |
| ONEAPI_DEVICE_SELECTOR=level_zero:gpu ./submit-kernel | |
| - name: Run llvm-lit sycl tests | |
| env: | |
| LD_LIBRARY_PATH: ${{ github.workspace }}/llvm/lib:$LD_LIBRARY_PATH | |
| working-directory: sycl_repo | |
| run: | | |
| llvm-lit --param sycl_devices="level_zero:gpu" sycl/test-e2e |