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++
ple_land: the rows' upload, its event and the wait before a refill are checked
sergiywith067c9362c893
diff --git a/src/prefill/prefill.cpp b/src/prefill/prefill.cppindex d7b9a33c0..ff069fc4f 100644--- a/src/prefill/prefill.cpp+++ b/src/prefill/prefill.cpp@@ -1197,10 +1197,18 @@ bool Prefill::run(const int64_t* tokens, int64_t n, int64_t pos0, std::string& eerr = ple_next_err;return false;}- cudaMemcpyAsync(m.ple_emb, m.ple_emb_host[ple_buf], (size_t) T * N * 4, cudaMemcpyHostToDevice, m.cs);- cudaEventRecord(m.ple_copied[ple_buf], m.cs);+ if (cudaMemcpyAsync(m.ple_emb, m.ple_emb_host[ple_buf], (size_t) T * N * 4, cudaMemcpyHostToDevice, m.cs) !=+ cudaSuccess ||+ cudaEventRecord(m.ple_copied[ple_buf], m.cs) != cudaSuccess) {+ err = std::string("prefill: the PLE rows' upload failed: ") + cudaGetErrorString(cudaGetLastError());+ return false;+ }if (c0 + m.T < n) {- cudaEventSynchronize(m.ple_copied[ple_buf ^ 1]); // the other buffer's upload (a chunk ago) is done+ // the other buffer's upload (a chunk ago) is done before the SSD thread refills it+ if (cudaEventSynchronize(m.ple_copied[ple_buf ^ 1]) != cudaSuccess) {+ err = std::string("prefill: the PLE rows' upload failed: ") + cudaGetErrorString(cudaGetLastError());+ return false;+ }ple_next = std::async(std::launch::async, [&ple_gather, &ple_next_err, c1 = c0 + m.T, b = ple_buf ^ 1] {return ple_gather(c1, b, ple_next_err);});