Remove CudaChunkedPipelineLimitedMemory class
For the record, nabu comes with two (full-field) pipelines:
- "chunked": load several lines of all the projections (a "chunk" of radios):
ChunkedPipeline
- "grouped": load all lines from a group of projections (a "group" of radios):
GroupedPipeline
Pipeline (1) is more efficient as it only loads the data needed for reconstruction. The memory transfers are kept minimal.
Pipeline (2) is adapted for the following use cases:
- (a) Datasets with a very large number of projections (such that
n_projections * n_slices_to_reconstruct * slice_width
does not fit in memory) - (b) Steps that need to load most-or-all the projection image: CTF, rotation with a large angle, Paganin with large kernel footprint
There is currently a CudaChunkedPipelineLimitedMemory
which tries to address use case (a) while still retaining the "chunked" approach. It was kept for legacy, but the implementation is really cumbersome (both the class and the branching in ChunkedReconstructor
). It would be good to get rid of this class altogether.
The current implementation of GroupedPipeline
writes temporary results (sinograms) to a file. But in some cases n_projections * n_slices_to_reconstruct * slice_width
does fit in host memory (although not in GPU memory), so the sinograms can simply be retained as an array.
So to summarize:
-
Make GroupedPipeline
able to keep the sinogram as an array instead of writing to a file -
Ensure GroupedPipeline
can replace the precise use case ofCudaChunkedPipelineLimitedMemory
-
Remove CudaChunkedPipelineLimitedMemory
and related code -
End to end tests