Skip to content

Commit 6146289

Browse files
committed
use dpcpp (broken) conda packages
1 parent 4e5597a commit 6146289

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

conda-recipe/build.sh

+13-11
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,18 @@ popd
2727

2828
# skip checkout/build of IMEX/LLVM if there is an install
2929
if [ ! -d "${INSTALLED_DIR}/imex/lib" ]; then
30-
# FIXME work-around as long dpcpp conda packages are incomplete
31-
export SYCL_DIR="/opt/intel/oneapi/compiler/latest/linux"
32-
if [ ! -d "${SYCL_DIR}" ]; then
33-
export SYCL_DIR="/opt/intel/oneapi/compiler/latest"
34-
if [ ! -d "${SYCL_DIR}" ]; then
35-
echo "Fatal error: SYCL_DIR not found"
36-
exit 1
37-
fi
30+
export SYCL_DIR=${CONDA_PREFIX}
31+
echo "Using SYCL_DIR=${SYCL_DIR}"
32+
33+
# grrrr
34+
# as long as the conda packages differ from system oneAPI installs we need to explicitly provide the include dir for SYCL
35+
# see also below in cmake call
36+
SYCL_INC_DIR=$(dirname $(dirname $(find ${CONDA_PREFIX} -d -name __spriv | head -n 1)))
37+
if [ ! -d "${SYCL_INC_DIR}" ]; then
38+
echo "Fatal error: SYCL_INC_DIR not found"
39+
exit 1
3840
fi
39-
# export SYCL_DIR=${CONDA_PREFIX}
40-
echo "Using SYCLDIR=${SYCL_DIR}"
41+
echo "Using SYCL_INC_DIR=${SYCL_INC_DIR}"
4142

4243
rm -rf ${INSTALLED_DIR}/imex
4344
IMEX_SHA=$(cat imex_version.txt)
@@ -86,7 +87,8 @@ if [ ! -d "${INSTALLED_DIR}/imex/lib" ]; then
8687
-DLLVM_EXTERNAL_IMEX_SOURCE_DIR=. \
8788
-DLEVEL_ZERO_DIR=${INSTALLED_DIR}/level-zero \
8889
-DIMEX_ENABLE_SYCL_RUNTIME=1 \
89-
-DIMEX_ENABLE_L0_RUNTIME=1
90+
-DIMEX_ENABLE_L0_RUNTIME=1 \
91+
-DCMAKE_CXX_FLAGS="-I${SYCL_INC_DIR} # grrrr
9092
cmake --build build
9193
cmake --install build --prefix=${INSTALLED_DIR}/imex
9294
popd

conda-recipe/meta.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ requirements:
2929

3030
build:
3131
- {{compiler('gxx')}}
32-
- sysroot_linux-64 >=2.28 # [linux]
33-
# - dpcpp_linux-64 # [linux]
34-
# - dpcpp_win-64 # [win]
32+
- sysroot_linux-64 # [linux]
33+
# - sysroot_linux-64 >=2.28 # [linux]
34+
- dpcpp_linux-64 >=2024.1 # [linux]
35+
- dpcpp_win-64 # [win]
3536
# - {{compiler('dpcpp')}} >={{required_compiler_and_mkl_version}},!={{excluded_compiler_version1}},!={{excluded_compiler_version2}} # [not osx]
3637
run:
3738
- numpy x.x

0 commit comments

Comments
 (0)