Fix derivatives w.r.t. structured matrices and require DiffTests 0.1.3 - #297
Merged
devmotion merged 3 commits intoSep 23, 2026
Merged
Conversation
devmotion
marked this pull request as draft
September 17, 2026 13:04
Member
|
Most of it is not relevant and due to a dependabot bug that will be fixed by dependabot/dependabot-core#16315 |
dependabot
Bot
force-pushed
the
dependabot/julia/all-julia-packages-7d5704c315
branch
2 times, most recently
from
September 21, 2026 07:27
f26b19f to
f9e4154
Compare
Updates the requirements on [DiffTests](https://github.com/JuliaDiff/DiffTests.jl) to permit the latest version. Updates `DiffTests` to 0.1.2 - [Release notes](https://github.com/JuliaDiff/DiffTests.jl/releases) - [Commits](https://github.com/JuliaDiff/DiffTests.jl/commits) --- updated-dependencies: - dependency-name: DiffTests dependency-version: 0.1.2 dependency-type: direct:production dependency-group: all-julia-packages ... Signed-off-by: dependabot[bot] <support@github.com>
dependabot
Bot
force-pushed
the
dependabot/julia/all-julia-packages-7d5704c315
branch
from
September 23, 2026 07:25
f9e4154 to
3ecc294
Compare
DiffTests 0.1.3 (JuliaDiff/DiffTests.jl#15, fixes JuliaDiff/DiffTests.jl#13) makes its `*_lmul`/`*_ldiv` test functions accept `TrackedArray`s. They exposed that the reverse pass of `*` wrote the full product into the `Diagonal`/triangular derivative buffer of a structured factor, which errors. Only the structural entries are stored now. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
devmotion
marked this pull request as ready for review
September 23, 2026 10:41
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #297 +/- ##
==========================================
+ Coverage 86.93% 88.21% +1.27%
==========================================
Files 19 19
Lines 1952 1934 -18
==========================================
+ Hits 1697 1706 +9
+ Misses 255 228 -27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- Add `*` methods for `Diagonal` and triangular matrices times tracked arrays to resolve ambiguities with LinearAlgebra (all combinations on Julia 1.10, `Diagonal * TrackedVector` on later versions). - Remove the `reverse_mul!` rules for `Transpose`/`Adjoint` arguments. Only wrapped vectors reach the tape (`capture` materializes other wrapped arrays), and the generic rule handles them. Three of these rules gave wrong derivatives or errored for row vectors, and the others were unreachable. - Remove the unreachable size check in `structured_mul!(::Diagonal, ...)`. - Test constant structured factors, products with row vectors, and `DiffTests.VECTOR_TO_VECTOR_FUNCS`. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
dependabot
Bot
deleted the
dependabot/julia/all-julia-packages-7d5704c315
branch
September 23, 2026 20:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DiffTests 0.1.3 (JuliaDiff/DiffTests.jl#15, fixes JuliaDiff/DiffTests.jl#13) makes its new
*_lmul/*_ldivtest functions work withTrackedArrays. They exposed that the reverse pass of*wrote the full product into the derivative buffer of aDiagonal/triangular factor, which errors. Now only the structural entries are stored.Products of
Diagonal/triangular matrices and tracked arrays were ambiguous with LinearAlgebra's methods: all combinations on Julia 1.10, andDiagonal * TrackedVectoron later versions. Disambiguating methods are added.The
reverse_mul!rules forTranspose/Adjointarguments are removed. Only wrapped vectors reach the tape (other wrapped arrays are materialized when recorded), and the generic rule handles them. Three of these rules gave wrong derivatives or errored for row vectors, and the others were unreachable.Fixes #223.
🤖 Generated with Claude Code