Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6f89ebf
move build system to meson
ndgrigorian Apr 8, 2026
4f4e9aa
use meson-python in meta.yaml files
ndgrigorian Apr 8, 2026
cc718bf
add cmake to build system dependencies
ndgrigorian Apr 8, 2026
d6874f5
don't set MKLROOT
ndgrigorian Apr 8, 2026
1e84694
update clang and pip builds
ndgrigorian Apr 8, 2026
b1633ee
remove MKLROOT from build_pip
ndgrigorian Apr 8, 2026
9687eaf
add standard clang build workflow
ndgrigorian Apr 8, 2026
8ae541d
make ninja explicit in pyproject.toml and meta.yamls
ndgrigorian Apr 8, 2026
46b79fc
use pip install in conda-forge build scripts
ndgrigorian Apr 8, 2026
a6c4743
remove jq from pip build
ndgrigorian Apr 8, 2026
4e1bba0
build_pip.yaml -> build_pip.yml
ndgrigorian Apr 9, 2026
e507cde
add comment justifying get_compiler call in meson build
ndgrigorian Apr 9, 2026
29980c5
remove redundant mkl pip installation in standard clang build
ndgrigorian Apr 10, 2026
54f7a39
install mkl-service with --no-deps in clang build
ndgrigorian Apr 10, 2026
0c79c9a
add openmp as explicit conda package requirement
ndgrigorian Apr 10, 2026
6dab296
add mkl_threading option
ndgrigorian May 16, 2026
25f188e
use gnu_thread on Linux conda-forge builds
ndgrigorian May 16, 2026
3c9b222
Merge branch 'master' into use-meson-build
ndgrigorian May 28, 2026
de2e7b0
Merge remote-tracking branch 'origin/master' into use-meson-build
vlad-perevezentsev Jul 21, 2026
2c29dd5
Add missing python source file to meson.build
vlad-perevezentsev Jul 21, 2026
920ac14
Merge remote-tracking branch 'origin/master' into use-meson-build
vlad-perevezentsev Jul 21, 2026
20b0b43
improve meson.build portability
vlad-perevezentsev Jul 21, 2026
8b493ef
Set RPATH via link_args
vlad-perevezentsev Jul 21, 2026
9eb6790
Remove redundant meson dependency
vlad-perevezentsev Jul 21, 2026
72d0304
Exclude AGENTS.md from tests installation
vlad-perevezentsev Jul 21, 2026
7f22b97
Correct numpy version specifier
vlad-perevezentsev Jul 21, 2026
955490a
Update copilot-instructions
vlad-perevezentsev Jul 21, 2026
9cbd93b
Uppdate AGENTS.md files
vlad-perevezentsev Jul 21, 2026
67991c8
Update README
vlad-perevezentsev Jul 21, 2026
291c9fb
Add error propagation and build dir cleanup
vlad-perevezentsev Jul 21, 2026
7558842
Fix typos
vlad-perevezentsev Jul 21, 2026
f2fba7a
Remove redundant meson dependency in conda-recipe-cf
vlad-perevezentsev Jul 21, 2026
54edcb2
test: align conda-recipe build scripts with mkl-service using python …
vlad-perevezentsev Jul 22, 2026
b9964a7
Remove unused env variables from build_pip.yml
vlad-perevezentsev Jul 23, 2026
16755bc
Add wheels upload to conda-package workflow
vlad-perevezentsev Jul 23, 2026
14d7181
Add numpy to ignore_run_exports
vlad-perevezentsev Jul 23, 2026
f6d7e2a
Remove redundant LDFLAGS from build.sh
vlad-perevezentsev Jul 23, 2026
be607c4
Remove macOS RPATH support
vlad-perevezentsev Jul 23, 2026
d11fbe4
Check llvm-openmp linkage
vlad-perevezentsev Jul 23, 2026
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
4 changes: 3 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ per-file-ignores =
mkl_fft/interfaces/scipy_fft.py: F401
mkl_fft/interfaces/numpy_fft.py: F401

exclude = _vendored/conv_template.py
exclude =
_vendored/conv_template.py
_vendored/process_src_template.py

filename = *.py, *.pyx, *.pxi, *.pxd
max_line_length = 80
Expand Down
3 changes: 2 additions & 1 deletion .github/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ CI/CD workflows and repo automation.
- `conda-package.yml` — Intel channel conda build/test pipeline
- `conda-package-cf.yml` — conda-forge-oriented build/test pipeline
- `build-with-clang.yml` — clang compatibility checks
- `build_pip.yaml` — wheel build pipeline
- `build_pip.yml` — editable pip build pipeline
- `build-with-standard-clang.yml` — standard clang compatibility checks
- `pre-commit.yml` — lint/format checks
- `openssf-scorecard.yml` — security scanning

Expand Down
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Higher-precedence file overrides lower-precedence context.
- `pytest mkl_fft/tests`

## Source-of-truth files
- Build/config: `pyproject.toml`, `setup.py`
- Build/config: `pyproject.toml`, `meson.build`
- Dependencies: `pyproject.toml`, `conda-recipe/meta.yaml`, `conda-recipe-cf/meta.yaml`
- CI: `.github/workflows/*.{yml,yaml}`
- API: `mkl_fft/__init__.py`, `mkl_fft/interfaces/*.py`, `mkl_fft/_pydfti.pyx` (interface wrappers are integration/patch entry points)
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-with-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
numpy_version: ["numpy'>=2'"]
numpy_version: ["'numpy>=2'"]

env:
ONEAPI_ROOT: /opt/intel/oneapi
Expand All @@ -37,10 +37,9 @@ jobs:
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get update

- name: Install Intel OneAPI
- name: Install Intel oneAPI
run: |
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp
sudo apt-get install intel-oneapi-tbb
sudo apt-get install intel-oneapi-mkl-devel

- name: Setup Python
Expand All @@ -56,7 +55,7 @@ jobs:

- name: Install mkl_fft dependencies
run: |
pip install cython setuptools">=77"
pip install meson-python ninja cython cmake
pip install ${{ matrix.numpy_version }}
Comment thread
ndgrigorian marked this conversation as resolved.

- name: List oneAPI folder content
Expand All @@ -73,5 +72,6 @@ jobs:
- name: Run mkl_fft tests
run: |
source ${{ env.ONEAPI_ROOT }}/setvars.sh
pip install scipy mkl-service pytest
pip install scipy pytest
pip install mkl-service --no-deps
pytest -s -v --pyargs mkl_fft
64 changes: 64 additions & 0 deletions .github/workflows/build-with-standard-clang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build project with standard clang compiler

on:
pull_request:
push:
branches: [master]

permissions: read-all

jobs:
build-with-standard-clang:
runs-on: ubuntu-latest

strategy:
matrix:
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
numpy_version: ["'numpy>=2'"]

env:
COMPILER_ROOT: /usr/bin

defaults:
run:
shell: bash -el {0}

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@3155a141048f8f89c06b4cdae32e7853e97536bc # 0.13.0
with:
access_token: ${{ github.token }}

- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang

- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python }}
architecture: x64

- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Install mkl_fft dependencies
run: |
pip install meson-python ninja cmake cython mkl-devel
pip install ${{ matrix.numpy_version }}

- name: Build mkl_fft
run: |
export CC=${{ env.COMPILER_ROOT }}/clang
pip install . --no-build-isolation --no-deps --verbose

- name: Run mkl_fft tests
run: |
pip install pytest mkl-service scipy
# mkl_fft cannot be installed in editable mode, we need
# to change directory before importing it and running tests
cd ..
python -m pytest -sv --pyargs mkl_fft
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ on:

permissions: read-all

env:
PACKAGE_NAME: mkl_fft
MODULE_NAME: mkl_fft
TEST_ENV_NAME: test_mkl_fft

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -26,11 +21,6 @@ jobs:
use_pre: ["", "--pre"]

steps:
- name: Install jq
shell: bash -l {0}
run: |
sudo apt-get install jq

- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
Expand All @@ -48,10 +38,8 @@ jobs:

- name: Build conda package
run: |
pip install --no-cache-dir cython setuptools
pip install --no-cache-dir meson-python ninja cmake cython
pip install --no-cache-dir numpy ${{ matrix.use_pre }}
echo "CONDA_PREFFIX is '${CONDA_PREFIX}'"
export MKLROOT=${CONDA_PREFIX}
pip install -e ".[test]" --no-build-isolation --verbose
pip list
python -m pytest -v mkl_fft/tests
27 changes: 27 additions & 0 deletions .github/workflows/conda-package-cf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,19 @@ jobs:
"${CHANNELS[@]}" \
conda-recipe-cf

- name: Check llvm-openmp linkage
run: |
# Install built package into a fresh env to inspect linkage
conda index /usr/share/miniconda/conda-bld
conda create -n check_linkage \
-c /usr/share/miniconda/conda-bld -c conda-forge --override-channels \
"$PACKAGE_NAME" python=${{ matrix.python }} -y
ENV=/usr/share/miniconda/envs/check_linkage
echo "--- llvm-openmp symlinks ---"
ls -la "$ENV/lib/libgomp"* "$ENV/lib/libiomp5"* "$ENV/lib/libomp.so" || true
echo "--- _pydfti omp linkage ---"
ldd "$ENV/lib/python${{ matrix.python }}/site-packages/mkl_fft/_pydfti"*.so | grep omp

- name: Upload artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
Expand Down Expand Up @@ -210,6 +223,20 @@ jobs:
run: |
conda build --no-test --python ${{ matrix.python }} --numpy ${{ matrix.numpy }} -c conda-forge --override-channels conda-recipe-cf

- name: Check llvm-openmp linkage
shell: bash -l {0}
run: |
CONDA_BLD="$CONDA/conda-bld"
conda index "$CONDA_BLD"
conda create -n check_linkage \
-c "$CONDA_BLD" -c conda-forge --override-channels \
"$PACKAGE_NAME" python=${{ matrix.python }} numpy -y
ENV="$CONDA/envs/check_linkage"
echo "--- llvm-openmp DLLs ---"
ls -la "$ENV/Library/bin/libiomp5md.dll" "$ENV/Library/bin/libomp.dll" || true
echo "--- import check ---"
cd "$TEMP" && "$ENV/python" -c "import mkl_fft; print('import OK')"

- name: Store conda paths as envs
shell: bash -l {0}
run: |
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ jobs:
- name: Add conda to system path
run: echo "$CONDA"/bin >> "$GITHUB_PATH"

- name: Store conda paths as envs
run: |
echo "CONDA_BLD=/usr/share/miniconda/conda-bld/linux-64/" >> "$GITHUB_ENV"
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE/" >> "$GITHUB_ENV"

- name: Update conda
run: |
conda update -n base --all
Expand Down Expand Up @@ -92,7 +97,13 @@ jobs:
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
path: /usr/share/miniconda/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.conda
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda

- name: Upload wheels artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
path: ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.PACKAGE_NAME }}-*.whl

test_linux:
needs: build_linux
Expand Down Expand Up @@ -239,6 +250,7 @@ jobs:
shell: bash -l {0}
run: |
echo "CONDA_BLD=$CONDA/conda-bld/win-64/" | tr "\\\\" '/' >> "$GITHUB_ENV"
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE\\" >> "$GITHUB_ENV"

- name: Show Conda info
run: |
Expand All @@ -258,6 +270,12 @@ jobs:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda

- name: Upload wheels artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
path: ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.PACKAGE_NAME }}-*.whl

test_windows:
needs: build_windows
runs-on: ${{ matrix.runner }}
Expand Down
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ It provides accelerated FFT transforms while aiming to preserve upstream API beh
- **Packaging:** `conda-recipe/`, `conda-recipe-cf/`

## Build/runtime basics
- Build system: `pyproject.toml` + `setup.py`
- Build deps: `cython`, `numpy`, `mkl-devel`
- Build system: `pyproject.toml` + `meson.build`
- Build deps: `cython`, `numpy`, `mkl-devel`, `meson-python`, `cmake`, `ninja`
- Runtime deps: `numpy`, `mkl-service`

## Development guardrails
Expand All @@ -28,7 +28,7 @@ It provides accelerated FFT transforms while aiming to preserve upstream API beh
- Avoid hardcoding mutable versions/matrices/channels in docs.

## Where truth lives
- Build/config: `pyproject.toml`, `setup.py`
- Build/config: `pyproject.toml`, `meson.build`
- Dependencies: `pyproject.toml`, `conda-recipe*/meta.yaml`
- CI/workflows: `.github/workflows/*.{yml,yaml}`
- Public API: `mkl_fft/__init__.py`, `mkl_fft/interfaces/` (including wrapper/patch adapter modules)
Expand Down
49 changes: 26 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Conda package](https://github.com/IntelPython/mkl_fft/actions/workflows/conda-package.yml/badge.svg)](https://github.com/IntelPython/mkl_fft/actions/workflows/conda-package.yml)
[![Editable build using pip and pre-release NumPy](https://github.com/IntelPython/mkl_fft/actions/workflows/build_pip.yaml/badge.svg)](https://github.com/IntelPython/mkl_fft/actions/workflows/build_pip.yaml)
[![Editable build using pip and pre-release NumPy](https://github.com/IntelPython/mkl_fft/actions/workflows/build_pip.yml/badge.svg)](https://github.com/IntelPython/mkl_fft/actions/workflows/build_pip.yml)
[![Conda package with conda-forge channel only](https://github.com/IntelPython/mkl_fft/actions/workflows/conda-package-cf.yml/badge.svg)](https://github.com/IntelPython/mkl_fft/actions/workflows/conda-package-cf.yml)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/IntelPython/mkl_fft/badge)](https://securityscorecards.dev/viewer/?uri=github.com/IntelPython/mkl_fft)

Expand Down Expand Up @@ -139,25 +139,28 @@ with mkl_fft.mkl_fft():
---
# Building from source

To build `mkl_fft` from sources on Linux with Intel® oneMKL:
- create a virtual environment: `python3 -m venv fft_env`
- activate the environment: `source fft_env/bin/activate`
- install a recent version of oneMKL, if necessary
- execute `source /path_to_oneapi/mkl/latest/env/vars.sh`
- `git clone https://github.com/IntelPython/mkl_fft.git mkl_fft`
- `cd mkl_fft`
- `python -m pip install .`
- `pip install scipy` (optional: for using `mkl_fft.interface.scipy_fft` module)
- `cd ..`
- `python -c "import mkl_fft"`

To build `mkl_fft` from sources on Linux with conda follow these steps:
- `conda create -n fft_env python=3.12 mkl-devel`
- `conda activate fft_env`
- `export MKLROOT=$CONDA_PREFIX`
- `git clone https://github.com/IntelPython/mkl_fft.git mkl_fft`
- `cd mkl_fft`
- `python -m pip install .`
- `conda install scipy` (optional: for using `mkl_fft.interface.scipy_fft` module)
- `cd ..`
- `python -c "import mkl_fft"`
A C compiler, Intel® oneAPI Math Kernel Library (oneMKL), and NumPy are required
to build `mkl_fft` from source.

Executing
```sh
python -m pip install .
```
will pull in the required build dependencies, including `mkl` and `numpy`, and build `mkl_fft`.

If you already have `mkl` and `numpy` installed (from your system or a conda environment)
and want to reuse them instead of pulling fresh copies into an isolated build, first
install the build dependencies:
```sh
pip install meson-python cmake ninja cython numpy mkl-devel
```

then build against the existing installation with:
```sh
python -m pip install --no-build-isolation --no-deps .
```

Optionally, install `scipy` to use the `mkl_fft.interfaces.scipy_fft` module:
```sh
pip install scipy
```
4 changes: 1 addition & 3 deletions _vendored/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
## Vendored files

File `conv_template.py` is copied from NumPy's numpy/distutils folder, since
`numpy.distutils` is absent from the installation layout starting with
Python 3.12
Files `conv_template.py` and `process_src_template.py` are copied from NumPy's numpy/numpy/_build_utils folder
Loading
Loading