Skip to content

Commit ae011ec

Browse files
committed
build: enable intel in pyproject and use in intel GA
1 parent 9eb08d1 commit ae011ec

3 files changed

Lines changed: 810 additions & 221 deletions

File tree

.github/workflows/build-mkl1.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: PyLops Testing with Intel oneAPI Math Kernel Library(oneMKL)
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches:
8+
- main
9+
- dev
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
platform: [ubuntu-latest]
16+
python-version: ["3.11", "3.12", "3.13"]
17+
18+
runs-on: ${{ matrix.platform }}
19+
20+
steps:
21+
- name: Check out source repository
22+
uses: actions/checkout@v6
23+
with:
24+
fetch-depth: 0
25+
- name: Install uv with Python ${{ matrix.python-version }}
26+
uses: astral-sh/setup-uv@v6
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
- name: Install dependencies and pylops
30+
run: uv sync --locked --extra intel --extra advanced --extra stat --extra deep --all-groups
31+
- name: Test with pytest
32+
run: uv run pytest --color=yes pytests/

pyproject.toml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ classifiers = [
3131
]
3232
requires-python = ">=3.10"
3333
dependencies = [
34-
"numpy >= 1.21.0",
35-
"scipy >= 1.11.0",
34+
"numpy >= 1.21.0; extra != 'intel'",
35+
"scipy >= 1.11.0; extra != 'intel'",
3636
]
3737
dynamic = ["version"]
3838

@@ -55,6 +55,11 @@ deep = ["torch", "jax"]
5555
deep-cu126 = ["torch<2.11.0", "jax[cuda12]"]
5656
deep-cu128 = ["torch<2.11.0", "jax[cuda12]"]
5757
deep-cu13 = ["torch>=2.11.0", "jax[cuda13]"]
58+
intel = [
59+
"numpy>=2.0.0; sys_platform != 'darwin'",
60+
"scipy>=1.13.0; sys_platform != 'darwin'",
61+
"mkl_fft; sys_platform != 'darwin'",
62+
]
5863

5964
[dependency-groups]
6065
dev = [
@@ -111,6 +116,9 @@ torch = [
111116
{ index = "pytorch-cu126", extra = "deep-cu126" },
112117
{ index = "pytorch-cu128", extra = "deep-cu128" },
113118
]
119+
numpy = [{ index = "intel", extra = "intel" }]
120+
scipy = [{ index = "intel", extra = "intel" }]
121+
mkl_fft = [{ index = "intel", extra = "intel" }]
114122

115123
[[tool.uv.index]]
116124
name = "pytorch-cpu"
@@ -127,6 +135,11 @@ name = "pytorch-cu128"
127135
url = "https://download.pytorch.org/whl/cu128"
128136
explicit = true
129137

138+
[[tool.uv.index]]
139+
name = "intel"
140+
url = "https://software.repos.intel.com/python/pypi"
141+
explicit = true
142+
130143
[tool.pytest.ini_options]
131144
addopts = "--verbose"
132145
python_files = ["pytests/*.py"]

0 commit comments

Comments
 (0)