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>
This commit is contained in:
1 parent
ada22464d3
commit
10f44a98d5
1 file changed
+4
-1
@@ -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<float>(), dsrc.as<int32_t>(), dxq.p, (int) type, cols, cols, rows, (void *) stream);
|
||||
const int max_rows = *std::max_element(counts.begin(), counts.end());
|
||||
|
||||
Reference in new issue
Block a user