Skip to content

update CHANGE.rst and README.md #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
90 changes: 57 additions & 33 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
=================
mkl_fft changelog
:code:`mkl_fft` changelog
=================

1.3.13 (03/25/2025)
===================

Supported python versions are 3.9, 3.10, 3.11, 3.12

migrate from :code:`setup.py` to :code:`pyproject.toml`

includes support in virtual environment out of the box

the original :code:`mkl_fft.rfft` and :code:`mkl_fft.irfft` are renamed to :code:`mkl_fft.rfftpack` and :code:`mkl_fft.irfftpack`,
since they replicate the behavior from the deprecated :code:`scipy.fftpack` module.

:code:`mkl_fft.rfft_numpy`, :code:`mkl_fft.irfft_numpy`, :code:`mkl_fft.rfft2_numpy`, :code:`mkl_fft.irfft2_numpy`,
:code:`mkl_fft.rfftn_numpy`, and :code:`mkl_fft.irfftn_numpy` are renamed to :code:`mkl_fft.rfft`, :code:`mkl_fft.irfft`,
:code:`mkl_fft.rfft2`, :code:`mkl_fft.irfft2`, `mkl_fft.rfftn`, and :code:`mkl_fft.irfftn`, respectively.
(consistent with :code:`numpy.fft` and :code:`scipy.fft` modules)

file :code:`_scipy_fft_backend.py` is renamed to :code:`_scipy_fft.py` since it replicates :code:`scipy.fft` module
(similar to file :code:`_numpy_fft.py` which replicates :code:`numpy.fft` module)

1.3.11
======

Expand All @@ -22,7 +42,7 @@ Updated code and build system to support NumPy 2.0
1.3.8
=====

Added vendored `conv_template.py` from NumPy's distutils submodule to enable building of `mkl_fft` with
Added vendored :code:`conv_template.py` from NumPy's distutils submodule to enable building of :code:`mkl_fft` with
NumPy >=1.25 and Python 3.12

1.3.7
Expand All @@ -37,7 +57,7 @@ Transitioned to Cython 3.0.
=====

Updated numpy interface to support new in NumPy 1.20 supported values of norm keyword, such as "forward" and "backward".
To enable this, `mkl_fft` functions now support `forward_scale` parameter that defaults to 1.
To enable this, :code:`mkl_fft` functions now support `forward_scale` parameter that defaults to 1.

Fixed issue #48.

Expand All @@ -49,52 +69,54 @@ Includes bug fix #54
1.2.0
=====

Due to removal of deprecated real-to-real FFT with `DFTI_CONJUGATE_EVEN_STORAGE=DFTI_COMPLEX_REAL` and `DFTI_PACKED_FORMAT=DFTI_PACK`
from Intel(R) Math Kernel Library, reimplemented `mkl_fft.rfft` and `mkl_fft.irfft` to use real-to-complex functionality with subsequent
copying to rearange the transform as expected of `mkl_fft.rfft`, with the associated performance penalty. The use of the real-to-complex
Due to removal of deprecated real-to-real FFT with :code:`DFTI_CONJUGATE_EVEN_STORAGE=DFTI_COMPLEX_REAL` and
:code:`DFTI_PACKED_FORMAT=DFTI_PACK` from Intel(R) Math Kernel Library, reimplemented :code:`mkl_fft.rfft` and
:code:`mkl_fft.irfft` to use real-to-complex functionality with subsequent copying to rearange the transform as expected
of :code:`mkl_fft.rfft`, with the associated performance penalty. The use of the real-to-complex
transform improves multi-core utilization which may offset the performance loss incurred due to copying.


1.1.0
=====

Added `scipy.fft` backend, see #42. Fixed #46.
Added :code:`scipy.fft` backend, see #42. Fixed #46.


.. code-block:: python

```
Python 3.7.5 (default, Nov 23 2019, 04:02:01)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.11.1 -- An enhanced Interactive Python. Type '?' for help.
Python 3.7.5 (default, Nov 23 2019, 04:02:01)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.11.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import numpy as np, mkl_fft, mkl_fft._scipy_fft_backend as mkl_be, scipy, scipy.fft, mkl
In [1]: import numpy as np, mkl_fft, mkl_fft._scipy_fft as mkl_be, scipy, scipy.fft, mkl

In [2]: mkl.verbose(1)
Out[2]: True
In [2]: mkl.verbose(1)
Out[2]: True

In [3]: x = np.random.randn(8*7).reshape((7, 8))
...: with scipy.fft.set_backend(mkl_be, only=True):
...: ff = scipy.fft.fft2(x, workers=4)
...: ff2 = scipy.fft.fft2(x)
MKL_VERBOSE Intel(R) MKL 2020.0 Product build 20191102 for Intel(R) 64 architecture Intel(R) Advanced Vector Extensions 2 (Intel(R) AVX2) enabled processors, Lnx 2.40GHz intel_thread
MKL_VERBOSE FFT(drfo7:8:8x8:1:1,bScale:0.0178571,tLim:1,desc:0x5629ad31b800) 24.85ms CNR:OFF Dyn:1 FastMM:1 TID:0 NThr:16,FFT:4
In [3]: x = np.random.randn(8*7).reshape((7, 8))
...: with scipy.fft.set_backend(mkl_be, only=True):
...: ff = scipy.fft.fft2(x, workers=4)
...: ff2 = scipy.fft.fft2(x)
MKL_VERBOSE Intel(R) MKL 2020.0 Product build 20191102 for Intel(R) 64 architecture Intel(R) Advanced Vector Extensions 2 (Intel(R) AVX2) enabled processors, Lnx 2.40GHz intel_thread
MKL_VERBOSE FFT(drfo7:8:8x8:1:1,bScale:0.0178571,tLim:1,desc:0x5629ad31b800) 24.85ms CNR:OFF Dyn:1 FastMM:1 TID:0 NThr:16,FFT:4

In [4]: np.allclose(ff, ff2)
Out[4]: True
```
In [4]: np.allclose(ff, ff2)
Out[4]: True


1.0.15
======

Changed tests to not compare against numpy fft, as this broke due to renaming of `np.fft.pocketfft` to
`np.fft._pocketfft`. Instead compare against naive realization of 1D FFT as a sum.
Changed tests to not compare against numpy fft, as this broke due to renaming of :code:`np.fft.pocketfft` to
:code:`np.fft._pocketfft`. Instead compare against naive realization of 1D FFT as a sum.

Setup script is now aware of `MKLROOT` environment variable. If unset, NumPy's mkl_info will be queried.
Setup script is now aware of :code:`MKLROOT` environment variable. If unset, NumPy's mkl_info will be queried.


1.0.14
======

Fixed unreferenced bug in `irfftn_numpy`, and adjusted NumPy interfaces to change to pocketfft in NumPy 1.17
Fixed unreferenced bug in :code:`irfftn_numpy`, and adjusted NumPy interfaces to change to pocketfft in NumPy 1.17


1.0.13
Expand All @@ -107,8 +129,8 @@ Issue #39 fixed (memory leak with complex FFT on real arrays)
======
Issue #37 fixed.

Inhibited vectorization of short loops computing pointer to memory referenced by a multi-iterator by Intel (R) C Compiler, improving
performance of ND `fft` and `ifft` on real input arrays.
Inhibited vectorization of short loops computing pointer to memory referenced by a multi-iterator by Intel (R) C Compiler,
improving performance of ND :code:`fft` and :code:`ifft` on real input arrays.


1.0.11
Expand Down Expand Up @@ -138,7 +160,7 @@ Fixed issues #21, and addressed NumPy 1.15 deprecation warnings from using lists
=====

Fixed issues #7, #17, #18.
Consolidated version specification into a single file `mkl_fft/_version.py`.
Consolidated version specification into a single file :code:`mkl_fft/_version.py`.

1.0.4
=====
Expand All @@ -152,13 +174,15 @@ This is a bug fix release.

It fixes issues #9, and #13.

As part of fixing issue #13, out-of-place 1D FFT calls such as `fft`, `ifft`, `rfft_numpy` and `irfftn_numpy` will allocate Fortran layout array for the output is the input is a Fotran array.
As part of fixing issue #13, out-of-place 1D FFT calls such as :code:`fft`, :code:`ifft`, :code:`rfft_numpy`
and :code:`irfftn_numpy` will allocate Fortran layout array for the output is the input is a Fotran array.


1.0.2
=====

Minor update of `mkl_fft`, reflecting renaming of `numpy.core.multiarray_tests` module to `numpy.core._multiarray_tests` as well as fixing #4.
Minor update of :code:`mkl_fft`, reflecting renaming of :code:`numpy.core.multiarray_tests` module to
:code:`numpy.core._multiarray_tests` as well as fixing #4.


1.0.1
Expand All @@ -169,4 +193,4 @@ Bug fix release.
1.0.0
=====

Initial release of `mkl_fft`.
Initial release of :code:`mkl_fft`.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## ``mkl_fft`` -- a NumPy-based Python interface to Intel (R) MKL FFT functionality
## `mkl_fft` -- a NumPy-based Python interface to Intel (R) MKL FFT functionality
[![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)
[![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)
Expand Down Expand Up @@ -47,9 +47,9 @@ More details can be found in SciPy 2017 conference proceedings:

---

It implements the following functions:
`mkl_fft` implements the following functions:

### Complex transforms, similar to those in `scipy.fftpack`:
### Complex transforms, similar to those in `scipy.fft`:

`fft(x, n=None, axis=-1, overwrite_x=False)`

Expand All @@ -65,22 +65,22 @@ It implements the following functions:

### Real transforms

`rfft(x, n=None, axis=-1, overwrite_x=False)` - real 1D Fourier transform, like `scipy.fftpack.rfft`
`rfftpack(x, n=None, axis=-1, overwrite_x=False)` - real 1D Fourier transform, like `scipy.fftpack.rfft`

`rfft_numpy(x, n=None, axis=-1)` - real 1D Fourier transform, like `numpy.fft.rfft`
`rfft(x, n=None, axis=-1)` - real 1D Fourier transform, like `numpy.fft.rfft`

`rfft2_numpy(x, s=None, axes=(-2,-1))` - real 2D Fourier transform, like `numpy.fft.rfft2`
`rfft2(x, s=None, axes=(-2,-1))` - real 2D Fourier transform, like `numpy.fft.rfft2`

`rfftn_numpy(x, s=None, axes=None)` - real ND Fourier transform, like `numpy.fft.rfftn`
`rfftn(x, s=None, axes=None)` - real ND Fourier transform, like `numpy.fft.rfftn`

... and similar `irfft*` functions.


The package also provides `mkl_fft._numpy_fft` and `mkl_fft._scipy_fft` interfaces which provide drop-in replacements for equivalent functions in NumPy and SciPy respectively.
The package also provides `mkl_fft.interfaces.numpy_fft` and `mkl_fft.interfaces.scipy_fft` interfaces which provide drop-in replacements for equivalent functions in NumPy and SciPy respectively.

---

To build ``mkl_fft`` from sources on Linux:
To build `mkl_fft` from sources on Linux:
- install a recent version of MKL, if necessary;
- execute ``source /path_to_oneapi/mkl/latest/env/vars.sh``;
- execute ``python -m pip install .``
- execute `source /path_to_oneapi/mkl/latest/env/vars.sh`;
- execute `python -m pip install .`
Loading