From 504dc71aa048fa22d6cadfec4cbac408f1d90124 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Tue, 29 Sep 2026 15:12:52 +0200 Subject: [PATCH] HIP test: the batched indexer append within its contract (p0 + n <= max_cells) --- tests/hip/prefill_native_batch.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/hip/prefill_native_batch.cpp b/tests/hip/prefill_native_batch.cpp index d1aa13fa..df341d4a 100644 --- a/tests/hip/prefill_native_batch.cpp +++ b/tests/hip/prefill_native_batch.cpp @@ -274,8 +274,9 @@ int main() { // Covers every slot residue, partial and multiple block chunks, and the fixed-capacity tail. const std::array starts = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}; const std::array lengths = {1, 2, 3, 7, 17}; + // (the batched append's contract is p0 + n <= max_cells: the prompt path never appends past the cache) for (int64_t pos0 : starts) for (int64_t T : lengths) - ok = qsa_case(stream, 13, pos0, T, rng) && ok; + if (pos0 + T <= 13) ok = qsa_case(stream, 13, pos0, T, rng) && ok; ok = qsa_chunks_case(stream, rng, 33, 7, 17) && ok; // Production-scale, non-block-aligned first chunk with a short continuation. ok = qsa_chunks_case(stream, rng, 8210, 8193, 17) && ok;