Repository navigation
fix(overload): MissingPrimalError in reductions of tracer Fills with FillArrays v1.17 - #328
Merged
Merged
Conversation
…rays v1.17 Since FillArrays v1.17, reduction fast paths call `iszero`/`isone` on the fill value, which global tracers deliberately reject. Add exact O(1) `sum` and `prod` overloads for `AbstractFill`s of tracers that stay in the `Fill` representation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
SimpleDiffEq v1.17 no longer defines `solve`, breaking the Brusselator ODE benchmark with an `UndefVarError`. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #328 +/- ##
===========================================
+ Coverage 40.22% 93.90% +53.67%
===========================================
Files 28 29 +1
Lines 1044 1115 +71
===========================================
+ Hits 420 1047 +627
+ Misses 624 68 -556 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Instead of computing the number of reduced elements per output slice, branch directly on the only three cases that matter: empty, single-element, and everything else. Also compare `dims = :` output dimensionality against regular arrays in the tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The Benchmarks test group includes benchmark/jacobian.jl, which now imports solve from CommonSolve. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Closed
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.
Since FillArrays v1.17, reduction fast paths call
iszero/isoneon the fill value (_foldl_length_opinfillbroadcast.jl), which global tracers deliberately answer with aMissingPrimalError. SinceFills of tracers are also SCT's own representation of "all outputs share one pattern" (inv,eigen,cholesky,\), this broke CI on all Core jobs, e.g. on #327.This PR adds exact O(1)
sumandprodoverloads forAbstractFills of tracers that stay in this representation: a scalar tracer for a full reduction, aFillfor a reduction alongdims. Summation is linear, so the fill value's pattern is preserved exactly; products create all second-order self-interactions viasecond_order_or, except for single-element and empty reductions, which are exact.Also fixes the Benchmarks CI jobs, which failed independently because SimpleDiffEq v1.17 no longer defines
solve: it is now imported from CommonSolve.Bumps the version to
v1.2.3-DEVand updates the changelog.Tested locally against FillArrays v1.17.0 (all of
test_arrays.jl, including a new "Fill reductions" testset) and SimpleDiffEq v1.17.0 (Brusselatorjacobian_sparsitybenchmark path).🤖 Generated with Claude Code