Repository navigation
Commit 704298b
Bucket C: plumb effective_order through atan2, integer_pow, cumprod/max/min
These rules call jet() or _deriv_prop_propagate() internally and
otherwise just forward to already-aware primitives. Pure plumbing:
- _atan2_taylor: forward to two inner jet() calls and to
_deriv_prop_propagate
- _integer_pow_taylor: forward to inner jet() (both branches)
- _cumulative_jet_rule: forward to inner jet() over associative_scan
(registered for cumprod, cummax, cummin)
Each gets _register_eff_order_rule(prim).
Also classify the remaining rules. The fan-out rules (abs, max, min,
gather, select_n, scatter-add, reduce_max, reduce_min) all use
jax.vmap over the order axis — structurally linear, like add/sub.
They don't need the effective_order plumbing because per-entry cost
is O(1) and the contract permits garbage above the threshold. README
updated to reflect both the expanded aware list (now 22 primitives)
and this third bucket.
Tests: extend tests/test_effective_order.py to cover all 5 new
primitives (atan2, integer_pow, cumprod, cummax, cummin). 30 new
parametric cases, all passing. Total suite: 638 passed, 5 skipped.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6126dff commit 704298b
3 files changed
Lines changed: 46 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
258 | 260 | | |
259 | 261 | | |
260 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
482 | | - | |
| 482 | + | |
| 483 | + | |
483 | 484 | | |
484 | 485 | | |
485 | 486 | | |
| |||
488 | 489 | | |
489 | 490 | | |
490 | 491 | | |
| 492 | + | |
491 | 493 | | |
492 | 494 | | |
493 | 495 | | |
494 | 496 | | |
495 | 497 | | |
496 | 498 | | |
497 | 499 | | |
| 500 | + | |
| 501 | + | |
498 | 502 | | |
499 | 503 | | |
500 | 504 | | |
| |||
799 | 803 | | |
800 | 804 | | |
801 | 805 | | |
802 | | - | |
| 806 | + | |
803 | 807 | | |
804 | | - | |
| 808 | + | |
| 809 | + | |
805 | 810 | | |
806 | | - | |
| 811 | + | |
| 812 | + | |
807 | 813 | | |
808 | 814 | | |
809 | 815 | | |
| 816 | + | |
810 | 817 | | |
811 | 818 | | |
812 | 819 | | |
| |||
924 | 931 | | |
925 | 932 | | |
926 | 933 | | |
927 | | - | |
| 934 | + | |
928 | 935 | | |
929 | 936 | | |
930 | 937 | | |
931 | | - | |
| 938 | + | |
| 939 | + | |
932 | 940 | | |
933 | | - | |
934 | | - | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
935 | 945 | | |
936 | 946 | | |
937 | 947 | | |
938 | 948 | | |
| 949 | + | |
939 | 950 | | |
940 | 951 | | |
941 | 952 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
| |||
80 | 85 | | |
81 | 86 | | |
82 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
83 | 98 | | |
84 | 99 | | |
85 | 100 | | |
| |||
0 commit comments