[GSoC] Feature: Jacobi preconditioner on GPU and CUDA Unified preconditiong matrix#2843
Draft
ddg93 wants to merge 1 commit into
Draft
[GSoC] Feature: Jacobi preconditioner on GPU and CUDA Unified preconditiong matrix#2843ddg93 wants to merge 1 commit into
ddg93 wants to merge 1 commit into
Conversation
… allocation of the preconditioning matrix.
Contributor
|
That's great! |
pcarruscag
reviewed
Jul 10, 2026
pcarruscag
left a comment
Member
There was a problem hiding this comment.
I think Areen looked into unified memory a bit.
Do you have some performance measurements? I imagine we save on the data transfer but suffer a little on the kernel performance?
Does unified memory introduce a significant restriction in terms of the required compute capability?
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.
Proposed Changes
This draft PR introduces CUDA Unified memory allocation and management for the preconditioning matrix inside the Jacobi preconditioner.
The Jacobi preconditioner calculations are performed on GPU through a new custom CUDA kernel through the preconditioner abstraction.
The preconditioning matrix is selected to test CUDA Unified Memory allocation and asynchronous prefetching to the GPU.
For simplicity, the double CPU/GPU pointer is still maintained in the current logic, although the device pointer reduces to an alias for the Unified Memory pointer when this kind of allocation is adopted.
This strategy introduces a simple context to test the CUDA Unified Memory usage and study the possibility of overlapping memory transfers and calculations without the need to introduce CUDA streams.
Concretely, this PR:
This work is part of my ongoing contribution during the Google Summer of Code 2026 program.
Validation
Validated locally with:
Nsys profiling was performed to confirm the asynchronous prefetching of the CUDA Unified Memory preconditioning matrix on my local GPU. Partial prefetching is observed, although page faults were reported during the preconditioner CUDA kernel, indicating that the calculations were slowed down by the prefetching matrix still being transferred to the GPU. This overlap is expected to largely improve on more modern hardware; tests are ongoing in the cloud.
Related Work
The Jacobi preconditioner kernels come from the PR #2825.
Observed Issues
Some issues were observed during this first period of GSoC:
Next steps
I propose to continue working on the following steps:
PR Checklist
Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.
pre-commit run --allto format old commits.