Skip to content

Commit

Permalink
Merge pull request #1483 from IntelPython/fix/github-workflows
Browse files Browse the repository at this point in the history
Switch workflows to not use intel channel.
  • Loading branch information
ZzEeKkAa authored Aug 2, 2024
2 parents e80fdd0 + 623a204 commit dc94b7e
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 43 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
PACKAGE_NAME: numba-dpex
MODULE_NAME: numba_dpex
# There is a separate action that removes defaults.
CHANNELS: 'dppy/label/dev,conda-forge,intel,numba,nodefaults'
CHANNELS: 'dppy/label/dev,conda-forge,numba,nodefaults'
VER_JSON_NAME: 'version.json'
VER_SCRIPT1: "import json; f = open('version.json', 'r'); j = json.load(f); f.close(); "
VER_SCRIPT2: "d = j['numba-dpex'][0]; print('='.join((d[s] for s in ('version', 'build'))))"
Expand Down Expand Up @@ -161,23 +161,20 @@ jobs:
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.CHANNEL_PATH }} --override-channels --info --json > ${{ env.VER_JSON_PATH }}
cat ${{ env.VER_JSON_PATH }}
- name: Print dependencies
run: |
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.CHANNEL_PATH }} --override-channels --info
- name: Collect dependencies
shell: bash -l {0}
run: |
export PACKAGE_VERSION=$(python -c "${{ env.VER_SCRIPT1 }} ${{ env.VER_SCRIPT2 }}")
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
# We want to make sure that all dependecies install automatically.
# intel::intel-opencl-rt is needed for set-intel-ocl-icd-registry.ps1
# intel-opencl-rt is needed for set-intel-ocl-icd-registry.ps1
- name: Install built package
run: conda install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} intel::intel-opencl-rt -c ${{ env.CHANNEL_PATH }}

- name: Setup OpenCL CPU device
if: runner.os == 'Windows'
shell: pwsh
run: |
$script_path="$env:CONDA_PREFIX\Scripts\set-intel-ocl-icd-registry.ps1"
&$script_path
run: conda install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} intel-opencl-rt -c ${{ env.CHANNEL_PATH }}

- name: List installed packages
run: conda list
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,15 @@ To install `numba_dpex` from the Intel(R) channel on Anaconda
cloud, use the following command:

```bash
conda install numba-dpex -c intel -c conda-forge
conda install numba-dpex -c conda-forge
```

## Pip

The `numba_dpex` can be installed using `pip` obtaining wheel packages either from PyPi or from Intel(R) channel on Anaconda.
To install `numba_dpex` wheel package from Intel(R) channel on Anaconda, run the following command:
The `numba_dpex` can be installed using `pip` obtaining wheel packages either from PyPi.

```bash
python -m pip install --index-url https://pypi.anaconda.org/intel/simple numba-dpex
python -m pip install numba-dpex
```

# Contributing
Expand Down
19 changes: 5 additions & 14 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{% set required_compiler_version = "2024.0" %}
{% set excluded_compiler_version1 = "2024.0.1" %}
{% set excluded_compiler_version2 = "2024.0.2" %}
{% set excluded_compiler_version3 = "2024.0.3" %}
{% set required_compiler_version = "2024.2.0" %}

{% set pyproject = load_file_data('pyproject.toml') %}
{% set py_build_deps = pyproject.get('build-system', {}).get('requires', []) %}
Expand All @@ -21,18 +18,17 @@ build:
requirements:
# TODO: keep in sync with /pyproject.toml
build:
- {{ compiler('cxx') }}
- {{ compiler('dpcpp') }} >={{ required_compiler_version }},!={{ excluded_compiler_version1 }},!={{ excluded_compiler_version2 }},!={{ excluded_compiler_version3 }} # [win]
- {{ compiler('dpcpp') }} >={{ required_compiler_version }},!={{ excluded_compiler_version1 }},!={{ excluded_compiler_version2 }} # [linux]
- {{ compiler('c') }}
- {{ compiler('dpcpp') }} >={{ required_compiler_version }}
# Minimal supported version of sysroot (which is version of glibc) to
# have compatibility with wider range of linux distributions.
# 2.28 is the minimal supported version by dpcpp
- sysroot_linux-64 =2.28 # [linux]
host:
- python
- pip >=24.0
- dpcpp-cpp-rt >={{ required_compiler_version }},!={{ excluded_compiler_version1 }},!={{ excluded_compiler_version2 }},!={{ excluded_compiler_version3 }} # [win]
- dpcpp-cpp-rt >={{ required_compiler_version }},!={{ excluded_compiler_version1 }},!={{ excluded_compiler_version2 }} # [linux]
- dpcpp-cpp-rt
- intel-cmplr-lib-rt
# ensure we are using latest version of setuptools, since we don't need
# editable environments for release.
- setuptools >=69
Expand All @@ -53,17 +49,12 @@ requirements:
# pin_compatible at run section.
- dpcpp-llvm-spirv >={{ required_compiler_version }}
run:
- {{ pin_compatible('dpcpp-cpp-rt', min_pin='x.x', max_pin='x') }}
- {{ pin_compatible('intel-cmplr-lib-rt', min_pin='x.x', max_pin='x') }}
# TODO: pick up min version from dep
- {{ pin_compatible('dpcpp-llvm-spirv', min_pin='x.x', max_pin='x') }}
- {{ pin_compatible('dpnp', min_pin='x.x.x', max_pin='x.x') }}
- {{ pin_compatible('dpctl', min_pin='x.x.x', max_pin='x.x') }}
- {{ pin_compatible('numba', min_pin='x.x.x', max_pin='x.x') }}
- {{ pin_compatible('llvmlite', min_pin='x.x.x', max_pin='x.x') }}
# TODO: set max pin +2 from minor version
# https://numpy.org/neps/nep-0023-backwards-compatibility.html#nep23
- {{ pin_compatible('numpy', min_pin='x.x.x', max_pin='x') }}
- python

test:
Expand Down
8 changes: 4 additions & 4 deletions docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ to get the latest production releases.
conda create -n numba-dpex-env \
numba-dpex dpnp dpctl dpcpp-llvm-spirv \
-c intel -c conda-forge
-c conda-forge
To try out the bleeding edge, the latest packages built from tip of the main
source trunk can be installed from the ``dppy/label/dev`` conda channel.
Expand All @@ -29,7 +29,7 @@ source trunk can be installed from the ``dppy/label/dev`` conda channel.
conda create -n numba-dpex-env \
numba-dpex dpnp dpctl dpcpp-llvm-spirv \
-c dppy/label/dev -c intel -c conda-forge
-c dppy/label/dev -c conda-forge
Expand All @@ -53,7 +53,7 @@ Steps to build using ``conda-build``:

.. code-block:: bash
conda build conda-recipe -c intel -c conda-forge
conda build conda-recipe -c conda-forge
3. Install the conda package

Expand All @@ -71,7 +71,7 @@ first step.
# Create a conda environment that hass needed dependencies installed
conda create -n numba-dpex-env \
scikit-build cmake dpctl dpnp numba dpcpp-llvm-spirv llvmdev pytest \
-c intel -c conda-forge
-c conda-forge
# Activate the environment
conda activate numba-dpex-env
# Clone the numba-dpex repository
Expand Down
11 changes: 6 additions & 5 deletions environment/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@ name: dev
channels:
- dppy/label/dev
- numba
- intel
- conda-forge
- nodefaults
dependencies:
- libffi
- gxx_linux-64
- dpcpp_linux-64>=2024.0,!=2024.0.1,!=2024.0.2
- numba==0.58*
- gcc_linux-64
- dpcpp_linux-64>=2024.2
- sysroot_linux-64=2.28
- numba==0.59*
- dpctl
- dpnp
- dpcpp-llvm-spirv
- opencl_rt
- intel-opencl-rt
- coverage
- pytest
- pytest-cov
- pytest-xdist
- pexpect
- scikit-build>=0.15*
- cmake>=3.26*
- ninja
- versioneer
9 changes: 5 additions & 4 deletions environment/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@ name: dpex-docs-dev
channels:
- dppy/label/dev
- numba
- intel
- conda-forge
- nodefaults
dependencies:
- libffi
- gxx_linux-64
- dpcpp_linux-64>=2024.0,!=2024.0.1,!=2024.0.2
- gcc_linux-64
- dpcpp_linux-64>=2024.2
- sysroot_linux-64=2.28
- numba==0.59*
- scikit-build>=0.15*
- cmake>=3.26*
- ninja
- dpctl>=0.16*
- dpnp>=0.14*
- dpcpp-llvm-spirv
- opencl_rt
- intel-opencl-rt
- versioneer
- pip
- pip:
Expand Down
3 changes: 1 addition & 2 deletions environment/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: dev
channels:
- dppy/label/dev
- numba
- intel
- conda-forge
- nodefaults
dependencies:
Expand All @@ -11,7 +10,7 @@ dependencies:
- dpctl>=0.16*
- dpnp>=0.14*
- dpcpp-llvm-spirv
- opencl_rt
- intel-opencl-rt
- coverage
- pytest
- pytest-cov
Expand Down

0 comments on commit dc94b7e

Please sign in to comment.