Skip to content
Open
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
24 changes: 0 additions & 24 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,3 @@ jobs:
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }}
path: /usr/share/miniconda/conda-bld/noarch/${{ env.PACKAGE_NAME }}-*.conda

upload_linux:
needs: build_and_test_linux
if: ${{github.ref == 'refs/heads/main' || github.event_name == 'push' && contains(github.ref, 'refs/tags/')}}
runs-on: ubuntu-latest
steps:
- name: Download conda artifact
uses: actions/download-artifact@v8
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }}

- name: Install anaconda-client
run: conda install anaconda-client -c conda-forge --override-channels
- name: Add conda to system path
run: echo $CONDA/bin >> $GITHUB_PATH
- name: Package version
run: echo "PACKAGE_VERSION=$(basename ${{ env.PACKAGE_NAME }}-*.conda | sed 's/^${{ env.PACKAGE_NAME }}-\([^-]*\).*/\1/')" >> $GITHUB_ENV

- name: Upload
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
run: |
anaconda --token $ANACONDA_TOKEN upload --user dppy --label dev ${PACKAGE_NAME}-*.conda

9 changes: 5 additions & 4 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ package:
version: {{ version }}

build:
noarch: generic
number: 2
skip: True # [not linux]
number: 3
skip: true # [not linux]

requirements:
run:
Expand All @@ -17,7 +16,8 @@ requirements:
test:
commands:
- export ICD_FN=${CONDA_PREFIX}/etc/OpenCL/vendors/intel-ocl-gpu.icd
- test -h ${ICD_FN}
- if [ -d /etc/OpenCL/vendors ]; then test -h "${ICD_FN}"; fi
- if [ -L "${ICD_FN}" ]; then test -e "$(readlink "${ICD_FN}")"; fi

about:
home: https://github.com/IntelPython/{{ name|lower }}-feedstock
Expand Down Expand Up @@ -45,3 +45,4 @@ about:
extra:
recipe-maintainers:
- ndgrigorian
- jharlow-intel
25 changes: 14 additions & 11 deletions conda-recipe/post-link.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,23 @@ systemwide_vendors=/etc/OpenCL/vendors
env_vendors=${PREFIX}/etc/OpenCL/vendors
env_icd_fn=$env_vendors/intel-ocl-gpu.icd

if [[ -d $systemwide_vendors ]]
mkdir -p "$env_vendors"

if [[ -d "$systemwide_vendors" ]]
then
systemwide_icd_fn=$(grep -rl "libigdrcl" ${systemwide_vendors})
if [[ -f $systemwide_icd_fn ]]
systemwide_icd_fn=$(grep -rl "libigdrcl" "${systemwide_vendors}" | head -n1)
if [[ -f "$systemwide_icd_fn" ]]
then
ln -s $systemwide_icd_fn $env_icd_fn
echo "Symbolic link was successfully created. OpenCL GPU device should be discoverable by OpenCL loader.\n" >> ${PREFIX}/.messages.txt
ln -s "$systemwide_icd_fn" "$env_icd_fn" || true
echo "Symbolic link was successfully created. OpenCL GPU device should be discoverable by OpenCL loader.\n" >> "${PREFIX}/.messages.txt"
else
echo "No ICD file for Intel(R) GPU device was found in '${systemwise_vendors}'.\n" >> ${PREFIX}/.messages.txt
echo "Creating default symbolic link.\n" >> ${PREFIX}/.messages.txt
ln -s ${systemwide_vendors}/intel.icd $env_icd_fn
echo "No ICD file for Intel(R) GPU device was found in '${systemwide_vendors}'.\n" >> "${PREFIX}/.messages.txt"
if [[ -e "${systemwide_vendors}/intel.icd" ]]
then
echo "Creating default symbolic link.\n" >> "${PREFIX}/.messages.txt"
ln -s "${systemwide_vendors}/intel.icd" "$env_icd_fn" || true
fi
fi
else
echo "Folder '${systemwide_vendors}' does not exist. \n" >> $PREFIX/.messages.txt
echo "Creating default symbolic link. \n" >> ${PREFIX}/.messages.txt
ln -s ${systemwide_vendors}/intel.icd $env_icd_fn
echo "Folder '${systemwide_vendors}' does not exist. \n" >> "${PREFIX}/.messages.txt"
fi
7 changes: 3 additions & 4 deletions conda-recipe/pre-unlink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

local_vendors=$PREFIX/etc/OpenCL/vendors
icd_fn=$local_vendors/intel-ocl-gpu.icd
icd_fn="${PREFIX}"/etc/OpenCL/vendors/intel-ocl-gpu.icd

if [[ -L $icd_fn ]]; then
rm $icd_fn
if [[ -L "$icd_fn" ]]; then
rm "$icd_fn" || true
fi
Loading