Skip to content

Commit 39ebb50

Browse files
authored
Merge branch 'master' into permit-build-python-3.13
2 parents adea993 + d18c2fc commit 39ebb50

21 files changed

+304
-236
lines changed

.github/workflows/build_pip.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
with:
3636
fetch-depth: 0
3737

38-
- uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
38+
- uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0
3939
with:
4040
use-mamba: true
4141
miniforge-version: latest

.github/workflows/conda-package-cf.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143
pytest -v --pyargs $MODULE_NAME
144144
145145
build_windows:
146-
runs-on: windows-2019
146+
runs-on: windows-latest
147147

148148
strategy:
149149
matrix:
@@ -158,7 +158,7 @@ jobs:
158158
with:
159159
fetch-depth: 0
160160

161-
- uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
161+
- uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0
162162
with:
163163
miniforge-version: latest
164164
activate-environment: build
@@ -181,6 +181,9 @@ jobs:
181181
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
182182
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
183183
184+
- name: Setup MSVC
185+
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
186+
184187
- name: Build conda package with NumPy 2.0
185188
run: |
186189
conda activate
@@ -209,7 +212,7 @@ jobs:
209212
python_ver: ['3.9', '3.10', '3.11', '3.12']
210213
numpy: ['numpy"<2"', 'numpy">=2"']
211214
experimental: [false]
212-
runner: [windows-2019]
215+
runner: [windows-latest]
213216
continue-on-error: ${{ matrix.experimental }}
214217
env:
215218
workdir: '${{ github.workspace }}'
@@ -221,7 +224,7 @@ jobs:
221224
with:
222225
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python_ver }}
223226

224-
- uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
227+
- uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0
225228
with:
226229
miniforge-version: latest
227230
activate-environment: ${{ env.TEST_ENV_NAME }}

.github/workflows/conda-package.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555

5656
- name: Build conda package
5757
run: |
58-
CHANNELS="-c conda-forge -c https://software.repos.intel.com/python/conda --override-channels"
58+
CHANNELS="-c https://software.repos.intel.com/python/conda -c conda-forge --override-channels"
5959
VERSIONS="--python ${{ matrix.python }}"
6060
TEST="--no-test"
6161
@@ -101,8 +101,17 @@ jobs:
101101
mkdir -p $GITHUB_WORKSPACE/channel/linux-64
102102
mv ${PACKAGE_NAME}-*.conda $GITHUB_WORKSPACE/channel/linux-64
103103
conda index $GITHUB_WORKSPACE/channel
104-
# Test channel
105-
conda search $PACKAGE_NAME -c $GITHUB_WORKSPACE/channel --override-channels
104+
105+
- name: Test conda channel
106+
run: |
107+
conda search $PACKAGE_NAME -c $GITHUB_WORKSPACE/channel --override-channels --info --json > $GITHUB_WORKSPACE/ver.json
108+
cat $GITHUB_WORKSPACE/ver.json
109+
110+
- name: Get package version
111+
run: |
112+
export PACKAGE_VERSION=$(python -c "${{ env.VER_SCRIPT1 }} ${{ env.VER_SCRIPT2 }}")
113+
echo PACKAGE_VERSION=${PACKAGE_VERSION}
114+
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
106115
107116
- name: Collect dependencies
108117
run: |
@@ -131,8 +140,7 @@ jobs:
131140
- name: Install mkl_fft
132141
run: |
133142
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
134-
conda create -n ${{ env.TEST_ENV_NAME }} python=${{ matrix.python }} "scipy>=1.10" $CHANNELS
135-
conda install -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME pytest $CHANNELS
143+
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${{ env.PACKAGE_VERSION }} python=${{ matrix.python }} pytest "scipy>=1.10" $CHANNELS
136144
# Test installed packages
137145
conda list -n ${{ env.TEST_ENV_NAME }}
138146
@@ -143,7 +151,7 @@ jobs:
143151
pytest -v --pyargs $MODULE_NAME
144152
145153
build_windows:
146-
runs-on: windows-2019
154+
runs-on: windows-latest
147155

148156
strategy:
149157
matrix:
@@ -158,7 +166,7 @@ jobs:
158166
with:
159167
fetch-depth: 0
160168

161-
- uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
169+
- uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0
162170
with:
163171
miniforge-version: latest
164172
activate-environment: build
@@ -183,6 +191,9 @@ jobs:
183191
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
184192
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
185193
194+
- name: Setup MSVC
195+
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
196+
186197
- name: Build conda package
187198
run: |
188199
conda activate
@@ -210,7 +221,7 @@ jobs:
210221
matrix:
211222
python: ['3.9', '3.10', '3.11', '3.12']
212223
experimental: [false]
213-
runner: [windows-2019]
224+
runner: [windows-latest]
214225
continue-on-error: ${{ matrix.experimental }}
215226
env:
216227
workdir: '${{ github.workspace }}'
@@ -222,7 +233,7 @@ jobs:
222233
with:
223234
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
224235

225-
- uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1
236+
- uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f # v3.2.0
226237
with:
227238
miniforge-version: latest
228239
activate-environment: ${{ env.TEST_ENV_NAME }}

.github/workflows/openssf-scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
persist-credentials: false
4040

4141
- name: "Run analysis"
42-
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
42+
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
4343
with:
4444
results_file: results.sarif
4545
results_format: sarif
@@ -69,6 +69,6 @@ jobs:
6969

7070
# Upload the results to GitHub's code scanning dashboard.
7171
- name: "Upload to code-scanning"
72-
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
72+
uses: github/codeql-action/upload-sarif@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
7373
with:
7474
sarif_file: results.sarif

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ __pycache__/
77

88
mkl_fft/_pydfti.c
99
mkl_fft/_pydfti.cpython*.so
10+
mkl_fft/_pydfti.*-win_amd64.pyd
1011
mkl_fft/src/mklfft.c

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ 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.1.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [dev] (MM/DD/YY)
7+
## [2.0.0] (05/DD/2025)
88

99
### Added
1010
* Added Hermitian FFT functions to SciPy interface `mkl_fft.interfaces.scipy_fft`: `hfft`, `ihfft`, `hfftn`, `ihfftn`, `hfft2`, and `ihfft2` [gh-161](https://github.com/IntelPython/mkl_fft/pull/161)
@@ -14,6 +14,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
### Changed
1515
* NumPy interface `mkl_fft.interfaces.numpy_fft` is aligned with numpy-2.x.x [gh-139](https://github.com/IntelPython/mkl_fft/pull/139), [gh-157](https://github.com/IntelPython/mkl_fft/pull/157)
1616
* To set `mkl_fft` as the backend for SciPy is only possible through `mkl_fft.interfaces.scipy_fft` [gh-179](https://github.com/IntelPython/mkl_fft/pull/179)
17+
* SciPy interface `mkl_fft.interfaces.scipy_fft` uses the same function from SciPy for handling `s` and `axes` for N-D FFTs [gh-181](https://github.com/IntelPython/mkl_fft/pull/181)
18+
19+
### Fixed
20+
* Fixed an issue for calling `mkl_fft.interfaces.numpy.fftn` with an empty axes [gh-139](https://github.com/IntelPython/mkl_fft/pull/139)
21+
* Fixed an issue for calling `mkl_fft.interfaces.numpy.fftn` with a zero-size array [gh-139](https://github.com/IntelPython/mkl_fft/pull/139)
22+
* Fixed inconsistency of input and output arrays dtype for `irfft` function [gh-180](https://github.com/IntelPython/mkl_fft/pull/180)
23+
* Fixed issues with `set_workers` function in SciPy interface `mkl_fft.interfaces.scipy_fft` [gh-183](https://github.com/IntelPython/mkl_fft/pull/183)
1724

1825
## [1.3.14] (04/10/2025)
1926

README.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,17 @@
44
[![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)
55
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/IntelPython/mkl_fft/badge)](https://securityscorecards.dev/viewer/?uri=github.com/IntelPython/mkl_fft)
66

7+
# Introduction
78
`mkl_fft` started as a part of Intel® Distribution for Python* optimizations to NumPy, and is now being released
8-
as a stand-alone package. It can be installed into conda environment from Intel's channel using:
9+
as a stand-alone package. It offers a thin layered interface for the Intel® oneAPI Math Kernel Library (OneMKL) FFT functionality that allows efficient access to native FFT optimizations from a range of NumPy and SciPy functions. As a result, its performance is close to the performance of native C/Intel® OneMKL. The optimizations are provided for real and complex data types in both single and double precisions for in-place and out-of-place modes of operation. For analyzing the performance use [FFT benchmarks](https://github.com/intelpython/fft_benchmark).
10+
11+
Thanks to Intel® OneMKL’s flexibility in its supports for arbitrarily strided input and output arrays both one-dimensional and multi-dimensional Fast Fourier Transforms along distinct axes can be performed directly, without the need to copy the input into a contiguous array first. Furthermore, input strides can be arbitrary, including negative or zero, as long as strides remain an integer multiple of array’s item size, otherwise a copy will be made.
12+
13+
More details can be found in ["Accelerating Scientific Python with Intel Optimizations"](https://proceedings.scipy.org/articles/shinma-7f4c6e7-00f) from Proceedings of the 16th Python in Science Conference (SciPy 2017).
14+
15+
---
16+
# Installation
17+
`mkl_fft` can be installed into conda environment from Intel's channel using:
918

1019
```
1120
conda install -c https://software.repos.intel.com/python/conda mkl_fft
@@ -34,22 +43,12 @@ If command above installs NumPy package from the PyPI, please use following comm
3443
Where `<numpy_version>` should be the latest version from https://software.repos.intel.com/python/conda/
3544

3645
---
46+
# How to use?
47+
## `mkl_fft.interfaces` module
48+
The recommended way to use `mkl_fft` package is through `mkl_fft.interfaces` module. These interfaces act as drop-in replacements for equivalent functions in NumPy and SciPy. Learn more about these interfaces [here](https://github.com/IntelPython/mkl_fft/blob/master/mkl_fft/interfaces/README.md).
3749

38-
Since MKL FFT supports performing discrete Fourier transforms over non-contiguously laid out arrays, OneMKL can be directly
39-
used on any well-behaved floating point array with no internal overlaps for both in-place and not in-place transforms of
40-
arrays in single and double floating point precision.
41-
42-
This eliminates the need to copy input array contiguously into an intermediate buffer.
43-
44-
`mkl_fft` directly supports N-dimensional Fourier transforms.
45-
46-
More details can be found in [SciPy 2017 conference proceedings](https://github.com/scipy-conference/scipy_proceedings/tree/2017/papers/oleksandr_pavlyk).
47-
48-
---
49-
50-
The `mkl_fft` package offers interfaces that act as drop-in replacements for equivalent functions in NumPy and SciPy. Learn more about these interfaces [here](https://github.com/IntelPython/mkl_fft/blob/master/mkl_fft/interfaces/README.md).
51-
52-
While using these interfaces is the easiest way to leverage `mk_fft`, one can also use `mkl_fft` directly with the following FFT functions:
50+
## `mkl_fft` package
51+
While using the interfaces module is the recommended way to leverage `mk_fft`, one can also use `mkl_fft` directly with the following FFT functions:
5352

5453
### complex-to-complex (c2c) transforms:
5554

@@ -84,6 +83,7 @@ numpy.allclose(mkl_res, np_res)
8483
```
8584

8685
---
86+
# Building from source
8787

8888
To build `mkl_fft` from sources on Linux with Intel® OneMKL:
8989
- create a virtual environment: `python3 -m venv fft_env`
@@ -93,6 +93,7 @@ To build `mkl_fft` from sources on Linux with Intel® OneMKL:
9393
- `git clone https://github.com/IntelPython/mkl_fft.git mkl_fft`
9494
- `cd mkl_fft`
9595
- `python -m pip install .`
96+
- `pip install scipy` (optional: for using `mkl_fft.interface.scipy_fft` module)
9697
- `cd ..`
9798
- `python -c "import mkl_fft"`
9899

@@ -103,5 +104,6 @@ To build `mkl_fft` from sources on Linux with conda follow these steps:
103104
- `git clone https://github.com/IntelPython/mkl_fft.git mkl_fft`
104105
- `cd mkl_fft`
105106
- `python -m pip install .`
107+
- `conda install scipy` (optional: for using `mkl_fft.interface.scipy_fft` module)
106108
- `cd ..`
107109
- `python -c "import mkl_fft"`

conda-recipe-cf/meta.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% set version = "1.3.14" %}
1+
{% set version = "2.0.0" %}
22
{% set buildnumber = 0 %}
33

44
package:
@@ -32,7 +32,7 @@ test:
3232
- pytest -v --pyargs mkl_fft
3333
requires:
3434
- pytest
35-
- scipy
35+
- scipy >=1.10
3636
imports:
3737
- mkl_fft
3838
- mkl_fft.interfaces

conda-recipe/meta.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% set version = "1.3.14" %}
1+
{% set version = "2.0.0" %}
22
{% set buildnumber = 0 %}
33

44
package:
@@ -20,6 +20,7 @@ requirements:
2020
- python
2121
- setuptools >=77
2222
- mkl-devel
23+
- mkl-devel 2024.2.* # [py==39 or py==310]
2324
- cython
2425
- numpy-base
2526
run:
@@ -32,7 +33,7 @@ test:
3233
- pytest -v --pyargs mkl_fft
3334
requires:
3435
- pytest
35-
- scipy
36+
- scipy >=1.10
3637
imports:
3738
- mkl_fft
3839
- mkl_fft.interfaces

0 commit comments

Comments
 (0)