Commit d3638da
committed
feat: xp-ify BrightnessZeroth — fixes AdaptSplitZeroth under JAX
BrightnessZeroth's pixel_signals_from call dropped the xp backend (the same
bug class as the ExponentialKernel fix), raising TracerArrayConversionError
under jax.jit/jax.grad on every mesh — including through AdaptSplitZeroth,
whose zeroth leg routes through it. With xp threaded, AdaptSplitZeroth is
FD-certified on the KNN meshes (8.2e-8 max rel err, jit-consistent to
3e-16). Standalone BrightnessZeroth traces and differentiates but is a
supplement by design (weights vanish on high-signal pixels, leaving the
system singular alone) — documented in the docstring.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013FSqnkgZv97PU9JdkCcthy1 parent e3e277f commit d3638da
2 files changed
Lines changed: 17 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
89 | 94 | | |
90 | 95 | | |
91 | 96 | | |
| |||
120 | 125 | | |
121 | 126 | | |
122 | 127 | | |
123 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
124 | 131 | | |
125 | 132 | | |
126 | 133 | | |
| |||
0 commit comments