From c6d5dc1cbc1f3c57b272a977acffed65851ef04e Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 27 Oct 2026 01:18:41 +0000 Subject: [PATCH] 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 --- tests/validation/multigrid/test_raw_exchange_gpu.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/validation/multigrid/test_raw_exchange_gpu.py b/tests/validation/multigrid/test_raw_exchange_gpu.py index 25ec7ad..724fbaa 100644 --- a/tests/validation/multigrid/test_raw_exchange_gpu.py +++ b/tests/validation/multigrid/test_raw_exchange_gpu.py @@ -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