test: raw-exchange uniform reference passes its raw buffer at launch

8e1feff set root.last_raw on the single-level reference, which also makes
FixedPatchStepper._hop accumulate a ledger the reference never allocated.
The adapter now substitutes the raw output pointer in the BlockCurvedBoundary
launch (argument 10, as the deleted adapter did) and leaves last_raw unset;
Jet column and force arms still come through the root level boundary.
Comparison unchanged; no production change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-10-27 01:18:41 +00:00
co-authored by Claude Opus 5.5
parent f520af8935
commit c6d5dc1cbc
@@ -239,16 +239,17 @@ class RawExchangeGPU(unittest.TestCase):
np.testing.assert_array_equal([v.dir for v in links], b.tables['dir'])
np.testing.assert_allclose([v.q for v in links], b.tables['q'], atol=2e-7, rtol=0)
# Same fine-grid force arms after translation to the same center: the
# single level's static BFL gets the AMR Jet column and raw ledger inputs.
# single level's static BFL gets the AMR Jet column and force arms; the raw
# output pointer is substituted at launch (no stepper-side accumulation).
root = uniform._level_boundaries[0]
velocity = uniform._upload(b.tables['surface_velocity'])
root.device.update(surface_velocity=velocity, rx=uniform._upload(b.tables['rx']),
ry=uniform._upload(b.tables['ry']))
root.last_raw = raw = uniform._allocate(count*16)
raw = uniform._allocate(count*16)
original = root.kernel
samples = []
def measured_boundary(*args, **kw):
original(*args, **kw)
original(*args[:10], raw, **kw) # BlockCurvedBoundary raw-exchange output
uniform._stream.synchronize()
samples.append(download(raw, (count, 4)))
root.kernel = measured_boundary