Add GPU acceleration module (CuPy/JAX) with CPU fallback#90
Closed
FIrgolitsch wants to merge 1 commit intomainfrom
Closed
Add GPU acceleration module (CuPy/JAX) with CPU fallback#90FIrgolitsch wants to merge 1 commit intomainfrom
FIrgolitsch wants to merge 1 commit intomainfrom
Conversation
New linumpy/gpu/ package with automatic CPU fallback: array_ops.py, corrections.py, cuda_env.py, fft_ops.py, image_quality.py, interpolation.py, morphology.py, registration.py. GPU-accelerated counterparts added for all major pipeline scripts (AIP, mosaic grid, masks, illumination correction, resampling, transform estimation). Adds linum_gpu_info.py for device selection and linum_benchmark_gpu.py for CPU/GPU performance comparison. Updates requirements.txt and setup.py with optional CuPy/JAX/BaSiCPy dependencies.
Contributor
Author
|
Closing in favour of #99 (recreated with squashed commits as part of the PR split plan refresh). |
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.
Summary
Introduces a
linumpy/gpu/package that provides GPU-accelerated implementations of the most computationally expensive pipeline operations. All functions fall back to CPU (NumPy/SciPy) automatically when no GPU is available, so the package remains usable on CPU-only machines.New
linumpy/gpu/Modules__init__.pyget_array_module(), device selectionarray_ops.pycorrections.pycuda_env.pyfft_ops.pyimage_quality.pyinterpolation.pymorphology.pyregistration.pyNew GPU Scripts
Drop-in GPU replacements for CPU counterparts:
linum_aip_gpu.pylinum_create_masks_gpu.pylinum_create_mosaic_grid_3d_gpu.pylinum_estimate_transform_gpu.pylinum_fix_illumination_3d_gpu.pylinum_generate_mosaic_aips_gpu.pylinum_normalize_intensities_per_slice_gpu.pylinum_resample_mosaic_grid_gpu.pyUtilities
linum_gpu_info.py— list available GPUs and select a devicelinum_benchmark_gpu.py— CPU vs GPU performance comparison for all pipeline stagesshell_scripts/fix_jax_cuda_plugin.sh— script to patch JAX/CUDA plugin compatibilityDependencies
Adds CuPy, JAX, and BaSiCPy as optional extras in
requirements.txtandsetup.py.Depends on PR #85 (thread config module).