Skip to content

fix: use IRStructure for homotopy checking - #4834

Merged
AayushSabharwal merged 1 commit into
masterfrom
as/irstructure-homotopy
Jul 28, 2026
Merged

fix: use IRStructure for homotopy checking#4834
AayushSabharwal merged 1 commit into
masterfrom
as/irstructure-homotopy

Conversation

@AayushSabharwal

Copy link
Copy Markdown
Member

Significantly improves scaling for large models, otherwise ODEProblem can take hours.

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

@AayushSabharwal
AayushSabharwal force-pushed the as/irstructure-homotopy branch from 5a91d0b to 4568b2f Compare July 27, 2026 13:04
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia vlts)

Time benchmarks
master 6be1b77... master / 6be1b77...
ODEProblem 5.34 ± 0.1 ms 5.43 ± 0.11 ms 0.984 ± 0.027
init 0.0892 ± 0.029 ms 0.0671 ± 0.027 ms 1.33 ± 0.69
large_parameter_init/ODEProblem 20.5 ± 3.8 ms 21.1 ± 4 ms 0.973 ± 0.26
large_parameter_init/init 0.108 ± 0.041 ms 0.09 ± 0.036 ms 1.2 ± 0.66
mtkcompile 9.3 ± 0.56 ms 9.51 ± 0.83 ms 0.978 ± 0.1
sparse_analytical_jacobian/ODEProblem 20.2 ± 0.64 ms 21.1 ± 0.68 ms 0.959 ± 0.043
sparse_analytical_jacobian/f_iip 0.07 ± 0.01 μs 0.07 ± 0.001 μs 1 ± 0.14
sparse_analytical_jacobian/f_oop 0.381 ± 0.011 ms 0.383 ± 0.011 ms 0.995 ± 0.041
time_to_load 5.81 ± 0.013 s 5.9 ± 0.0087 s 0.985 ± 0.0026
Memory benchmarks
master 6be1b77... master / 6be1b77...
ODEProblem 0.0376 M allocs: 1.94 MB 0.0376 M allocs: 1.96 MB 0.992
init 0.428 k allocs: 0.0723 MB 0.428 k allocs: 0.0723 MB 1
large_parameter_init/ODEProblem 0.312 M allocs: 11 MB 0.312 M allocs: 11 MB 1
large_parameter_init/init 0.616 k allocs: 0.175 MB 0.616 k allocs: 0.175 MB 1
mtkcompile 0.0617 M allocs: 3.43 MB 0.0617 M allocs: 3.44 MB 0.995
sparse_analytical_jacobian/ODEProblem 0.145 M allocs: 6.55 MB 0.145 M allocs: 6.55 MB 1
sparse_analytical_jacobian/f_iip 0 allocs: 0 B 0 allocs: 0 B
sparse_analytical_jacobian/f_oop 0.634 k allocs: 19.6 kB 0.634 k allocs: 19.6 kB 1
time_to_load 0.153 k allocs: 14.5 kB 0.153 k allocs: 14.5 kB 1

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
master 6be1b77... master / 6be1b77...
ODEProblem 5.21 ± 0.56 ms 4.94 ± 0.4 ms 1.06 ± 0.14
init 0.0764 ± 0.01 ms 0.0768 ± 0.0086 ms 0.994 ± 0.17
large_parameter_init/ODEProblem 25.2 ± 4 ms 23.8 ± 3.6 ms 1.06 ± 0.23
large_parameter_init/init 0.0819 ± 0.04 ms 0.0824 ± 0.04 ms 0.995 ± 0.69
mtkcompile 8.76 ± 1.1 ms 8.2 ± 0.49 ms 1.07 ± 0.15
sparse_analytical_jacobian/ODEProblem 19 ± 2 ms 18.8 ± 1.2 ms 1.01 ± 0.13
sparse_analytical_jacobian/f_iip 0.08 ± 0 μs 0.08 ± 0 μs 1 ± 0
sparse_analytical_jacobian/f_oop 0.112 ± 0.013 ms 0.108 ± 0.014 ms 1.04 ± 0.18
time_to_load 5.92 ± 0.1 s 5.55 ± 0.37 s 1.07 ± 0.073
Memory benchmarks
master 6be1b77... master / 6be1b77...
ODEProblem 0.0375 M allocs: 1.69 MB 0.0375 M allocs: 1.7 MB 0.991
init 0.426 k allocs: 0.0545 MB 0.426 k allocs: 0.0545 MB 1
large_parameter_init/ODEProblem 0.341 M allocs: 12.3 MB 0.341 M allocs: 12.3 MB 1
large_parameter_init/init 0.809 k allocs: 0.154 MB 0.809 k allocs: 0.154 MB 1
mtkcompile 0.0597 M allocs: 2.74 MB 0.0597 M allocs: 2.74 MB 1
sparse_analytical_jacobian/ODEProblem 0.15 M allocs: 5.93 MB 0.15 M allocs: 5.92 MB 1
sparse_analytical_jacobian/f_iip 0 allocs: 0 B 0 allocs: 0 B
sparse_analytical_jacobian/f_oop 0.848 k allocs: 27 kB 0.848 k allocs: 27 kB 1
time_to_load 0.146 k allocs: 11.4 kB 0.146 k allocs: 11.4 kB 1

@AayushSabharwal
AayushSabharwal force-pushed the as/irstructure-homotopy branch from 4568b2f to ca624a1 Compare July 27, 2026 14:02
Significantly improves scaling for large models, otherwise `ODEProblem`
can take hours.
@AayushSabharwal
AayushSabharwal force-pushed the as/irstructure-homotopy branch from ca624a1 to 6be1b77 Compare July 28, 2026 10:37
@AayushSabharwal

Copy link
Copy Markdown
Member Author

InterfaceII failures are BVP broken tests now passing. Will fix in a follow-up to avoid holding this back, since it is critical for usability.

@AayushSabharwal
AayushSabharwal merged commit 529c989 into master Jul 28, 2026
82 of 94 checks passed
@AayushSabharwal
AayushSabharwal deleted the as/irstructure-homotopy branch July 28, 2026 13:21
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.

1 participant