Skip to content

avoid twist allocating in rrules when not required#306

Merged
lkdvos merged 4 commits into
mainfrom
ld-twist-copy
Oct 28, 2025
Merged

avoid twist allocating in rrules when not required#306
lkdvos merged 4 commits into
mainfrom
ld-twist-copy

Conversation

@lkdvos

@lkdvos lkdvos commented Oct 27, 2025

Copy link
Copy Markdown
Member

This is a temporary non-breaking solution before #305 fully resolves the issue, to already include in a patch release.

@leburgel tagging you here

@codecov

codecov Bot commented Oct 27, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
ext/TensorKitChainRulesCoreExt/linalg.jl 100.00% <100.00%> (ø)
ext/TensorKitChainRulesCoreExt/tensoroperations.jl 93.13% <100.00%> (+0.20%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leburgel

leburgel commented Oct 27, 2025

Copy link
Copy Markdown
Member

I think there's two more in the rrule(::typeof(⊗), ...) in ext/TensorKitChainRulesCoreExt/linalg.jl. I assume these will have the same issue, so might be good to change these here too?

@lkdvos

lkdvos commented Oct 27, 2025

Copy link
Copy Markdown
Member Author

Unfortunately, the non-passing tests seem to be unrelated. I still haven't figured out a good way to make testing truncated SVD compatible with finite-difference checks, since this more or less requires that the variations are small enough that the truncation selects the same subspace every time.
I think the only way around this is to carefully craft input matrices with well-defined spectra, which can and should be done in a separate PR

Comment thread ext/TensorKitChainRulesCoreExt/tensoroperations.jl Outdated
Co-authored-by: Jutho <Jutho@users.noreply.github.com>
@lkdvos
lkdvos merged commit 31c912f into main Oct 28, 2025
39 of 42 checks passed
@lkdvos
lkdvos deleted the ld-twist-copy branch October 28, 2025 10:40
lkdvos referenced this pull request Oct 28, 2025
* Bump v0.15.2

* fix small errors in tutorial
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