From 5747f8a8daa2e0920945ed6b59ac94a5d118ae2a Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Wed, 18 Oct 2023 16:27:15 -0400 Subject: [PATCH] Clarify dependency version requirements, check for older cufinufft and give a warning --- .github/workflows/docs.yml | 2 ++ README.md | 2 ++ docs/installation.rst | 6 ++++-- pyproject.toml | 2 +- pytorch_finufft/functional.py | 6 +++++- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 90b2711..d3b2dee 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -29,6 +29,8 @@ jobs: python -m pip install . - name: Build docs + env: + SPHINXOPTS: "-v" run: | cd docs/ make clean diff --git a/README.md b/README.md index fbc1dd1..5572623 100644 --- a/README.md +++ b/README.md @@ -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** diff --git a/docs/installation.rst b/docs/installation.rst index 28ee2ef..49dbcd3 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -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 ` and :external+finufft:doc:`cufinufft `. diff --git a/pyproject.toml b/pyproject.toml index 2a3ff52..5780f9f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ authors = [ {name = "Brian Ward", email="bward@flatironinstitute.org"}, ] 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", diff --git a/pytorch_finufft/functional.py b/pytorch_finufft/functional.py index ca42977..2fe87ec 100644 --- a/pytorch_finufft/functional.py +++ b/pytorch_finufft/functional.py @@ -2,6 +2,7 @@ Implementations of the corresponding Autograd functions """ +import warnings from typing import Any, Callable, Dict, Optional, Tuple, Union import torch @@ -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