Skip to content

fix: add specialized promotion rule for SArray and MArray#145

Closed
henry2004y wants to merge 2 commits into
ProjectTorreyPines:masterfrom
henry2004y:fix-staticarrays-AD
Closed

fix: add specialized promotion rule for SArray and MArray#145
henry2004y wants to merge 2 commits into
ProjectTorreyPines:masterfrom
henry2004y:fix-staticarrays-AD

Conversation

@henry2004y
Copy link
Copy Markdown

Attempt to fix #144

@github-actions
Copy link
Copy Markdown
Contributor

FastInterpolations.jl Benchmarks

All benchmarks (50 total, click to expand)
Benchmark Current: 2b4d5ff Previous Imm. Ratio Grad. Ratio
10_nd_construct/bicubic_2d 37470.0 ns 37996.0 ns 0.986 0.967
10_nd_construct/bilinear_2d 631.4 ns 751.5 ns 0.84 0.948
10_nd_construct/tricubic_3d 357077.0 ns 337158.0 ns 1.059 1.046
10_nd_construct/trilinear_3d 1703.6 ns 1999.8 ns 0.852 0.904
11_nd_eval/bicubic_2d_batch 1429.7 ns 1529.2 ns 0.935 0.868
11_nd_eval/bicubic_2d_scalar 16.3 ns 15.9 ns 1.025 1.01
11_nd_eval/bilinear_2d_scalar 7.3 ns 7.0 ns 1.043 1.014
11_nd_eval/tricubic_3d_batch 3243.0 ns 3457.1 ns 0.938 0.948
11_nd_eval/tricubic_3d_scalar 33.4 ns 35.8 ns 0.931 0.954
11_nd_eval/trilinear_3d_scalar 13.6 ns 13.0 ns 1.047 1.027
12_cubic_eval_gridquery/range_random 4227.3 ns 4648.9 ns 0.909 0.943
12_cubic_eval_gridquery/range_sorted 4213.5 ns 4645.5 ns 0.907 0.942
12_cubic_eval_gridquery/vec_random 9006.8 ns 10054.4 ns 0.896 0.937
12_cubic_eval_gridquery/vec_sorted 3212.8 ns 3200.1 ns 1.004 1.001
13_nd_oneshot_gridquery/bicubic_2d_rand_rand 66010.4 ns 65912.3 ns 1.001 -
13_nd_oneshot_gridquery/bicubic_2d_sort_rand 62813.5 ns 61742.1 ns 1.017 -
13_nd_oneshot_gridquery/bicubic_2d_sort_sort 58831.0 ns 58935.1 ns 0.998 -
13_nd_oneshot_gridquery/bilinear_2d_rand_rand 20191.9 ns 16653.4 ns 1.212 -
13_nd_oneshot_gridquery/bilinear_2d_sort_rand 9367.3 ns 9097.8 ns 1.03 -
13_nd_oneshot_gridquery/bilinear_2d_sort_sort 5686.2 ns 4859.0 ns 1.17 -
14_series_oneshot_batch/constant_inplace_vec_k8_q1000_rand 19180.8 ns 20604.4 ns 0.931 -
14_series_oneshot_batch/linear_inplace_vec_k8_q1000_rand 17808.3 ns 18261.0 ns 0.975 -
1_cubic_oneshot/q00001 529.8 ns 567.0 ns 0.934 1.106
1_cubic_oneshot/q10000 43546.4 ns 47867.7 ns 0.91 0.698
2_cubic_construct/g0100 1392.0 ns 1535.9 ns 0.906 0.987
2_cubic_construct/g1000 12759.9 ns 14363.2 ns 0.888 0.943
3_cubic_eval/q00001 20.2 ns 23.3 ns 0.868 0.9
3_cubic_eval/q00100 441.0 ns 483.7 ns 0.912 0.944
3_cubic_eval/q10000 42668.8 ns 47029.5 ns 0.907 0.943
4_linear_oneshot/q00001 24.7 ns 27.1 ns 0.912 0.909
4_linear_oneshot/q10000 18736.0 ns 19406.7 ns 0.965 0.979
5_linear_construct/g0100 35.4 ns 40.0 ns 0.885 0.92
5_linear_construct/g1000 266.2 ns 270.2 ns 0.985 0.99
6_linear_eval/q00001 10.1 ns 10.3 ns 0.981 0.979
6_linear_eval/q00100 195.8 ns 199.7 ns 0.98 0.984
6_linear_eval/q10000 18497.6 ns 19164.3 ns 0.965 0.979
7_cubic_range/scalar_query 8.3 ns 9.2 ns 0.902 0.939
7_cubic_vec/scalar_query 10.4 ns 10.2 ns 1.02 0.998
8_cubic_multi/construct_s001_q100 650.8 ns 680.8 ns 0.956 1.123
8_cubic_multi/construct_s010_q100 4441.1 ns 4983.4 ns 0.891 0.964
8_cubic_multi/construct_s100_q100 39701.2 ns 44607.8 ns 0.89 0.934
8_cubic_multi/eval_s001_q100 809.5 ns 856.3 ns 0.945 1.111
8_cubic_multi/eval_s010_q100 1792.9 ns 1832.7 ns 0.978 1.017
8_cubic_multi/eval_s010_q100_scalar_loop 2289.1 ns 2474.3 ns 0.925 0.951
8_cubic_multi/eval_s100_q100 11314.2 ns 11814.5 ns 0.958 0.981
8_cubic_multi/eval_s100_q100_scalar_loop 3322.2 ns 3508.1 ns 0.947 0.938
9_nd_oneshot/bicubic_2d 46215.4 ns 46253.3 ns 0.999 1.145
9_nd_oneshot/bilinear_2d 538.4 ns 587.1 ns 0.917 0.919
9_nd_oneshot/tricubic_3d 429017.9 ns 386974.7 ns 1.109 1.175
9_nd_oneshot/trilinear_3d 1035.9 ns 1073.5 ns 0.965 0.957

⚠️ Performance Regression Confirmed ⚠️

After re-running 7 flagged benchmark(s) 10 time(s), 7 regression(s) confirmed.

Benchmark Current Previous Imm. Ratio Grad. Ratio Tier
13_nd_oneshot_gridquery/bilinear_2d_rand_rand 20191.9 ns 16653.4 ns 1.212 - immediate
13_nd_oneshot_gridquery/bilinear_2d_sort_sort 5686.2 ns 4859.0 ns 1.17 - immediate
1_cubic_oneshot/q00001 529.8 ns 567.0 ns 0.934 1.106 gradual
8_cubic_multi/construct_s001_q100 650.8 ns 680.8 ns 0.956 1.123 gradual
8_cubic_multi/eval_s001_q100 809.5 ns 856.3 ns 0.945 1.111 gradual
9_nd_oneshot/bicubic_2d 46215.4 ns 46253.3 ns 0.999 1.145 gradual
9_nd_oneshot/tricubic_3d 429017.9 ns 386974.7 ns 1.109 1.175 both

Thresholds: immediate > 1.1x (vs latest master), gradual > 1.1x (vs sliding window)

This comment was automatically generated by Benchmark workflow.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.45%. Comparing base (51d3afb) to head (2b4d5ff).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #145   +/-   ##
=======================================
  Coverage   96.45%   96.45%           
=======================================
  Files         143      143           
  Lines       11957    11962    +5     
=======================================
+ Hits        11533    11538    +5     
  Misses        424      424           
Files with missing lines Coverage Δ
src/core/utils.jl 89.47% <100.00%> (+0.48%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mgyoo86
Copy link
Copy Markdown
Member

mgyoo86 commented May 20, 2026

@henry2004y Thanks for tackling this.
Closing in favor of #146 which takes a more generic trait-level approach.

@mgyoo86 mgyoo86 closed this May 20, 2026
@henry2004y henry2004y deleted the fix-staticarrays-AD branch May 20, 2026 22:07
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.

MethodError when evaluating vector-valued interpolants (SVector) during ForwardDiff automatic differentiation (v0.4.10)

2 participants