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++
HIP: time the PCIe probe on the host on Windows
BlueKingMuche52051dc71fc
diff --git a/src/program/generate.cpp b/src/program/generate.cppindex c447dd767..609179ba4 100644--- a/src/program/generate.cpp+++ b/src/program/generate.cpp@@ -971,12 +971,24 @@ double probe_pcie_h2d_gbps() {}std::memset(h, 0, kBytes); // fault the pages in before timingcudaMemcpyAsync(d, h, kBytes, cudaMemcpyHostToDevice); // warmup: context up, copy engine primed+#if defined(STRATA_USE_HIP) && defined(_WIN32)+ // Windows HIP: the events do not bracket the copies there (an RX 6800 read 3,300-26,000 GB/s, so every link kept+ // the x16 share), so the copies are timed on the host: 1 GiB takes tens of milliseconds, so the synchronize+ // around them hardly matters+ const bool warm = cudaDeviceSynchronize() == cudaSuccess;+ const Clock::time_point t0 = Clock::now();+ for (int i = 0; i < kIters; ++i) cudaMemcpyAsync(d, h, kBytes, cudaMemcpyHostToDevice);+ const bool ok = warm && cudaDeviceSynchronize() == cudaSuccess;+ const float ms = (float) std::chrono::duration<double, std::milli>(Clock::now() - t0).count();+ const bool timed = ok && ms > 0.01f;+#elsecudaEventRecord(ev0);for (int i = 0; i < kIters; ++i) cudaMemcpyAsync(d, h, kBytes, cudaMemcpyHostToDevice);cudaEventRecord(ev1);const bool ok = cudaEventSynchronize(ev1) == cudaSuccess;float ms = 0.f;const bool timed = ok && cudaEventElapsedTime(&ms, ev0, ev1) == cudaSuccess && ms > 0.01f;+#endifconst double bw = timed ? ((double) kIters * (double) kBytes / (ms * 1e-3)) / 1e9 : -1.0;cudaEventDestroy(ev0);cudaEventDestroy(ev1);