Skip to content

This PR modifies conda-recipe to add post-link to dpctl #1081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions conda-recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions conda-recipe/dpctl-post-link.sh
Original file line number Diff line number Diff line change
@@ -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