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++

mtp: HIP does not create the draft's unused shared-expert branch stream and two events (#1240)

rkcthac52c2c7542d
diff --git a/src/core/mtp.cpp b/src/core/mtp.cpp
index ea54cf4e2..3bbf16238 100644
--- a/src/core/mtp.cpp
+++ b/src/core/mtp.cpp
@@ -423,12 +423,15 @@ bool MtpDrafter::load(const std::string& rt_dir, const ModelGeometry& g, Session
cudaGetLastError();
#endif
if (!prio && cudaStreamCreateWithFlags(&cs_, cudaStreamNonBlocking) != cudaSuccess) { err = "mtp: stream"; return false; }
+#if !defined(STRATA_USE_HIP)
+ // HIP keeps the shared expert on cs_; only CUDA needs this branch stream.
if (cudaStreamCreateWithFlags(&side_, cudaStreamNonBlocking) != cudaSuccess ||
cudaEventCreateWithFlags(&sh_fork_, cudaEventDisableTiming) != cudaSuccess ||
cudaEventCreateWithFlags(&sh_join_, cudaEventDisableTiming) != cudaSuccess) {
err = "mtp: streams";
return false;
}
+#endif
const double files_s = std::chrono::duration<double>(std::chrono::steady_clock::now() - t_files).count();
if (shared != nullptr) {
std::fprintf(stderr, "strata mtp: shared draft weights, %.0f MiB of private state and buffers\n",