Skip to content

Commit 45c18f0

Browse files
Fixes to dpctl-post-link prior changes gh-1081
conda prunes empty folders, so the dpctl tar-ball did not contain empty etc/OpenCL/vendors folder. Solved by create a dummy `.dpctl_readme` file in that folder. The script dpctl-post-link.sh contained a type in the filename it was checking should not exist.
1 parent 79fbb79 commit 45c18f0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

conda-recipe/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ fi
3333

3434
# need to create this folder so ensure that .dpctl-post-link.sh can work correctly
3535
mkdir -p $PREFIX/etc/OpenCL/vendors
36+
echo "dpctl creates symbolic link to system installed /etc/OpenCL/vendors/intel.icd as a work-around." > $PREFIX/etc/OpenCL/vendors/.dpctl_readme
3637

3738
cp $RECIPE_DIR/dpctl-post-link.sh $PREFIX/bin/.dpctl-post-link.sh

conda-recipe/dpctl-post-link.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
systemwide_icd=/etc/OpenCL/vendors/intel.icd
44
local_vendors=$CONDA_PREFIX/etc/OpenCL/vendors/
5+
icd_fn=$local_vendors/intel-ocl-gpu.icd
56

6-
if [[ -f $systemwide_icd && -d $local_vendors && ! -f $local_vendors/intl-ocl-gpu.icd ]]; then
7-
ln -s $systemwide_icd $local_vendors/intel-ocl-gpu.icd
7+
if [[ -f $systemwide_icd && -d $local_vendors && ! -f $icd_fn ]]; then
8+
ln -s $systemwide_icd $icd_fn
89
fi

0 commit comments

Comments
 (0)