diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index 4520fcd607..0d5eb6936c 100755 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -30,3 +30,8 @@ else # Perform regular install ${PYTHON} setup.py install ${SKBUILD_ARGS} fi + +# need to create this folder so ensure that .dpctl-post-link.sh can work correctly +mkdir -p $PREFIX/etc/OpenCL/vendors + +cp $RECIPE_DIR/dpctl-post-link.sh $PREFIX/bin/.dpctl-post-link.sh diff --git a/conda-recipe/dpctl-post-link.sh b/conda-recipe/dpctl-post-link.sh new file mode 100644 index 0000000000..30f26b31c5 --- /dev/null +++ b/conda-recipe/dpctl-post-link.sh @@ -0,0 +1,8 @@ +#!/usr/bin/bash + +systemwide_icd=/etc/OpenCL/vendors/intel.icd +local_vendors=$CONDA_PREFIX/etc/OpenCL/vendors/ + +if [[ -f $systemwide_icd && -d $local_vendors && ! -f $local_vendors/intl-ocl-gpu.icd ]]; then + ln -s $systemwide_icd $local_vendors/intel-ocl-gpu.icd +fi