Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

decode_cluster_parity: wait for every upload before the graph replays and timings use it (#548, as #536)

Niko122194705a1463cb
diff --git a/src/kernels/decode_cluster_parity.cpp b/src/kernels/decode_cluster_parity.cpp
index 480322985..665fe6fa7 100644
--- a/src/kernels/decode_cluster_parity.cpp
+++ b/src/kernels/decode_cluster_parity.cpp
@@ -58,6 +58,9 @@ template <typename T> struct Dev {
~Dev() { cudaFree(p); }
void put(const std::vector<T>& h) {
ck(cudaMemcpy(p, h.data(), h.size() * sizeof(T), cudaMemcpyHostToDevice), "up");
+ // #548 #536: a pageable cudaMemcpy can return before its DMA lands, and the graph replays and the timing
+ // cases run on a cudaStreamNonBlocking stream that does not wait for the legacy stream - so wait here
+ ck(cudaDeviceSynchronize(), "up landed");
}
std::vector<T> get() const {
std::vector<T> h(n);