Skip to content

Commit

Permalink
Merge pull request #37 from mrphys/nufft-1d-gpu
Browse files Browse the repository at this point in the history
Implement 1D NUFFT for GPU
  • Loading branch information
jmontalt authored Nov 28, 2022
2 parents 14f6394 + 617d319 commit 7d2f502
Show file tree
Hide file tree
Showing 12 changed files with 850 additions and 453 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/mrphys/tensorflow-manylinux:1.14.0
FROM ghcr.io/mrphys/tensorflow-manylinux:1.15.0

# To enable plotting.
RUN apt-get update && \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: ghcr.io/mrphys/tensorflow-manylinux:1.14.0
image: ghcr.io/mrphys/tensorflow-manylinux:1.15.0

strategy:
matrix:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ versions of TensorFlow and TensorFlow NUFFT according to the table below.

| TensorFlow NUFFT Version | TensorFlow Compatibility | Release Date |
| ------------------------ | ------------------------ | ------------ |
| v0.12.0 | v2.11.x | Nov 27, 2022 |
| v0.11.0 | v2.10.x | Oct 12, 2022 |
| v0.10.1 | v2.10.x | Sep 26, 2022 |
| v0.10.0 | v2.10.x | Sep 7, 2022 |
Expand Down
20 changes: 4 additions & 16 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
# Release 0.11.0
# Release 0.12.0

## Major Features and Improvements

- Added new option `points_range` to control the range supported by the
algorithm. This option provides a trade-off between flexibility and
performance.
- Added new option `debugging.check_points_range` to assert that the input
points lie within the supported range.
This release is compiled against TensorFlow 2.11.

## Bug Fixes and Other Changes
## Major Features and Improvements

- `nufft` type-1 will now raise an error when `source` and `points` have
incompatible samples dimensions. Previously the computation would have
proceeded, ignoring any additional samples in `source`.
- Improved error reporting for invalid `grid_shape` arguments. `nufft` will
now raise an informative error when `grid_shape` has an invalid length or
when the user fails to provide it for type-1 transforms. Previously, `nufft`
would have behaved erratically or crashed.
- Added support for 1D transforms to the GPU kernel.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packaging
pydantic
tensorflow>=2.10.0,<2.11.0
tensorflow>=2.11.0,<2.12.0
2 changes: 1 addition & 1 deletion tensorflow_nufft/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
__summary__ = "A fast, native non-uniform FFT op for TensorFlow."
__uri__ = "https://github.com/mrphys/tensorflow-nufft"

__version__ = "0.11.0"
__version__ = "0.12.0"

__author__ = "Javier Montalt Tordera"
__email__ = "[email protected]"
Expand Down
8 changes: 4 additions & 4 deletions tensorflow_nufft/cc/kernels/nufft_kernels.cc
Original file line number Diff line number Diff line change
Expand Up @@ -388,15 +388,15 @@ class NUFFTBaseOp : public OpKernel {
int64_t batch_rank,
int64_t* source_batch_dims,
int64_t* points_batch_dims,
int64_t* num_modes,
int64_t* grid_dims,
int64_t num_points,
FloatType* points,
Complex<Device, FloatType>* source,
Complex<Device, FloatType>* target) {
// Number of coefficients.
int num_coeffs = 1;
for (int d = 0; d < rank; d++) {
num_coeffs *= num_modes[d];
num_coeffs *= grid_dims[d];
}

// Number of calls to FINUFFT execute.
Expand Down Expand Up @@ -465,10 +465,10 @@ class NUFFTBaseOp : public OpKernel {
options.num_threads = worker_threads.num_threads;

// Make inlined vector from pointer to number of modes. TODO: use inlined
// vector for all of num_modes.
// vector for all of grid_dims.
int num_modes_int[3] = {1, 1, 1};
for (int i = 0; i < rank; ++i) {
num_modes_int[i] = static_cast<int>(num_modes[i]);
num_modes_int[i] = static_cast<int>(grid_dims[i]);
}

// Make the NUFFT plan.
Expand Down
Loading

0 comments on commit 7d2f502

Please sign in to comment.