-
-
Notifications
You must be signed in to change notification settings - Fork 72
Refactor CudaOffloadFactorization into LU and QR variants #709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ChrisRackauckas
merged 12 commits into
SciML:main
from
ChrisRackauckas:refactor-cuda-offload-factorizations
Aug 10, 2025
Merged
Refactor CudaOffloadFactorization into LU and QR variants #709
ChrisRackauckas
merged 12 commits into
SciML:main
from
ChrisRackauckas:refactor-cuda-offload-factorizations
Aug 10, 2025
Conversation
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
- Created CudaOffloadLUFactorization using lu factorization - Created CudaOffloadQRFactorization using qr factorization - Deprecated CudaOffloadFactorization to use QR (with deprecation warning) - Updated CUDA extension to implement both algorithms - Updated LinearSolveAutotune to use LU version for better performance - Updated tests to include both new algorithms - Exported both new algorithms from LinearSolve module
- Fixed namespace issues (removed LinearSolve. prefix) - Fixed constructor syntax (new() instead of new{}()) - Added debug comment - Updated exports to separate lines Note: The new types are defined correctly but there appears to be a precompilation caching issue preventing them from being recognized immediately. A clean rebuild may be required.
ChrisRackauckas
commented
Aug 10, 2025
ChrisRackauckas
commented
Aug 10, 2025
ChrisRackauckas
commented
Aug 10, 2025
ChrisRackauckas
commented
Aug 10, 2025
- Updated GPU tutorial to show new CudaOffloadLUFactorization/QRFactorization - Updated solver documentation to explain both algorithms - Added deprecation warning in documentation - Updated release notes with upcoming changes - Created example demonstrating usage of both new algorithms - Explained when to use each algorithm (LU for performance, QR for stability)
ChrisRackauckas
commented
Aug 10, 2025
ChrisRackauckas
commented
Aug 10, 2025
ChrisRackauckas
commented
Aug 10, 2025
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
This PR refactors the
CudaOffloadFactorization
algorithm into two separate algorithms to provide more control over the factorization method used for GPU offloading:CudaOffloadLUFactorization
- Uses LU factorizationCudaOffloadQRFactorization
- Uses QR factorizationThe original
CudaOffloadFactorization
is deprecated with a warning and forwards to the QR version for backward compatibility.Changes
New Algorithms
CudaOffloadLUFactorization
: GPU-accelerated solver using LU factorizationCudaOffloadQRFactorization
: GPU-accelerated solver using QR factorizationUpdated Files
src/extension_algs.jl
: Added new struct definitions for both algorithms, deprecated the originalsrc/LinearSolve.jl
: Exported the new algorithmsext/LinearSolveCUDAExt.jl
: Implemented solve methods for both new algorithms using appropriate factorizationslib/LinearSolveAutotune/src/algorithms.jl
: Updated to use LU version for better performancetest/gpu/cuda.jl
: Added tests for both new algorithmstest/resolve.jl
: Updated to include new algorithms in testingDeprecation
CudaOffloadFactorization
now shows a deprecation warning: "CudaOffloadFactorization is deprecated, use CudaOffloadQRFactorization instead"Test plan
🤖 Generated with Claude Code