Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9380b6e
enable SYCL CTS test
Jul 14, 2022
f4e6f74
add exclude filter
Jul 14, 2022
2a770cb
fix
Jul 14, 2022
2bd0da9
fix
Jul 14, 2022
365d677
fix
Jul 14, 2022
852330b
fix
Jul 14, 2022
a88c951
fix
Jul 14, 2022
6669347
fix
Jul 14, 2022
52820f7
fix
Jul 15, 2022
03fa149
fix
Jul 15, 2022
0332b63
fix
Jul 15, 2022
ca8a13c
fix
Jul 15, 2022
28028f1
fix
Jul 16, 2022
7324ca3
fix
Jul 18, 2022
64248af
Add sycl cts as post comment test
Jul 19, 2022
2f76907
remove host_task/host_task_interop_api.cpp
Jul 20, 2022
9b98571
remove group
Jul 22, 2022
a84cfe8
remove kernel
Jul 22, 2022
84f0078
remove math_builtin_api due to compile fail
Jul 22, 2022
406be61
remove nd_item and optional_kernel_features due to compile fail
Jul 25, 2022
7f40660
remove accessor_api_image_core.cpp
Jul 26, 2022
da24487
fix
Jul 28, 2022
ad2e277
fix
Aug 2, 2022
cad92f6
Merge branch 'sycl' of https://github.com/intel/llvm into enable_cts
Aug 10, 2022
0341a85
Resolve merge conflicts
Aug 10, 2022
f886d52
fix workflow
Aug 10, 2022
8ce0800
fix workflow
Aug 10, 2022
a4edd47
Merge branch 'sycl' of https://github.com/intel/llvm into enable_cts
Aug 15, 2022
6669c9f
Update cts_exclude_filter
bader Aug 15, 2022
0e1db86
Merge branch 'sycl' of https://github.com/intel/llvm into enable_cts
Aug 16, 2022
6d9e1cb
disabling all the tests except test_header
Aug 16, 2022
ac77a95
Merge branch 'sycl' of https://github.com/intel/llvm into enable_cts
Sep 5, 2022
b1e17d6
Address code review comments.
bader Sep 15, 2022
470e3cb
Merge remote-tracking branch 'origin/sycl' into enable_cts
bader Sep 15, 2022
8fa06e9
Fix test matrix generation job.
bader Sep 15, 2022
8d9186e
Revert "Fix test matrix generation job."
bader Sep 15, 2022
e41485c
Add dpcpp toolchain to the PATH to find sycl-ls.
bader Sep 15, 2022
f553870
Clear filter file to check the status of all tests
bader Sep 17, 2022
c25703d
Add failing tests to the filter file
bader Sep 17, 2022
2d3e84d
optional_kernel_features fails at linking
bader Sep 17, 2022
7d782f3
Filter vector tests
bader Sep 17, 2022
cb46c14
Exclude accessor tests.
bader Sep 17, 2022
6516063
Disable kernel_bundle test
bader Sep 17, 2022
420f24b
Exclude spec constants test to reduce execution time
bader Sep 18, 2022
bcbc050
Apply code review.
bader Sep 20, 2022
1326960
Attempt to fix CI.
bader Sep 20, 2022
50dd318
Revert "Attempt to fix CI."
bader Sep 21, 2022
36ec191
Disable device_selector due to failed assertions.
bader Sep 21, 2022
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
8 changes: 8 additions & 0 deletions .github/workflows/sycl_gen_test_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
type: string
required: true
default: ""
cts_config:
type: string
required: false
default: ""
uniq:
description: Unique string to name dynamic runners in AWS
type: string
Expand All @@ -33,6 +37,9 @@ on:
lts_matrix:
description: "Generated Matrix"
value: ${{ jobs.test_matrix.outputs.lts_matrix }}
cts_matrix:
description: "Generated SYCL CTS Matrix"
value: ${{ jobs.test_matrix.outputs.cts_matrix }}
lts_aws_matrix:
description: "Generated Matrix AWS subset"
value: ${{ jobs.test_matrix.outputs.lts_aws_matrix }}
Expand All @@ -42,6 +49,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
lts_matrix: ${{ steps.work.outputs.lts_matrix }}
cts_matrix: ${{ steps.work.outputs.cts_matrix }}
lts_aws_matrix: ${{ steps.work.outputs.lts_aws_matrix }}
steps:
- name: Download scripts and configs
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/sycl_linux_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,18 @@ on:
type: number
required: false
default: 4
cts_matrix:
type: string
required: false
default: ""
cts_cmake_extra_args:
type: string
required: false
default: ""
cts_ref:
type: string
required: false
default: 'SYCL-2020'

jobs:
build:
Expand Down Expand Up @@ -230,6 +242,53 @@ jobs:
check_sycl_all: ${{ matrix.check_sycl_all }}
results_name_suffix: ${{ matrix.config }}_${{ inputs.build_artifact_suffix }}
cmake_args: '${{ matrix.cmake_args }} ${{ inputs.lts_cmake_extra_args }}'

khronos_sycl_cts:
needs: build
if: ${{ inputs.cts_matrix != '' }}
strategy:
fail-fast: false
max-parallel: ${{ inputs.max_parallel }}
matrix:
include: ${{ fromJSON(inputs.cts_matrix) }}
name: ${{ matrix.name }}
runs-on: ${{ matrix.runs-on }}
env: ${{ matrix.env }}
container:
image: ${{ matrix.image }}
options: ${{ matrix.container_options }}
steps:
- name: Reset GPU
if: ${{ contains(matrix.config, 'gen9') }}
run: |
sudo mount -t debugfs none /sys/kernel/debug
sudo bash -c 'echo 1 > /sys/kernel/debug/dri/0/i915_wedged'
- run: cp -r /actions .
- name: Register cleanup after job is finished
uses: ./actions/cleanup
- name: Install drivers
if: env.compute_runtime_tag != ''
run: |
if [ -e /opt/install_drivers.sh ]; then
# TODO pack this script into container
wget raw.githubusercontent.com/intel/llvm/${{ github.sha }}/devops/scripts/get_release.py
sudo mv get_release.py /opt/
sudo -E /opt/install_drivers.sh --all
fi
# FIXME cached_checkout fails here, but works everywhere else
# TODO: figure out if we remove this action
- uses: actions/checkout@v2
with:
path: llvm
# TODO should this action be packed into container as well?
- uses: ./llvm/devops/actions/khronos_cts_test
name: Run Khronos SYCL CTS
with:
test_ref: ${{ inputs.cts_ref }}
sycl_artifact: sycl_linux_${{ inputs.build_artifact_suffix }}
sycl_archive: llvm_sycl.tar.xz
sycl_device_filter: ${{ matrix.sycl_device_filter }}
cmake_args: '${{ matrix.cmake_args }} ${{ inputs.cts_cmake_extra_args }}'

aws-stop:
name: Stop AWS
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sycl_post_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
uses: ./.github/workflows/sycl_gen_test_matrix.yml
with:
lts_config: "l0_gen9"
cts_config: "cuda"
linux_default:
name: Linux Default
needs: test_matrix
Expand All @@ -26,6 +27,7 @@ jobs:
build_cache_root: "/__w/llvm"
build_artifact_suffix: "post_commit"
lts_matrix: ${{ needs.test_matrix.outputs.lts_matrix }}
cts_matrix: ${{ needs.test_matrix.outputs.cts_matrix }}
lts_aws_matrix: ${{ needs.test_matrix.outputs.lts_aws_matrix }}
linux_no_assert:
name: Linux (no assert)
Expand Down
113 changes: 113 additions & 0 deletions devops/actions/khronos_cts_test/action.yml
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
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
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it needed?

Copy link
Contributor

Choose a reason for hiding this comment

The 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?

Copy link
Contributor

Choose a reason for hiding this comment

The 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.
Hard to estimate impact on the runners available.
Can be done in a separate patch.

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
echo "::endgroup::"
- name: Cleanup
shell: bash
if: always()
run: |
rm -rf toolchain
rm -rf build
rm -rf khronos_sycl_cts
22 changes: 22 additions & 0 deletions devops/cts_exclude_filter
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
context
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
37 changes: 37 additions & 0 deletions devops/scripts/generate_test_matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The 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)

Copy link
Contributor

Choose a reason for hiding this comment

The 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.
I suggest we try to refactor this code in a separate PR. Are you okay with it?

Copy link
Contributor

Choose a reason for hiding this comment

The 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.

}
});
}
14 changes: 14 additions & 0 deletions devops/test_configs.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,19 @@
"check_sycl_all": "cuda:gpu,host",
"cmake_args": ""
}
],
"cts": [
{
"config": "cuda",
"name": "CUDA SYCL CTS",
"runs-on": [
"Linux",
"cuda"
],
"image": "${{ inputs.cuda_image }}",
"container_options": "--gpus all",
"sycl_device_filter": "ext_oneapi_cuda:gpu,host",
"cmake_args": "-DDPCPP_TARGET_TRIPLES=nvptx64-nvidia-cuda"
}
]
}