Skip to content

Commit

Permalink
Add sycl config to conda build
Browse files Browse the repository at this point in the history
  • Loading branch information
ZzEeKkAa committed Nov 7, 2023
1 parent 71f24ec commit ba57bcf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions conda-recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

set -euxo pipefail

# Intel LLVM must cooperate with compiler and sysroot from conda
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:-}:${BUILD_PREFIX}/lib"

echo "--gcc-toolchain=${BUILD_PREFIX} --sysroot=${BUILD_PREFIX}/${HOST}/sysroot -target ${HOST}" > icpx_for_conda.cfg
export ICPXCFG="$(pwd)/icpx_for_conda.cfg"
export ICXCFG="$(pwd)/icpx_for_conda.cfg"

export CC=icx
export CXX=icpx

# new llvm-spirv location
# starting from dpcpp_impl_linux-64=2022.0.0=intel_3610
export PATH=$CONDA_PREFIX/bin-llvm:$PATH
Expand Down
4 changes: 4 additions & 0 deletions numba_dpex/core/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ project(_dpexrt_python
DESCRIPTION "A Python C extension for numba-dpex runtime."
)

# Help conda build find path from both host and build env.
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)

# Get numba include path
if(NOT DEFINED Numba_INCLUDE_DIRS)
execute_process(
Expand Down

0 comments on commit ba57bcf

Please sign in to comment.