Skip to content

Conversation

@lkdvos
Copy link
Member

@lkdvos lkdvos commented Jan 8, 2026

This is an attempt to get rid of the scalar-indexing oriented approach, and instead do more global operations.
Definitely still WIP, and on CPU there are definitely various optimizations that can be applied if needed.
I do wonder about the performance a bit, as I would actually expect that for a large number of sectors this might just be faster.

Some possible optimizations:

  • for UniqueFusion, finding the nth value is simply partialsortperm(values, n; by, rev), avoiding the need to allocate the full permutation vector
  • for CPU, cumsum + findlast can be replaced by a loop to avoid some intermediate allocations

@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 0% with 19 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/factorizations/truncation.jl 0.00% 19 Missing ⚠️
Files with missing lines Coverage Δ
src/factorizations/truncation.jl 17.04% <0.00%> (-70.32%) ⬇️

... and 29 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Jutho
Copy link
Member

Jutho commented Jan 12, 2026

I think that implementation is very clean. Not sure I can explain all the errors. Some seem to originate from the eigenvectors of a DiagonalTensorMap also being diagonal, which is being changed, right? But other errors I cannot directly explain without running the code locally.

@lkdvos
Copy link
Member Author

lkdvos commented Jan 12, 2026

I will have a look later, I have a local branch to fix the diagonal implementations already, we'll see what remains after.
I'll also try if it actually works on GPU, and get a similar implementation going for the truncerror version.

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.

3 participants