Skip to content

Make the polar AD rules a lot more GPU friendly - #331

Open
kshyatt wants to merge 3 commits into
mainfrom
ksh/polar
Open

kshyatt wants to merge 3 commits into
mainfrom
ksh/polar

Conversation

@kshyatt

@kshyatt kshyatt commented Nov 20, 2026

Copy link
Copy Markdown
Member

After staring at the polar PBs/PFs I convinced myself the input to sylvester is always Hermitian, so we can get away without using the Schur decomposition which GPUs don't support yet. This means we can get away with just using eigh which we do support. For the forward rules I added some logic similar to what we did for QR/LQ and focus only on the gauge invariant part. This also lets us handle rank-deficient inputs which is nice. I didn't go through super intensively to optimize this yet so there may be low hanging performance fruits.

@kshyatt
kshyatt requested a review from Jutho November 20, 2026 10:09
@codecov

codecov Bot commented Nov 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
...ixAlgebraKitAMDGPUExt/MatrixAlgebraKitAMDGPUExt.jl 87.35% <ø> (+2.91%) ⬆️
...MatrixAlgebraKitCUDAExt/MatrixAlgebraKitCUDAExt.jl 100.00% <ø> (ø)
src/MatrixAlgebraKit.jl 100.00% <ø> (ø)
src/common/pullbacks.jl 95.83% <100.00%> (+1.23%) ⬆️
src/pullbacks/polar.jl 100.00% <100.00%> (ø)
src/pushforwards/polar.jl 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

1 participant