Skip to content

Remove Static.jl and StaticArrayInterface; use FastBroadcast Serial/Threaded#3302

Closed
ChrisRackauckas-Claude wants to merge 4 commits intoSciML:masterfrom
ChrisRackauckas-Claude:remove-static-master
Closed

Remove Static.jl and StaticArrayInterface; use FastBroadcast Serial/Threaded#3302
ChrisRackauckas-Claude wants to merge 4 commits intoSciML:masterfrom
ChrisRackauckas-Claude:remove-static-master

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

Summary

  • Replace Static.True()/Static.False() threading dispatch with FastBroadcast.Serial/FastBroadcast.Threaded types across DiffEqBase, OrdinaryDiffEqCore, and all 14 subpackages
  • Remove StaticArrayInterface from OrdinaryDiffEqCore and OrdinaryDiffEqDifferentiation
  • Remove unused reduce_tup import from DiffEqBase
  • Keep specialized calculate_residuals! Array SIMD method (updated to dispatch on ::Serial)
  • Require FastBroadcast >= 1.2 everywhere (70 files)

Motivation

SnoopCompile invalidation analysis shows Static.jl causes ~3,400 method invalidations when loading OrdinaryDiffEq, from pirating |, >, convert, xor etc. on broad types like Integer and Number. None of these packages used Static for core functionality — Static.True/False were only dispatch tags for the thread parameter.

FastBroadcast.Serial/Threaded (from SciML/FastBroadcast.jl#80) provide the same compile-time dispatch without type piracy. The Serial code path never references threaded methods, so loading Polyester cannot invalidate it.

Depends on

Test plan

  • CI

🤖 Generated with Claude Code

ChrisRackauckas and others added 3 commits March 31, 2026 10:03
…hreaded

Replace Static.True()/False() threading dispatch with FastBroadcast's
Serial/Threaded types across DiffEqBase, OrdinaryDiffEqCore, and all
subpackages. Remove StaticArrayInterface from Core and Differentiation.
Require FastBroadcast >= 1.2.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The 9-arg and 8-arg overloads generate overlapping 8-arg methods when
thread has no type constraint. Add Union{Serial, Threaded, Bool} to
disambiguate, matching the old Union{False, True} pattern.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
RAT 3.51 fixes the FastBroadcast extension to work with FastBroadcast
v1.0+ (removes reference to FastBroadcast.Static which no longer exists).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SciMLSensitivity 7.69-7.99 has FastBroadcast compat "0.3.5-0.3" which
doesn't include v1.x. Need >= 7.100 for FastBroadcast 1.2 compat.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants