diff --git a/src/kernels/decode_cluster_parity.cpp b/src/kernels/decode_cluster_parity.cpp index 48032298..665fe6fa 100644 --- a/src/kernels/decode_cluster_parity.cpp +++ b/src/kernels/decode_cluster_parity.cpp @@ -58,6 +58,9 @@ template struct Dev { ~Dev() { cudaFree(p); } void put(const std::vector& 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 get() const { std::vector h(n);