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

generate: decode_defaults_arch_ok() (gfx1200/gfx1201 on HIP, always on CUDA) for the HIP decode defaults

Niko1221606eb1080c79
diff --git a/src/program/generate.cpp b/src/program/generate.cpp
index 99fc2e214..52a209276 100644
--- a/src/program/generate.cpp
+++ b/src/program/generate.cpp
@@ -36,6 +36,7 @@
#include "strata/core/layout.hpp"
#include "strata/core/session.hpp"
#include "strata/core/weights.hpp"
+#include "strata/kernels/gfx_arch.hpp"
#include "strata/kernels/cpu/expert.hpp"
#include "strata/kernels/cpu/pool.hpp"
#include "strata/platform/aux_cpus.hpp"
@@ -1534,6 +1535,19 @@ bool load_control_vectors(const Options& o, const strata::core::ModelGeometry& g
return true;
}
+// 0.1.43: the HIP defaults of the decode speed push (route tail skip, measured PCIe share) were measured on gfx1201 (Radeon AI PRO
+// R9700) and apply on gfx1200 / gfx1201 only; every other AMD part (gfx11, gfx906, ...) keeps its earlier behaviour. CUDA: always true.
+[[maybe_unused]] static bool decode_defaults_arch_ok() {
+#if defined(STRATA_USE_HIP)
+ int dev = 0;
+ cudaDeviceProp p{};
+ return cudaGetDevice(&dev) == cudaSuccess && cudaGetDeviceProperties(&p, dev) == cudaSuccess &&
+ strata::kernels::gfx_arch_is_gfx12_wmma(p.gcnArchName);
+#else
+ return true;
+#endif
+}
+
// The effective host->device bandwidth of the PCIe link: copies from pinned host memory, as the expert arena's
// reads are. The native default share (0.55) was measured on x16 links (~26-28 GB/s); a x8 card in a x8 slot
// carries about half of that. Returns < 0 when the probe cannot run (then the caller keeps the default).