Skip to content

Commit de2a895

Browse files
author
Diptorup Deb
authored
Merge pull request #979 from IntelPython/dpcpp_llvm_spirv_clean
Replaced llvm_spirv from oneAPI path by dpcpp-llvm-spirv package.
2 parents 9d3d507 + 98f0546 commit de2a895

File tree

12 files changed

+36
-51
lines changed

12 files changed

+36
-51
lines changed

.github/workflows/conda-package.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
run: |
122122
CHANNELS="-c $GITHUB_WORKSPACE/channel $CHANNELS"
123123
conda list
124-
conda create -n numba_dpex_env $PACKAGE_NAME pytest dpcpp_linux-64 python=${{ matrix.python }} numba=${{ matrix.numba }} dpctl dpnp=${{ matrix.dpnp }} $CHANNELS
124+
conda create -n numba_dpex_env $PACKAGE_NAME pytest dpcpp_linux-64 python=${{ matrix.python }} numba=${{ matrix.numba }} dpctl dpnp=${{ matrix.dpnp }} dpcpp-llvm-spirv $CHANNELS
125125
# Test installed packages
126126
conda list
127127
- name: Check DPNP
@@ -130,6 +130,12 @@ jobs:
130130
conda activate numba_dpex_env
131131
export OCL_ICD_FILENAMES=libintelocl.so
132132
python -c "import dpnp"
133+
- name: Check dpcpp-llvm-spirv
134+
run: |
135+
source $CONDA/etc/profile.d/conda.sh
136+
conda activate numba_dpex_env
137+
export OCL_ICD_FILENAMES=libintelocl.so
138+
python -c "import dpcpp_llvm_spirv as p; print(p.get_llvm_spirv_path())"
133139
- name: Run tests
134140
run: |
135141
source $CONDA/etc/profile.d/conda.sh
@@ -207,7 +213,7 @@ jobs:
207213
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
208214
- name: Install numba-dpex
209215
run: |
210-
conda install ${{ env.PACKAGE_NAME }} pytest dpcpp_win-64 python=${{ matrix.python }} dpctl ${{ matrix.dependencies }} -c $env:GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}
216+
conda install ${{ env.PACKAGE_NAME }} pytest dpcpp_win-64 dpcpp-llvm-spirv python=${{ matrix.python }} dpctl ${{ matrix.dependencies }} -c $env:GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}
211217
# Test installed packages
212218
conda list
213219
- name: Install opencl_rt
@@ -252,6 +258,8 @@ jobs:
252258
run: echo "NUMBA_DPEX_TESTING_SKIP_NO_DPNP=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
253259
- name: Smoke test
254260
run: python -c "import numba_dpex.core.runtime._dpexrt_python"
261+
- name: Smoke test for dpcpp-llvm-spirv
262+
run: python -c "import dpcpp_llvm_spirv as p; print(p.get_llvm_spirv_path())"
255263
- name: Run tests
256264
run: |
257265
python -m pytest -q -ra --disable-warnings --pyargs ${{ env.MODULE_NAME }} -vv

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [Unreleased] - 2023-03-28
8+
9+
### Added
10+
* Replaced llvm_spirv from oneAPI path by dpcpp-llvm-spirv package.
11+
712
## [0.20.0] - 2023-03-06
813

914
### Added

conda-recipe/meta.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,19 @@ requirements:
1616
- {{ compiler('dpcpp') }} # [not osx]
1717
host:
1818
- python
19-
- setuptools
19+
- setuptools >=63.*
2020
- cython
2121
- numba 0.56*
2222
- dpctl >=0.14*
2323
- dpnp >=0.11*
24+
- dpcpp-llvm-spirv
2425
- wheel
2526
run:
2627
- python
2728
- numba >=0.56*
2829
- dpctl >=0.14*
2930
- spirv-tools
30-
- llvm-spirv 11.*
31+
- dpcpp-llvm-spirv
3132
- dpnp >=0.11*
3233
- packaging
3334

conda-recipe/run_test.sh

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,6 @@ set -euxo pipefail
44

55
pytest -q -ra --disable-warnings --pyargs numba_dpex -vv
66

7-
if [[ -v ONEAPI_ROOT ]]; then
8-
set +u
9-
# shellcheck disable=SC1091
10-
source "${ONEAPI_ROOT}/compiler/latest/env/vars.sh"
11-
set -u
12-
13-
export NUMBA_DPEX_LLVM_SPIRV_ROOT="${ONEAPI_ROOT}/compiler/latest/linux/bin"
14-
echo "Using llvm-spirv from oneAPI"
15-
else
16-
echo "Using llvm-spirv from dpcpp package in conda testing environment"
17-
fi
18-
197
export NUMBA_DPEX_ACTIVATE_ATOMICS_FP_NATIVE=1
208

219
pytest -q -ra --disable-warnings -vv \

docs/user_guides/getting_started.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Numba-dpex depends on following components:
99
* numba 0.54.* or 0.55.* (`Numba`_)
1010
* dpctl 0.13.* (`Intel Python dpctl`_)
1111
* dpnp 0.10.1 (`Intel Python DPNP`_)
12-
* `llvm-spirv`_ (SPIRV generation from LLVM IR)
12+
* `dpcpp-llvm-spirv`_ (SPIRV generation from LLVM IR)
1313
* `llvmdev`_ (LLVM IR generation)
1414
* `spirv-tools`_
1515
* `packaging`_
@@ -60,7 +60,7 @@ installed in conda environment:
6060
.. code-block:: bash
6161
6262
export ONEAPI_ROOT=/opt/intel/oneapi
63-
conda create -n numba-dpex-env -c ${ONEAPI_ROOT}/conda_channel python=3.7 dpctl dpnp numba spirv-tools llvm-spirv llvmdev cython pytest
63+
conda create -n numba-dpex-env -c ${ONEAPI_ROOT}/conda_channel python=3.7 dpctl dpnp numba spirv-tools dpcpp-llvm-spirv llvmdev cython pytest
6464
conda activate numba-dpex-env
6565
6666
Activate DPC++ compiler:
@@ -149,7 +149,7 @@ Refer to :ref:`Docker <docker>` section for more options.
149149
.. _`Intel Python Numba`: https://github.com/IntelPython/numba
150150
.. _`Intel Python dpctl`: https://github.com/IntelPython/dpctl
151151
.. _`Intel Python dpnp`: https://github.com/IntelPython/dpnp
152-
.. _`llvm-spirv`: https://anaconda.org/intel/llvm-spirv
152+
.. _`dpcpp-llvm-spirv`: https://github.com/IntelPython/dpcpp-llvm-spirv
153153
.. _`llvmdev`: https://anaconda.org/intel/llvmdev
154154
.. _`spirv-tools`: https://anaconda.org/intel/spirv-tools
155155
.. _`packaging`: https://packaging.pypa.io/

docs/user_guides/kernel_programming_guide/atomic-operations.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ This feature is experimental. Users will need to provide
2828
the following environment variables to activate it.
2929

3030
NUMBA_DPEX_ACTIVATE_ATOMICS_FP_NATIVE=1
31-
NUMBA_DPEX_LLVM_SPIRV_ROOT=/path/to/dpcpp/provided/llvm_spirv
3231

3332
Example command:
3433

3534
.. code-block:: bash
3635
3736
NUMBA_DPEX_ACTIVATE_ATOMICS_FP_NATIVE=1 \
38-
NUMBA_DPEX_LLVM_SPIRV_ROOT=/path/to/dpcpp/provided/llvm_spirv \
3937
python program.py
4038
4139
Full examples

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ dependencies:
1616
- dpnp >=0.11*
1717
- mkl >=2021.3.0 # for dpnp
1818
- spirv-tools
19+
- dpcpp-llvm-spirv
1920
- packaging
2021
- pytest
2122
- pip

environment/coverage.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dependencies:
1515
- dpctl >=0.14*
1616
- dpnp >=0.10.2
1717
- spirv-tools
18+
- dpcpp-llvm-spirv
1819
- packaging
1920
- pytest
2021
- pip

environment/docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ dependencies:
1515
- dpctl 0.14*
1616
- dpnp >=0.10.2
1717
- spirv-tools
18+
- dpcpp-llvm-spirv
1819
- packaging
1920
- pytest
2021
- pip

numba_dpex/config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ def __getattr__(name):
5858
# Activate Native floating point atomcis support for supported devices.
5959
# Requires llvm-spirv supporting the FP atomics extension
6060
NATIVE_FP_ATOMICS = _readenv("NUMBA_DPEX_ACTIVATE_ATOMICS_FP_NATIVE", int, 0)
61-
LLVM_SPIRV_ROOT = _readenv("NUMBA_DPEX_LLVM_SPIRV_ROOT", str, "")
6261
# Emit debug info
6362
DEBUG = _readenv("NUMBA_DPEX_DEBUG", int, config.DEBUG)
6463
DEBUGINFO_DEFAULT = _readenv(

0 commit comments

Comments
 (0)