Skip to content

Replace use of intel channel, since it no longer works #1729

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 4 commits into from
Jul 14, 2024
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
40 changes: 30 additions & 10 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:
TEST_ENV_NAME: test_dpctl
VER_SCRIPT1: "import json; f = open('ver.json', 'r'); j = json.load(f); f.close(); "
VER_SCRIPT2: "d = j['dpctl'][0]; print('='.join((d[s] for s in ('version', 'build'))))"
INTEL_CHANNEL: "https://software.repos.intel.com/python/conda/"

jobs:
build_linux:
Expand Down Expand Up @@ -52,7 +53,7 @@ jobs:
- name: Build conda package
run: |
# use bootstrap channel to pull NumPy linked with OpenBLAS
CHANNELS="-c dppy/label/bootstrap -c intel -c conda-forge --override-channels"
CHANNELS="-c dppy/label/bootstrap -c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels"
VERSIONS="--python ${{ matrix.python }} --numpy 1.23"
TEST="--no-test"
conda build \
Expand Down Expand Up @@ -108,7 +109,7 @@ jobs:
- name: Build conda package
env:
OVERRIDE_INTEL_IPO: 1 # IPO requires more resources that GH actions VM provides
run: conda build --no-test --python ${{ matrix.python }} -c intel -c conda-forge --override-channels conda-recipe
run: conda build --no-test --python ${{ matrix.python }} -c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels conda-recipe
- name: Upload artifact
uses: actions/[email protected]
with:
Expand All @@ -130,10 +131,14 @@ jobs:
experimental: [false]
runner: [ubuntu-20.04]
continue-on-error: ${{ matrix.experimental }}
env:
CHANNELS: -c intel -c conda-forge --override-channels

steps:
- name: Construct channels line
run: |
echo "CHANNELS=-c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels" >> $GITHUB_ENV
- name: Display channels line
run: |
echo ${{ env.CHANNELS }}
- name: Download artifact
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -221,9 +226,15 @@ jobs:
continue-on-error: ${{ matrix.experimental }}
env:
workdir: '${{ github.workspace }}'
CHANNELS: -c intel -c conda-forge --override-channels

steps:
- name: Construct channels line
shell: pwsh
run: |
echo "CHANNELS=-c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels" >> $env:GITHUB_ENV
- name: Display channels line
run: |
echo ${{ env.CHANNELS }}
- name: Download artifact
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -280,7 +291,7 @@ jobs:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
- name: Install opencl_rt
shell: cmd /C CALL {0}
run: conda install -n ${{ env.TEST_ENV_NAME }} opencl_rt -c intel --override-channels
run: conda install -n ${{ env.TEST_ENV_NAME }} opencl_rt -c ${{ env.INTEL_CHANNEL }} --override-channels
- name: Install dpctl
shell: cmd /C CALL {0}
run: |
Expand Down Expand Up @@ -420,11 +431,16 @@ jobs:
runner: [ubuntu-20.04]
continue-on-error: ${{ matrix.experimental }}
env:
CHANNELS: -c intel -c conda-forge --override-channels
EXAMPLES_ENV_NAME: examples
BUILD_ENV_NAME: build_env

steps:
- name: Construct channels line
run: |
echo "CHANNELS=-c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels" >> $GITHUB_ENV
- name: Display channels line
run: |
echo ${{ env.CHANNELS }}
- name: Install conda-index
# Needed to be able to run conda index
run: conda install conda-index -c conda-forge --override-channels
Expand Down Expand Up @@ -484,7 +500,7 @@ jobs:
shell: bash -l {0}
run: |
source $CONDA/etc/profile.d/conda.sh
CHANNELS="-c $GITHUB_WORKSPACE/channel -c dppy/label/dev -c intel -c conda-forge --override-channels"
CHANNELS="-c $GITHUB_WORKSPACE/channel -c dppy/label/dev -c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels"
export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")
conda install -n ${{ env.EXAMPLES_ENV_NAME }} -y ${CHANNELS} dpctl=${PACKAGE_VERSION} dpnp || exit 1
- name: Build and run examples of pybind11 extensions
Expand Down Expand Up @@ -570,9 +586,13 @@ jobs:
experimental: [false]
runner: [ubuntu-20.04]
continue-on-error: ${{ matrix.experimental }}
env:
CHANNELS: -c intel -c conda-forge --override-channels
steps:
- name: Construct channels line
run: |
echo "CHANNELS=-c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels" >> $GITHUB_ENV
- name: Display channels line
run: |
echo ${{ env.CHANNELS }}
- name: Checkout dpctl repo
uses: actions/[email protected]
with:
Expand Down
9 changes: 9 additions & 0 deletions dpctl/tests/test_sycl_kernel_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"""

import ctypes
import sys

import numpy as np
import pytest
Expand Down Expand Up @@ -77,6 +78,14 @@ def test_create_program_from_source(ctype_str, dtype, ctypes_ctor):
b_np = dpt.asnumpy(b)
a_np = dpt.asnumpy(a)

if "mkl_umath" in sys.modules:
mod = sys.modules["mkl_umath"]
if hasattr(mod, "restore"):
# undo numpy umath patching to work around
# incorrect reference result on
# AMD EPYC 7763 64-Core Processor as observed in GH CI
mod.restore()

for r in (
[
n_elems,
Expand Down
Loading