|
27 | 27 |
|
28 | 28 | # skip checkout/build of IMEX/LLVM if there is an install |
29 | 29 | 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 |
38 | 40 | fi |
39 | | - # export SYCL_DIR=${CONDA_PREFIX} |
40 | | - echo "Using SYCLDIR=${SYCL_DIR}" |
| 41 | + echo "Using SYCL_INC_DIR=${SYCL_INC_DIR}" |
41 | 42 |
|
42 | 43 | rm -rf ${INSTALLED_DIR}/imex |
43 | 44 | IMEX_SHA=$(cat imex_version.txt) |
@@ -86,7 +87,8 @@ if [ ! -d "${INSTALLED_DIR}/imex/lib" ]; then |
86 | 87 | -DLLVM_EXTERNAL_IMEX_SOURCE_DIR=. \ |
87 | 88 | -DLEVEL_ZERO_DIR=${INSTALLED_DIR}/level-zero \ |
88 | 89 | -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 |
90 | 92 | cmake --build build |
91 | 93 | cmake --install build --prefix=${INSTALLED_DIR}/imex |
92 | 94 | popd |
|
0 commit comments