Factorized backprojection - #346
Open
bhawkins wants to merge 245 commits into
Open
Conversation
This reverts commit 0f7405f.
Contributor
Author
|
Hmm the GPU build is failing, though it builds fine in my dev environment. I notice that I'm on CUDA 12 while the CI is building with CUDA 13. It looks like there was a change regarding visibility of |
Fixes linker errors with CUDA 13+ where __global__ kernel symbols from the main library weren't visible when template code in the Python bindings module instantiated templates that called those kernels. The main CUDA library already has CUDA_SEPARABLE_COMPILATION enabled, but the Python bindings module didn't. This enables the -rdc flag for nvcc, allowing device code symbols to be visible across translation units during device link time.
CUDA 13.0 changed nvcc defaults so __global__ kernels get hidden ELF visibility and __global__ function-template stubs get internal linkage. This breaks the pybind module link: template code in the bindings launches detail:: kernels defined in libisce3-cuda, and those symbols are no longer resolvable across the shared-library boundary. Restore the pre-13 behavior on the isce3-cuda target via the documented nvcc opt-out flags (available since CUDA 12.8), guarded on compiler version so older toolchains are unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bhawkins
commented
Aug 4, 2026
This reverts commit 5ca283a.
This reverts commit 733479f.
Change accumulatePolarImagesToRadarGrid and mergePolarImages to use std::vector<const NFFT2dResult<float>*> instead of std::vector<NFFT2dResult<float>> to match the GPU implementation and avoid unnecessary copies. Updated Python bindings to accept py::sequence and convert to vector of pointers, consistent with the GPU bindings. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Contributor
Author
|
All the CI failures are in Seems unrelated to the PR and the test passes locally. |
bhawkins
commented
Aug 6, 2026
bhawkins
left a comment
Contributor
Author
There was a problem hiding this comment.
Comments from today's review meeting.
Documented all functions and classes in serialization.py with NumPy format docstrings including parameter types, return values, and attribute descriptions. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Contributor
Author
|
Fix for the CI failure is in #348 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a factorized backprojection (FBP) algorithm for SAR focusing as a faster alternative to the existing direct backprojection method.
Algorithm Design
The basic idea is from Yegulalp 1999 where local, low-resolution polar grids can efficiently store partial sums of subapertures. As in other papers, the idea is extended hierarchically, so that multiple local grids can be combined together into a higher resolution grid. This process can be repeated in successive stages until the desired resolution is met. In the limit one achieves a factor of$O(N / log(N))$ reduction in the number of sums per output pixel (where $N$ is the number of pulses in the synthetic aperture). In practice there's a fair amount of overhead, but the speedup is still significant.
The FBP algorithm is usually described for the spotlight case, and the one here has a few modifications for the stripmap case relevant to NISAR. First, the azimuth extent of the local grid is extended based on the duration of the subaperture, since the beam is sliding. Second, the azimuth resolution of the local grid is not allowed to exceed the L/2 limit. The radar travel time between transmit and receive ("bistatic" correction) is accounted for both in the initial back projection stage and in the selection of grid coordinates. The latter is necessary to maintain a baseband signal in azimuth.
I'm not sure I'd call this a "fast factorized" (FFBP) algorithm. In the interest of maximal accuracy, it does full 2D interpolation and makes no assumptions about the trajectory or nesting of coordinate grids. Non-uniform FFT algorithms are used for interpolation in order to maintain high accuracy with small kernels. The zero-padded transforms do occupy a fair amount of memory, though, which may be a bottleneck. Care has been taken to ensure that only the "active" subimages reside in memory at any given time.
You might notice a few new functions that are not used in the NISAR RSLC workflow. These have been used for processing UAVSAR data from circular tracks (CSAR).
Key Features
Usage
The algorithm is highly configurable. You can specify the number of stages, the size of each stage, and the interpolation parameters for each stage (NFFT kernel size and oversampling ratio in both dimensions). To use a two-stage algorithm, the RSLC configuration file should look like
which means sum groups of 128 pulses into polar grids before summing those into the output image. Similarly,
means a three-stage algorithm where the initial grids comprise 64 pulses each, these get merged together two at a time, and then the merged grids get summed into the output image. The default
factorization: [{"size": 1}]is understood to mean the original direct backprojection algorithm.In my testing I've found the two-stage n=128 algorithm is a 10x speedup of the azcomp algorithm on a g6e instance in AWS EC2.
I included a script that can generate animations like the following from the FBP debug file:
factors.mp4