Skip to content

Simplify and speed up the GPU projection kernels - #318

Merged
kshyatt merged 6 commits into
mainfrom
ksh/proj
Oct 30, 2026
Merged

kshyatt merged 6 commits into
mainfrom
ksh/proj

Conversation

@kshyatt

@kshyatt kshyatt commented Oct 29, 2026

Copy link
Copy Markdown
Member

This simplifies things by using one kernel for the (anti)hermitian projections. It should cut down on the number of independent kernel launches compared to the CPU-side blocked version.

@kshyatt
kshyatt requested a review from lkdvos October 29, 2026 13:18

@lkdvos lkdvos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to immediately move this to a GPUArrays extension that unifies the kernels as well? Otherwise definitely looks good!

@kshyatt

kshyatt commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

I've been wanting a GPUArrays extension for a while anyway, let me do that here

@kshyatt

kshyatt commented Oct 29, 2026

Copy link
Copy Markdown
Member Author

I forgot to change the kernel syntax anyway when copying over to CUDA which really militates against duplication!

@lkdvos lkdvos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice how much code duplication can go away!

Comment thread ext/MatrixAlgebraKitGPUArraysExt.jl Outdated
Comment thread ext/MatrixAlgebraKitGPUArraysExt.jl

@lkdvos lkdvos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up to minor remark looks good to me!

@kshyatt

kshyatt commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

AMD queue is hella backed up and since this is a backend agnostic change, I'm going to merge.

@kshyatt
kshyatt merged commit 508fa31 into main Oct 30, 2026
19 of 20 checks passed
@kshyatt
kshyatt deleted the ksh/proj branch October 30, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants