|
1 | 1 | [](https://github.com/IntelPython/mkl_fft/actions/workflows/conda-package.yml) |
2 | | -[](https://github.com/IntelPython/mkl_fft/actions/workflows/build_pip.yaml) |
| 2 | +[](https://github.com/IntelPython/mkl_fft/actions/workflows/build_pip.yml) |
3 | 3 | [](https://github.com/IntelPython/mkl_fft/actions/workflows/conda-package-cf.yml) |
4 | 4 | [](https://securityscorecards.dev/viewer/?uri=github.com/IntelPython/mkl_fft) |
5 | 5 |
|
@@ -139,25 +139,28 @@ with mkl_fft.mkl_fft(): |
139 | 139 | --- |
140 | 140 | # Building from source |
141 | 141 |
|
142 | | -To build `mkl_fft` from sources on Linux with Intel® oneMKL: |
143 | | - - create a virtual environment: `python3 -m venv fft_env` |
144 | | - - activate the environment: `source fft_env/bin/activate` |
145 | | - - install a recent version of oneMKL, if necessary |
146 | | - - execute `source /path_to_oneapi/mkl/latest/env/vars.sh` |
147 | | - - `git clone https://github.com/IntelPython/mkl_fft.git mkl_fft` |
148 | | - - `cd mkl_fft` |
149 | | - - `python -m pip install .` |
150 | | - - `pip install scipy` (optional: for using `mkl_fft.interface.scipy_fft` module) |
151 | | - - `cd ..` |
152 | | - - `python -c "import mkl_fft"` |
153 | | - |
154 | | -To build `mkl_fft` from sources on Linux with conda follow these steps: |
155 | | - - `conda create -n fft_env python=3.12 mkl-devel` |
156 | | - - `conda activate fft_env` |
157 | | - - `export MKLROOT=$CONDA_PREFIX` |
158 | | - - `git clone https://github.com/IntelPython/mkl_fft.git mkl_fft` |
159 | | - - `cd mkl_fft` |
160 | | - - `python -m pip install .` |
161 | | - - `conda install scipy` (optional: for using `mkl_fft.interface.scipy_fft` module) |
162 | | - - `cd ..` |
163 | | - - `python -c "import mkl_fft"` |
| 142 | +A C compiler, Intel® oneAPI Math Kernel Library (oneMKL), and NumPy are required |
| 143 | +to build `mkl_fft` from source. |
| 144 | + |
| 145 | +Executing |
| 146 | +```sh |
| 147 | +python -m pip install . |
| 148 | +``` |
| 149 | +will pull in the required build dependencies, including `mkl` and `numpy`, and build `mkl_fft`. |
| 150 | + |
| 151 | +If you already have `mkl` and `numpy` installed (from your system or a conda environment) |
| 152 | +and want to reuse them instead of pulling fresh copies into an isolated build, first |
| 153 | +install the build dependencies: |
| 154 | +```sh |
| 155 | +pip install meson-python cmake ninja cython numpy mkl-devel |
| 156 | +``` |
| 157 | + |
| 158 | +then build against the existing installation with: |
| 159 | +```sh |
| 160 | +python -m pip install --no-build-isolation --no-deps . |
| 161 | +``` |
| 162 | + |
| 163 | +Optionally, install `scipy` to use the `mkl_fft.interfaces.scipy_fft` module: |
| 164 | +```sh |
| 165 | +pip install scipy |
| 166 | +``` |
0 commit comments