-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
303 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: build dpc++ | ||
description: build dpc++ | ||
|
||
inputs: | ||
target: | ||
description: 'target architecture' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: calc vars | ||
id: calc_vars | ||
uses: ./.github/actions/calc_vars | ||
with: | ||
target: ${{ inputs.target }} | ||
|
||
- name: Install Ninja | ||
uses: llvm/actions/install-ninja@main | ||
|
||
- name: Install spirv tools | ||
shell: bash | ||
run: | ||
sudo apt-get install spirv-tools | ||
|
||
- name: clone dpc++ | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: intel/llvm | ||
path: llvm | ||
|
||
- name: dpcpp configure | ||
shell: bash | ||
run: | ||
cd llvm; python buildbot/configure.py | ||
-o build | ||
--host-target="X86;AArch64;RISCV" | ||
--native_cpu | ||
--llvm-external-projects=lld | ||
--cmake-opt=-DNATIVECPU_USE_OCK=ON | ||
--cmake-opt=-DLLVM_ENABLE_ZLIB=OFF | ||
--cmake-opt=-DLLVM_ENABLE_ZSTD=OFF | ||
- name: build sycl-headers | ||
shell: bash | ||
run: | ||
cmake --build llvm/build -- sycl-headers | ||
|
||
- name: build dpc plus plus | ||
shell: bash | ||
run: | ||
python llvm/buildbot/compile.py -o llvm/build -v -j 8 | ||
|
||
- name: build extra utilties | ||
# Build various utilities, since those aren't proper dependencies. | ||
# FileCheck and not are needed for tests. The rest are needed for | ||
# cross builds. They are enabled on all targets for consistency. | ||
shell: bash | ||
run: | ||
cmake --build llvm/build -- FileCheck clang-tblgen | ||
libclc-remangler llvm-as llvm-min-tblgen llvm-tblgen not | ||
opt prepare_builtins -j8 | ||
- name: copy utilities | ||
shell: bash | ||
run: | ||
cd llvm/build/bin; | ||
cp FileCheck clang-tblgen libclc-remangler llvm-as llvm-min-tblgen | ||
llvm-tblgen not opt prepare_builtins ../install/bin | ||
|
||
- name: install config files to pick up libraries for cross compilation. | ||
shell: bash | ||
run: | | ||
echo Installing configuration files | ||
cd llvm/build/bin | ||
# Install configuration files to pick up libraries for cross compilation. | ||
for arch in x86_64 aarch64 riscv64; do | ||
echo " | ||
-L<CFGDIR>/../../../$arch-linux/install/lib | ||
-fsycl-libdevice-path=<CFGDIR>/../../../$arch-linux/install/lib | ||
-fsycl-libspirv-path=<CFGDIR>/../../../$arch-linux/install/lib/clc/remangled-l64-signed_char.libspirv-$arch-unknown-linux-gnu.bc | ||
" >../install/bin/$arch-unknown-linux-gnu.cfg; | ||
done | ||
- name: upload dpcpp artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dpcpp_${{inputs.target}} | ||
path: llvm/build/install | ||
retention-days: 1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: build sycl cts | ||
description: build sycl cts | ||
|
||
inputs: | ||
target: | ||
description: 'target architecture' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: calc vars | ||
id: calc_vars | ||
uses: ./.github/actions/calc_vars | ||
with: | ||
target: ${{ inputs.target }} | ||
|
||
- name: Install Ninja | ||
uses: llvm/actions/install-ninja@main | ||
|
||
- name: download icd artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: icd_${{inputs.target}} | ||
path: install_icd | ||
|
||
- name: download headers artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: headers_${{inputs.target}} | ||
path: install_headers | ||
|
||
- name: download dpc++ artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dpcpp_${{inputs.target}} | ||
path: install_dpcpp | ||
|
||
- name: checkout sycl cts | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: KhronosGroup/SYCL-CTS | ||
path: SYCL-CTS.src | ||
|
||
-name: build SYCL CTS | ||
shell: bash | ||
run: | | ||
# Todo: as we extend into cross etc, we may want to expand on the cxx flags | ||
# We build SYCL-CTS without installing it, so build directly in the top level. | ||
cd SYCL-CTS.src | ||
git -C SYCL-CTS.src log -1 | ||
# git -C SYCL-CTS.src apply $CI_PROJECT_DIR/patches/SYCL-CTS-0002-Permit-building-for-unknown-architectures.patch | ||
cd .. | ||
cmake -S SYCL-CTS.src \ | ||
-GNinja \ | ||
-B SYCL-CTS \ | ||
-DSYCL_IMPLEMENTATION=DPCPP \ | ||
-DDPCPP_INSTALL_DIR=$GITHUB_WORKSPACE/install_dpcpp \ | ||
-DOpenCL_LIBRARY=$GITHUB_WORKSPACE/install_icd/lib/libOpenCL.so \ | ||
-DOpenCL_INCLUDE_DIR=$GITHUB_WORKSPACE/install_headers/include \ | ||
-DCMAKE_CXX_COMPILER="$GITHUB_WORKSPACE/install_dpcpp/bin/clang++" \ | ||
-DCMAKE_CXX_FLAGS="--target=${{steps.calc_vars.outputs.arch}}-linux-gnu" \ | ||
-DCMAKE_CXX_LINK_FLAGS="-fuse-ld=lld" | ||
ninja -C SYCL-CTS -v -j8 -k 0 || : | ||
- name: upload artefact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: sycl_cts_${{inputs.target}} | ||
path: SYCL-CTS/bin/** | ||
retention-days: 1 | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: run sycl cts | ||
description: run sycl cts | ||
|
||
inputs: | ||
target: | ||
description: 'target architecture' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: calc vars | ||
id: calc_vars | ||
uses: ./.github/actions/calc_vars | ||
with: | ||
target: ${{ inputs.target }} | ||
|
||
- name: Install Ninja | ||
uses: llvm/actions/install-ninja@main | ||
|
||
- name: download ock artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ock_${{inputs.target}} | ||
path: install_ock | ||
|
||
- name: download headers artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: headers_${{inputs.target}} | ||
path: install_headers | ||
|
||
- name: download dpc++ artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dpcpp_${{inputs.target}} | ||
path: install_dpcpp | ||
|
||
- name: run sycl cts | ||
shell: bash | ||
run: | | ||
# TODO: have qemu as input and set up this | ||
export PREPEND_PATH= | ||
echo running sycl cts | ||
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/install_dpcpp/lib:$GITHUB_WORKSPACE/install_ock/lib | ||
export ONEAPI_DEVICE_SELECTOR=opencl:0 | ||
python $GITHUB_WORKSPACE/scripts/testing/run_cities.py \ | ||
--color=always \ | ||
--timeout $SYCL_CTS_TIMEOUT \ | ||
$PREPEND_PATH \ | ||
-p sycl_cts \ | ||
-b SYCL-CTS/bin \ | ||
-L SYCL-CTS/lib \ | ||
-e OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so \ | ||
-s "$GITHUB_WORKSPACE/.github/scripts/sycl-cts.csv" \ | ||
-l SYCL-CTS/cts.log -f SYCL-CTS/cts.fail \ | ||
-r SYCL-CTS/cts.xml \ | ||
-v \ | ||
$SYCL_CTS_FILTER || exitcode=$? | ||
export OCL_ICD_FILENAMES=$CA_INSTALL_DIR/lib/libCL.so | ||
#$GITHUB_WORKSPACE/scripts/create_sycl_cts_test_lists.sh $[[ inputs.prepend_path ]] SYCL-CTS "$CTS_CSV_FILE" csv.txt cts_all.txt | ||
# output a diff of the generated list csv.txt and cts_all.txt | ||
# - diff csv.txt cts_all.txt || echo "WARNING - Missing some tests from sycl cts file based on test_all --list-tests - see > above" | ||
exit $exitcode |
This file contains 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
This file contains 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
This file contains 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
This file contains 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