From 10f44a98d541cc7a4e60cdb8eda9873700e0d066 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Tue, 6 Oct 2026 13:19:15 +0200 Subject: [PATCH] tests/hip: prefill_mmq_parity initializes its output sentinel on the product's stream A plain hipMemset runs on the null stream, which a non-blocking stream does not wait for; on a Radeon 8060S (gfx1151, Windows) the memset landed after the MMQ kernel and left only the sentinel. hipMemsetAsync on the same stream orders it. Taken from PR #919's Windows gfx1151 port; its other pieces are not taken here (the Windows carve-out accounting needs a Windows gfx1151 run). Co-authored-by: Stormace <25710168+storm-ace@users.noreply.github.com> --- tests/hip/prefill_mmq_parity.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/hip/prefill_mmq_parity.cpp b/tests/hip/prefill_mmq_parity.cpp index 00946e88..c477d5b3 100644 --- a/tests/hip/prefill_mmq_parity.cpp +++ b/tests/hip/prefill_mmq_parity.cpp @@ -137,7 +137,10 @@ Metrics run_product(Context & ctx, hipStream_t stream, const std::string & name, hip_check(hipMemcpy(ddst.p, dst_ids.data(), dst_ids.size() * sizeof(int32_t), hipMemcpyHostToDevice), "copy dst ids"); hip_check(hipMemcpy(dbounds.p, bounds.data(), bounds.size() * sizeof(int32_t), hipMemcpyHostToDevice), "copy bounds"); hip_check(hipMemcpy(dw.p, w.data(), w.size(), hipMemcpyHostToDevice), "copy weights and zero tail"); - hip_check(hipMemset(dy.p, 0xff, (size_t) rows * (size_t) out_rows * sizeof(float)), "initialize output sentinel"); + // On the product's stream: a plain hipMemset runs on the null stream, which a non-blocking stream does not wait + // for - on a Radeon 8060S (gfx1151, Windows) it landed after the MMQ kernel and left only the sentinel + hip_check(hipMemsetAsync(dy.p, 0xff, (size_t) rows * (size_t) out_rows * sizeof(float), stream), + "initialize output sentinel"); quantize(dx.as(), dsrc.as(), dxq.p, (int) type, cols, cols, rows, (void *) stream); const int max_rows = *std::max_element(counts.begin(), counts.end());