Skip to content

Conversation

@kshyatt
Copy link
Member

@kshyatt kshyatt commented Jan 5, 2026

Try to address #138

Copy link
Member

Choose a reason for hiding this comment

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

I would slightly prefer to have these changes as specializations in the GPU extensions, but definitely happy to try them out like this

@kshyatt kshyatt marked this pull request as ready for review January 6, 2026 09:14
@kshyatt
Copy link
Member Author

kshyatt commented Jan 6, 2026

OK, got the column permutation for V in eigh_full for Diagonal working (what a mouthful...). Base.permutecols!! isn't GPU friendly as is.

@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/implementations/eigh.jl 94.80% <100.00%> (+0.36%) ⬆️
src/implementations/truncation.jl 90.80% <100.00%> (-0.50%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kshyatt
Copy link
Member Author

kshyatt commented Jan 6, 2026

We can probably use the accumulate approach by defining a custom struct such that:

struct Truncerr_BinaryAdder{T}
    p::T
end
(a::Truncerr_BinaryAdder)(x, y) = x + abs(y)^a.p

Then in the GPU extensions do:
GPUArrays.neutral_element(::Truncerr_BinaryAdder, T) = abs(zero(T))
and finally
accumulate(Truncerr_BinaryAdder(p), reverse(view(values, I); init = abs(zero(eltype(values)))

But that can happen in a separate PR since this is holding up TK.

@kshyatt kshyatt enabled auto-merge (squash) January 6, 2026 14:22
@kshyatt kshyatt merged commit 4f5bcb1 into main Jan 6, 2026
10 checks passed
@kshyatt kshyatt deleted the gpu-trunc branch January 6, 2026 18:01
lkdvos referenced this pull request Jan 8, 2026
* Bump version

* update changelog

---------

Co-authored-by: Lukas Devos <[email protected]>
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.

4 participants