|
| 1 | +name: 'Run khronos_sycl_cts testing' |
| 2 | +description: 'Run SYCL tests from khronos_sycl_cts' |
| 3 | +inputs: |
| 4 | + test_ref: |
| 5 | + description: 'commit-ish identifier for test repo' |
| 6 | + required: true |
| 7 | + default: 'SYCL-2020' |
| 8 | + sycl_artifact: |
| 9 | + description: 'Name of the artifact, that contains compiler toolchain' |
| 10 | + required: true |
| 11 | + sycl_archive: |
| 12 | + description: 'Name of SYCL toolchain archive file' |
| 13 | + required: false |
| 14 | + default: 'llvm_sycl.tar.xz' |
| 15 | + sycl_device_filter: |
| 16 | + description: 'List of SYCL backends with set of target devices per each to be tested iteratively' |
| 17 | + required: true |
| 18 | + cmake_args: |
| 19 | + description: 'Extra arguments to cmake command' |
| 20 | + required: false |
| 21 | + |
| 22 | +post-if: false |
| 23 | +runs: |
| 24 | + using: "composite" |
| 25 | + steps: |
| 26 | + - run: | |
| 27 | + cp -r /actions . |
| 28 | + git config --global --add safe.directory /__w/repo_cache/KhronosGroup/SYCL-CTS |
| 29 | + shell: bash |
| 30 | + - run: apt update && apt install -yqq opencl-headers ocl-icd-opencl-dev |
| 31 | + shell: bash |
| 32 | + - name: Checkout SYCL CTS |
| 33 | + uses: ./actions/cached_checkout |
| 34 | + with: |
| 35 | + path: khronos_sycl_cts |
| 36 | + repository: 'KhronosGroup/SYCL-CTS' |
| 37 | + ref: ${{ inputs.test_ref }} |
| 38 | + default_branch: 'SYCL-2020' |
| 39 | + cache_path: "/__w/repo_cache/" |
| 40 | + - run: | |
| 41 | + cd khronos_sycl_cts |
| 42 | + git submodule update --init |
| 43 | + shell: bash |
| 44 | + - name: Download compiler toolchain |
| 45 | + uses: actions/download-artifact@v2 |
| 46 | + with: |
| 47 | + name: ${{ inputs.sycl_artifact }} |
| 48 | + - name: Extract SYCL toolchain |
| 49 | + shell: bash |
| 50 | + run: | |
| 51 | + mkdir toolchain |
| 52 | + tar -xf ${{ inputs.sycl_archive }} -C toolchain |
| 53 | + rm -f ${{ inputs.sycl_archive }} |
| 54 | + - name: Build SYCL-CTS |
| 55 | + shell: bash |
| 56 | + run: | |
| 57 | + echo "::group::CMake configuration" |
| 58 | + export LD_LIBRARY_PATH=$PWD/toolchain/lib/:$LD_LIBRARY_PATH |
| 59 | + mkdir build |
| 60 | + cmake -GNinja -B./build -S./khronos_sycl_cts -DSYCL_IMPLEMENTATION=DPCPP \ |
| 61 | + -DCMAKE_CXX_COMPILER="$PWD/toolchain/bin/clang++" \ |
| 62 | + -DSYCL_CTS_EXCLUDE_TEST_CATEGORIES="$PWD/llvm/devops/cts_exclude_filter" \ |
| 63 | + -DSYCL_CTS_ENABLE_OPENCL_INTEROP_TESTS=OFF \ |
| 64 | + -DSYCL_CTS_MEASURE_BUILD_TIMES=ON \ |
| 65 | + -DDPCPP_INSTALL_DIR="$PWD/toolchain" \ |
| 66 | + ${{ inputs.cmake_args }} |
| 67 | + echo "::endgroup::" |
| 68 | + echo "::group::Bulid testing" |
| 69 | + cd build |
| 70 | + ninja |
| 71 | + echo "::endgroup::" |
| 72 | + - name: Run SYCL-CTS |
| 73 | + shell: bash |
| 74 | + run: | |
| 75 | + echo "::group::Configure execution environment" |
| 76 | + export PATH=$PWD/toolchain/bin/:$PATH |
| 77 | + export LD_LIBRARY_PATH=$PWD/toolchain/lib/:$LD_LIBRARY_PATH |
| 78 | + # TODO make this part of container build |
| 79 | + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/rocm/hip/lib/:/opt/rocm/lib |
| 80 | + if [ -e /runtimes/oneapi-tbb/env/vars.sh ]; then |
| 81 | + source /runtimes/oneapi-tbb/env/vars.sh; |
| 82 | + elif [ -e /opt/runtimes/oneapi-tbb/env/vars.sh ]; then |
| 83 | + source /opt/runtimes/oneapi-tbb/env/vars.sh; |
| 84 | + else |
| 85 | + echo "no TBB vars in /opt/runtimes or /runtimes"; |
| 86 | + fi |
| 87 | + # TODO remove workaround of FPGA emu bug |
| 88 | + mkdir -p icd |
| 89 | + echo /usr/lib/x86_64-linux-gnu/intel-opencl/libigdrcl.so > icd/gpu.icd |
| 90 | + echo /runtimes/oclcpu/x64/libintelocl.so > icd/cpu.icd |
| 91 | + echo /opt/runtimes/oclcpu/x64/libintelocl.so > icd/cpu2.icd |
| 92 | + export OCL_ICD_VENDORS=$PWD/icd |
| 93 | + echo "::endgroup::" |
| 94 | + echo "::group::sycl-ls --verbose" |
| 95 | + sycl-ls --verbose |
| 96 | + echo "::endgroup::" |
| 97 | + echo "::group::SYCL_PI_TRACE=-1 sycl-ls" |
| 98 | + echo $LD_LIBRARY_PATH |
| 99 | + SYCL_PI_TRACE=-1 sycl-ls |
| 100 | + echo "::endgroup::" |
| 101 | + echo "::group::Run testing" |
| 102 | + export SYCL_PI_CUDA_ENABLE_IMAGE_SUPPORT=1 |
| 103 | + export SYCL_DEVICE_FILTER=${{ matrix.sycl_device_filter }} |
| 104 | + ./build/bin/test_all --list-devices |
| 105 | + ./build/bin/test_all |
| 106 | + echo "::endgroup::" |
| 107 | + - name: Cleanup |
| 108 | + shell: bash |
| 109 | + if: always() |
| 110 | + run: | |
| 111 | + rm -rf toolchain |
| 112 | + rm -rf build |
| 113 | + rm -rf khronos_sycl_cts |
0 commit comments