Skip to content

Commit abed5b1

Browse files
committed
2 parents e9f4cfb + 5aa1ba4 commit abed5b1

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

docs/python.rst

+10-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,19 @@ The easiest way to install is to run::
99
pip install finufft
1010

1111
which downloads and installs the latest precompiled binaries from PyPI.
12+
If you would like to compile from source, you can tell ``pip`` to compile the library from source with the option ``--no-binary`` using the command::
13+
14+
pip install --no-binary finufft finufft
15+
16+
By default, this will use the ``-march=native`` flag when compiling the library, which should result in improved performance.
17+
Note that ``finufft`` has to be specified twice (first as an argument to ``--no-binary`` and second as the package the is to be installed). This option also allows you to switch out the default FFT library (FFTW) for DUCC0 using::
18+
19+
pip install --no-binary finufft finufft --config-settings=cmake.define.FINUFFT_USE_DUCC0=ON finufft
20+
1221
If you have ``pytest`` installed, you can test it with::
1322

1423
pytest python/finufft/test
15-
24+
1625
or, without having ``pytest`` you can run the older-style eyeball check::
1726

1827
python3 python/finufft/test/run_accuracy_tests.py

src/cuda/memtransfer_wrapper.cu

+2-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,8 @@ void freegpumemory(cufinufft_plan_t<T> *d_plan)
423423
*/
424424
{
425425
utils::WithCudaDevice device_swapper(d_plan->opts.gpu_device_id);
426-
auto &stream = d_plan->stream;
426+
// Fixes a crash whewre the plan itself is deleted before the stream
427+
const auto stream = d_plan->stream;
427428

428429
CUDA_FREE_AND_NULL(d_plan->fw, stream, d_plan->supports_pools);
429430
CUDA_FREE_AND_NULL(d_plan->fwkerhalf1, stream, d_plan->supports_pools);

0 commit comments

Comments
 (0)