-
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.
Update the ock_demo workflow to use separate jobs and artifacts
- Loading branch information
1 parent
f728550
commit 5c50143
Showing
5 changed files
with
256 additions
and
54 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: build_sycl_nbody | ||
description: Action to clone and build sycl_nbody using oneAPI | ||
|
||
inputs: | ||
workspace: | ||
description: 'Main workflow workspace' | ||
default: ${{ github.workspace }} | ||
|
||
runs: | ||
# We don't want a new docker just a list of steps, so mark as composite | ||
using: "composite" | ||
steps: | ||
- name: Clone sycl_nbody | ||
shell: bash | ||
run: git clone --recursive --depth 1 --single-branch https://github.com/codeplaysoftware/cuda-to-sycl-nbody.git | ||
|
||
# installs tools, ninja, installs llvm and sets up sccahe | ||
- name: setup ubuntu | ||
uses: ./.github/actions/setup_ubuntu_build | ||
|
||
- name: Get Intel OneAPI BaseToolkit | ||
shell: bash | ||
run: | | ||
wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/163da6e4-56eb-4948-aba3-debcec61c064/l_BaseKit_p_2024.0.1.46.sh | ||
export TERMINFO=/usr/lib/terminfo | ||
sh $(pwd)/l_BaseKit_p_2024.0.1.46.sh -a --silent --eula accept --action install --components 'intel.oneapi.lin.dpcpp-cpp-compiler':'intel.oneapi.lin.dpcpp-ct' | ||
mv /home/runner/intel $(pwd) | ||
- name: Set up Environment and build | ||
shell: bash | ||
run: | | ||
# Set environment variables | ||
export LD_LIBRARY_PATH=$(pwd)/install/lib:$(pwd)/intel/oneapi/compiler/2024.0/lib:$LD_LIBRARY_PATH | ||
export CMAKE_CXX_COMPILER=$(pwd)/intel/oneapi/compiler/2024.0/bin/compiler/clang++ | ||
export CMAKE_C_COMPILER=$(pwd)/intel/oneapi/compiler/2024.0/bin/compiler/clang | ||
export CA_HAL_DEBUG=1 | ||
export CA_PROFILE_LEVEL=3 | ||
export ONEAPI_DEVICE_SELECTOR=opencl:fpga | ||
export OCL_ICD_FILENAMES=$(pwd)/install/lib/libCL.so | ||
# As the oneAPI basetoolkit release has a whitelist of devices, it filters out RefSi. | ||
# To override it, as a temporary solution we can point SYCL_CONFIG_FILE_NAME to ``. | ||
# This way it doesn't set the default sycl.conf. | ||
export SYCL_CONFIG_FILE_NAME="" | ||
export PATH=$(pwd)/intel/oneapi/compiler/2024.0/bin/icpx:$(pwd)/intel/oneapi/compiler/2024.0/bin:$(pwd)/intel/oneapi/compiler/2024.0/lib:$PATH | ||
export OCL_ICD_VENDORS=/dev/null | ||
export dpct_INCLUDE_DIR=$(pwd)/intel/oneapi/compiler/2024.0/include | ||
export dpct_LOCATION=$(pwd)/intel/oneapi/2024.0/ | ||
export CXX=icpx | ||
export CC=icpx | ||
cmake cuda-to-sycl-nbody -GNinja -B sycl_nbody_build_dir -DRENDER=off -DGLEW_LIBRARY=/usr/lib/x86_64-linux-gnu/libGLEW.so -DBACKEND=DPCPP -DDPCPP_CUDA_SUPPORT=off | ||
ninja -C sycl_nbody_build_dir | ||
#CA_HAL_DEBUG=1 OCL_ICD_FILENAMES=$(pwd)/build/lib/libCL.so ONEAPI_DEVICE_SELECTOR=opencl:fpga SYCL_CONFIG_FILE_NAME= cuda-to-sycl-nbody/nbody_dpcpp 1 | ||
- name: Package artifacts | ||
shell: bash | ||
run: | | ||
tar -cvzf sycl_nbody_build.tar.gz sycl_nbody_build_dir | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: sycl_nbody_build | ||
path: sycl_nbody_build.tar.gz |
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
Oops, something went wrong.