Skip to content

Commit 395c896

Browse files
authored
Install dpctl via pip manager in coverage and docs workflows (#2383)
This PR resolves issue with `coverage` and `docs` GitHub workflows observing since 2025.1 release is published. The reason of the proposed changes is that it isn't possible to install dpctl there as a conda package when the environment is created through installing of Intel OneAPI packages because the dpctl conda package has a runtime dependency on DPC++ RT one. Whereas the DPC++ RT package has been already installed by the apt command above and its version has been matched with the DPC++ compiler. In case where we install the DPC++ compiler with the apt (including DPC++ RT) and install the DPC++ RT conda package while resolving dependencies, this can lead to a versioning error, i.e. compatibility issue as the DPC++ compiler only guarantees backwards compatibility, not forward compatibility (DPC++ RT may not run a binary built with a newer version of the DPC++ compiler). Installing dpctl via the pip manager has no such limitation, as the package has no run dependency on the DPC++ RT pip package, so this is why the new step is proposed to be added to the workflows.
1 parent c2a7536 commit 395c896

File tree

5 files changed

+43
-7
lines changed

5 files changed

+43
-7
lines changed

.github/workflows/build-sphinx.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,26 @@ jobs:
135135
environment-file: ${{ env.environment-file }}
136136
activate-environment: 'docs'
137137

138-
- name: Conda info
139-
run: mamba info
138+
# We can't install dpctl as a conda package when the environment is created through
139+
# installing of Intel OneAPI packages because the dpctl conda package has a runtime
140+
# dependency on DPC++ RT one. Whereas the DPC++ RT package has been already installed
141+
# by the apt command above and its version has been matched with the DPC++ compiler.
142+
# In case where we install the DPC++ compiler with the apt (including DPC++ RT) and
143+
# install the DPC++ RT conda package while resolving dependencies, this can lead
144+
# to a versioning error, i.e. compatibility issue as the DPC++ compiler only guarantees
145+
# backwards compatibility, not forward compatibility (DPC++ RT may not run a binary built
146+
# with a newer version of the DPC++ compiler).
147+
# Installing dpctl via the pip manager has no such limitation, as the package has no
148+
# run dependency on the DPC++ RT pip package, so this is why the step is necessary here.
149+
- name: Install dpctl
150+
if: env.oneapi-pkgs-env == ''
151+
run: |
152+
pip install -i https://pypi.anaconda.org/dppy/label/dev/simple dpctl==0.20.0dev0
140153
141-
- name: Conda list
142-
run: mamba list
154+
- name: Conda info
155+
run: |
156+
mamba info
157+
mamba list
143158
144159
- name: Build library
145160
run: |

.github/workflows/check-mkl-interfaces.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ env:
1313
environment-file-name: 'environment.yml'
1414
environment-file-loc: '${{ github.workspace }}/environments'
1515
build-with-oneapi-env: 'environments/build_with_oneapi.yml'
16+
dpctl-pkg-env: 'environments/dpctl_pkg.yml'
1617
oneapi-pkgs-env: 'environments/oneapi_pkgs.yml'
1718
test-env-name: 'test_onemkl_interfaces'
1819
rerun-tests-on-failure: 'true'
@@ -47,7 +48,8 @@ jobs:
4748

4849
- name: Merge conda env files
4950
run: |
50-
conda-merge ${{ env.build-with-oneapi-env }} ${{ env.oneapi-pkgs-env }} > ${{ env.environment-file }}
51+
conda-merge ${{ env.build-with-oneapi-env }} ${{ env.dpctl-pkg-env }} ${{ env.oneapi-pkgs-env }} > ${{ env.environment-file }}
52+
cat ${{ env.environment-file }}
5153
5254
- name: Upload artifact
5355
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

.github/workflows/generate_coverage.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,22 @@ jobs:
9494
environment-file: ${{ env.environment-file }}
9595
activate-environment: 'coverage'
9696

97+
# We can't install dpctl as a conda package when the environment is created through
98+
# installing of Intel OneAPI packages because the dpctl conda package has a runtime
99+
# dependency on DPC++ RT one. Whereas the DPC++ RT package has beedn already installed
100+
# by the apt command above and its version has been matched with the DPC++ compiler.
101+
# In case where we install the DPC++ compiler with the apt (including DPC++ RT) and
102+
# install the DPC++ RT conda package while resolving dependencies, this can lead
103+
# to a versioning error, i.e. compatibility issue as the DPC++ compiler only guarantees
104+
# backwards compatibility, not forward compatibility (DPC++ RT may not run a binary built
105+
# with a newer version of the DPC++ compiler).
106+
# Installing dpctl via the pip manager has no such limitation, as the package has no
107+
# run dependency on the DPC++ RT pip package, so this is why the step is necessary here.
108+
- name: Install dpctl
109+
if: env.oneapi-pkgs-env == ''
110+
run: |
111+
pip install -i https://pypi.anaconda.org/dppy/label/dev/simple dpctl==0.20.0dev0
112+
97113
- name: Conda info
98114
run: |
99115
mamba info

environments/build_with_oneapi.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
name: Packages to build DPNP with OneAPI env activated
22
channels:
3-
- dppy/label/dev
43
- conda-forge
54
dependencies:
65
- cmake
76
- cython
8-
- dpctl>=0.19.0dev0
97
- ninja
108
- numpy
119
- pytest

environments/dpctl_pkg.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: Install dpctl package
2+
channels:
3+
- dppy/label/dev
4+
dependencies:
5+
- dpctl>=0.20.0dev0

0 commit comments

Comments
 (0)