-
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 oneapi base toolkit's components.…
… Also add sycl-nbody support with dpc++
- Loading branch information
1 parent
9b0922b
commit 3c0abb4
Showing
5 changed files
with
79 additions
and
28 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,41 @@ | ||
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 | ||
|
||
- name: Set up Environment and build | ||
shell: bash | ||
run: | | ||
# Set environment variables | ||
export LD_LIBRARY_PATH=$(pwd)/install/lib:${{ inputs.workspace }}/intel/oneapi/compiler/2024.0/lib/libsycl.so:${{ inputs.workspace }}/intel/oneapi/compiler/2024.0/lib:$LD_LIBRARY_PATH | ||
export CMAKE_CXX_COMPILER=${{ inputs.workspace }}/intel/oneapi/compiler/2024.0/bin/compiler/clang++ | ||
export CMAKE_C_COMPILER=${{ inputs.workspace }}/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=${{ inputs.workspace }}/intel/oneapi/compiler/2024.0/bin/icpx:${{ inputs.workspace }}/intel/oneapi/compiler/2024.0/bin:${{ inputs.workspace }}/intel/oneapi/compiler/2024.0/lib:$PATH | ||
export OCL_ICD_VENDORS=/dev/null | ||
export dpct_INCLUDE_DIR=${{ inputs.workspace }}/intel/oneapi/compiler/2024.0/include | ||
export dpct_LOCATION=${{ inputs.workspace }}/intel/oneapi/2024.0/ | ||
export CXX=icpx | ||
export CC=icpx | ||
cmake cuda-to-sycl-nbody -GNinja -B sycl_nbody_build -DRENDER=off -DGLEW_LIBRARY=/usr/lib/x86_64-linux-gnu/libGLEW.so -DBACKEND=DPCPP -DDPCPP_CUDA_SUPPORT=off | ||
ninja -C sycl_nbody_build | ||
#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 |
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