Skip to content

Commit

Permalink
Clarify dependency version requirements, check for older cufinufft an…
Browse files Browse the repository at this point in the history
…d give a warning
  • Loading branch information
WardBrian committed Oct 18, 2023
1 parent 2f23868 commit 5747f8a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
python -m pip install .
- name: Build docs
env:
SPHINXOPTS: "-v"
run: |
cd docs/
make clean
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
Bindings for the Flatiron Institute Nonuniform Fast Fourier Transform ([FINUFFT](https://finufft.readthedocs.io/en/latest/)) library
in Pytorch.

See the documentation [online](https://flatironinstitute.github.io/pytorch-finufft/).

**Note: this package is currently under active development**
6 changes: 4 additions & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ Pre-requistes
-------------

Pytorch-FINUFFT requires either ``finufft`` *and/or* ``cufinufft``
2.2.0 or greater. Currently, this version is unreleased
and can only be installed from source. See the relevant pages for
2.1.0 or greater.

Note that currently, this version of ``cufinufft`` is unreleased
and can only be installed from source. See the relevant installation pages for
:external+finufft:doc:`finufft <install>` and
:external+finufft:doc:`cufinufft <install_gpu>`.

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ authors = [
{name = "Brian Ward", email="[email protected]"},
]
license = { text = "MIT" }
dependencies = ["finufft", "torch >= 2", "numpy", "scipy"]
dependencies = ["finufft>= 2.1", "torch >= 2", "numpy", "scipy"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
Expand Down
6 changes: 5 additions & 1 deletion pytorch_finufft/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Implementations of the corresponding Autograd functions
"""

import warnings
from typing import Any, Callable, Dict, Optional, Tuple, Union

import torch
Expand All @@ -16,7 +17,10 @@
try:
import cufinufft

CUFINUFFT_AVAIL = True
if cufinufft.__version__.startswith("1."):
warnings.warn("pytorch-finufft does not support cufinufft v1.x.x")
else:
CUFINUFFT_AVAIL = True
except ImportError:
CUFINUFFT_AVAIL = False

Expand Down

0 comments on commit 5747f8a

Please sign in to comment.