-
Notifications
You must be signed in to change notification settings - Fork 801
[CI] Enable CUDA SYCL CTS tests #6439
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
Changes from all commits
9380b6e
f4e6f74
2a770cb
2bd0da9
365d677
852330b
a88c951
6669347
52820f7
03fa149
0332b63
ca8a13c
28028f1
7324ca3
64248af
2f76907
9b98571
a84cfe8
84f0078
406be61
7f40660
da24487
ad2e277
cad92f6
0341a85
f886d52
8ce0800
a4edd47
6669c9f
0e1db86
6d9e1cb
ac77a95
b1e17d6
470e3cb
8fa06e9
8d9186e
e41485c
f553870
c25703d
2d3e84d
7d782f3
cb46c14
6516063
420f24b
bcbc050
1326960
50dd318
36ec191
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| name: 'Run khronos_sycl_cts testing' | ||
| description: 'Run SYCL tests from khronos_sycl_cts' | ||
| inputs: | ||
| test_ref: | ||
| description: 'commit-ish identifier for test repo' | ||
| required: true | ||
| default: 'SYCL-2020' | ||
| sycl_artifact: | ||
| description: 'Name of the artifact, that contains compiler toolchain' | ||
| required: true | ||
| sycl_archive: | ||
| description: 'Name of SYCL toolchain archive file' | ||
| required: false | ||
| default: 'llvm_sycl.tar.xz' | ||
| sycl_device_filter: | ||
| description: 'List of SYCL backends with set of target devices per each to be tested iteratively' | ||
| required: true | ||
| cmake_args: | ||
| description: 'Extra arguments to cmake command' | ||
| required: false | ||
|
|
||
| post-if: false | ||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - run: | | ||
| cp -r /actions . | ||
| git config --global --add safe.directory /__w/repo_cache/KhronosGroup/SYCL-CTS | ||
| shell: bash | ||
| - run: apt update && apt install -yqq opencl-headers ocl-icd-opencl-dev | ||
| shell: bash | ||
| - name: Checkout SYCL CTS | ||
| uses: ./actions/cached_checkout | ||
| with: | ||
| path: khronos_sycl_cts | ||
| repository: 'KhronosGroup/SYCL-CTS' | ||
| ref: ${{ inputs.test_ref }} | ||
| default_branch: 'SYCL-2020' | ||
| cache_path: "/__w/repo_cache/" | ||
| - run: | | ||
| cd khronos_sycl_cts | ||
| git submodule update --init | ||
| shell: bash | ||
| - name: Download compiler toolchain | ||
| uses: actions/download-artifact@v2 | ||
| with: | ||
| name: ${{ inputs.sycl_artifact }} | ||
| - name: Extract SYCL toolchain | ||
| shell: bash | ||
| run: | | ||
| mkdir toolchain | ||
| tar -xf ${{ inputs.sycl_archive }} -C toolchain | ||
| rm -f ${{ inputs.sycl_archive }} | ||
| - name: Build SYCL-CTS | ||
| shell: bash | ||
| run: | | ||
| echo "::group::CMake configuration" | ||
| export LD_LIBRARY_PATH=$PWD/toolchain/lib/:$LD_LIBRARY_PATH | ||
| mkdir build | ||
| cmake -GNinja -B./build -S./khronos_sycl_cts -DSYCL_IMPLEMENTATION=DPCPP \ | ||
| -DCMAKE_CXX_COMPILER="$PWD/toolchain/bin/clang++" \ | ||
| -DSYCL_CTS_EXCLUDE_TEST_CATEGORIES="$PWD/llvm/devops/cts_exclude_filter" \ | ||
| -DSYCL_CTS_ENABLE_OPENCL_INTEROP_TESTS=OFF \ | ||
| -DSYCL_CTS_MEASURE_BUILD_TIMES=ON \ | ||
| -DDPCPP_INSTALL_DIR="$PWD/toolchain" \ | ||
| ${{ inputs.cmake_args }} | ||
| echo "::endgroup::" | ||
| echo "::group::Bulid testing" | ||
| cd build | ||
| ninja | ||
| echo "::endgroup::" | ||
| - name: Run SYCL-CTS | ||
| shell: bash | ||
| run: | | ||
| echo "::group::Configure execution environment" | ||
| export PATH=$PWD/toolchain/bin/:$PATH | ||
bader marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| export LD_LIBRARY_PATH=$PWD/toolchain/lib/:$LD_LIBRARY_PATH | ||
| # TODO make this part of container build | ||
| export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/rocm/hip/lib/:/opt/rocm/lib | ||
| if [ -e /runtimes/oneapi-tbb/env/vars.sh ]; then | ||
| source /runtimes/oneapi-tbb/env/vars.sh; | ||
| elif [ -e /opt/runtimes/oneapi-tbb/env/vars.sh ]; then | ||
| source /opt/runtimes/oneapi-tbb/env/vars.sh; | ||
| else | ||
| echo "no TBB vars in /opt/runtimes or /runtimes"; | ||
| fi | ||
| # TODO remove workaround of FPGA emu bug | ||
| mkdir -p icd | ||
| echo /usr/lib/x86_64-linux-gnu/intel-opencl/libigdrcl.so > icd/gpu.icd | ||
| echo /runtimes/oclcpu/x64/libintelocl.so > icd/cpu.icd | ||
| echo /opt/runtimes/oclcpu/x64/libintelocl.so > icd/cpu2.icd | ||
|
Comment on lines
+87
to
+91
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it needed?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's needed for execution on OpenCL GPU/CPU devices. I can add these configuration right away. Are you okay with that?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's start with CUDA first, but I think we want to add Level Zero GPU or OpenCL CPU, or maybe both as a reference. |
||
| export OCL_ICD_VENDORS=$PWD/icd | ||
| echo "::endgroup::" | ||
| echo "::group::sycl-ls --verbose" | ||
| sycl-ls --verbose | ||
| echo "::endgroup::" | ||
| echo "::group::SYCL_PI_TRACE=-1 sycl-ls" | ||
| echo $LD_LIBRARY_PATH | ||
| SYCL_PI_TRACE=-1 sycl-ls | ||
| echo "::endgroup::" | ||
| echo "::group::Run testing" | ||
| export SYCL_PI_CUDA_ENABLE_IMAGE_SUPPORT=1 | ||
| export SYCL_DEVICE_FILTER=${{ matrix.sycl_device_filter }} | ||
| ./build/bin/test_all --list-devices | ||
| ./build/bin/test_all | ||
bader marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| echo "::endgroup::" | ||
| - name: Cleanup | ||
| shell: bash | ||
| if: always() | ||
| run: | | ||
| rm -rf toolchain | ||
| rm -rf build | ||
| rm -rf khronos_sycl_cts | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| context | ||
bader marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| device | ||
| event | ||
| exceptions | ||
| kernel | ||
| multi_ptr | ||
| platform | ||
| queue | ||
| reduction | ||
| optional_kernel_features | ||
| accessor | ||
| accessor_legacy | ||
| vector_alias | ||
| vector_api | ||
| vector_constructors | ||
| vector_load_store | ||
| vector_operators | ||
| vector_swizzle_assignment | ||
| vector_swizzles | ||
| kernel_bundle | ||
| specialization_constants | ||
| device_selector | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,6 +69,43 @@ module.exports = ({core, process}) => { | |
|
|
||
| core.setOutput('lts_matrix', ltsString); | ||
| core.setOutput('lts_aws_matrix', ltsAWSString); | ||
|
|
||
| const ctsConfigs = inputs.cts_config.split(';'); | ||
|
|
||
| const enabledCTSConfigs = []; | ||
|
|
||
| testConfigs.cts.forEach(v => { | ||
| if (ctsConfigs.includes(v.config)) { | ||
| if (needsDrivers) { | ||
| v["env"] = { | ||
| "compute_runtime_tag" : | ||
| driverNew["linux"]["compute_runtime"]["github_tag"], | ||
| "igc_tag" : driverNew["linux"]["igc"]["github_tag"], | ||
| "cm_tag" : driverNew["linux"]["cm"]["github_tag"], | ||
| "tbb_tag" : driverNew["linux"]["tbb"]["github_tag"], | ||
| "cpu_tag" : driverNew["linux"]["oclcpu"]["github_tag"], | ||
| "fpgaemu_tag" : driverNew["linux"]["fpgaemu"]["github_tag"], | ||
| }; | ||
| } else { | ||
| v["env"] = {}; | ||
| } | ||
| enabledCTSConfigs.push(v); | ||
| } | ||
| }); | ||
|
|
||
| let ctsString = JSON.stringify(enabledCTSConfigs); | ||
| console.log(ctsString); | ||
|
|
||
| for (let [key, value] of Object.entries(inputs)) { | ||
| ctsString = ctsString.replaceAll("${{ inputs." + key + " }}", value); | ||
| } | ||
| if (needsDrivers) { | ||
| ctsString = ctsString.replaceAll( | ||
| "ghcr.io/intel/llvm/ubuntu2004_intel_drivers:latest", | ||
| "ghcr.io/intel/llvm/ubuntu2004_base:latest"); | ||
| } | ||
|
|
||
| core.setOutput('cts_matrix', ctsString); | ||
|
Comment on lines
+72
to
+108
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please integrate all of that to the code above (see how lts_matrix and lts_aws_matrix handled together)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if it make sense to "integrate" CTS code into llmv-test-suite. I see that @yinyangsx duplicated configuration. I guess it's done to be able to configure two independent execution environments for running llvm-test-suite and CTS.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm ok with separate PR. Thanks. I think it will be cleaner code after refactoring. |
||
| } | ||
| }); | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.