-
Notifications
You must be signed in to change notification settings - Fork 5
Create extension for AMD and generalize GPU wrappers #42
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
Conversation
43ee4d2 to
fd5e540
Compare
lkdvos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
I had one question about the way you define things for AbstractMatrix and Union{CUAlg, ROCAlg}, which is just to check if this causes any ambiguities or not - one of the goals of this package was to allow overloading based on your own "operator", and therefore it tends to be easier to only use concrete types for the algorithms. This being said, from what I can tell it should be fine here since you probably always want to define things for both at the same time anyways, I just wanted to hear if you have any thoughts on that.
If I understood the question correctly, I think this should avoid ambiguities since in the package extensions the functions only accept the appropriate |
|
I think I would prefer not to have too many abstract types added, so probably the const union is fine. Thinking a bit more through it I think you are right that either we hit the |
|
Should I maybe add an explanatory comment there about this, since it was confusing enough that you had to ask? |
|
I'm fine with either, I think it's not necessarily confusing, I tend to overworry a bit about ambiguities since there's a large amount of downstream packages for which this would be very annoying to work around |
|
Then it sounds like you are worrying an appropriate amount. Perhaps we
should add some downstream tests to CI, as CUDA.jl has?
…On Thu, Aug 14, 2025 at 11:52 AM Lukas Devos ***@***.***> wrote:
*lkdvos* left a comment (QuantumKitHub/MatrixAlgebraKit.jl#42)
<#42 (comment)>
I'm fine with either, I think it's not necessarily confusing, I tend to
overworry a bit about ambiguities since there's a large amount of
downstream packages for which this would be very annoying to work around
—
Reply to this email directly, view it on GitHub
<#42 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGKJY4UELLWUH3OQM4V7FT3NRL4NAVCNFSM6AAAAACDZNKLOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCOBXHAZTSNBTGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
We definitely should, unfortunately these still are a bit in development 😀 Thinking of TensorKit, BlockSparseArrays etc right now |
|
In that case, are we good to merge? |
|
I think so! |
This generalizes the CUDA wrappers to also support AMD GPUs. I moved some of the higher GPU logic into
srcso that we don't have to duplicate code, and provided "fallbacks" for the lower-level LAPACK like methods (ROCm and CUDA implement the same APIs) so that the extensions should only need to extend the LAPACK API rather thanqr_null!and such. I also added CI support for AMD.Since I don't have an AMD GPU to test on, this is going to be "CI based debugging" for a bit 😅 . I did check locally that the CUDA tests pass.