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++
sm_70 (PR 1401): the Volta table, expert mode 8 and the fast norm/up are opt-in with STRATA_SM70_TABLE=1 until confirmed on a V100; default sm_70 behaviour as in 0.1.40.3
Niko1221c85b7c87b986
diff --git a/docs/NVIDIA_V100.md b/docs/NVIDIA_V100.mdindex e7480429b..15514a8ba 100644--- a/docs/NVIDIA_V100.md+++ b/docs/NVIDIA_V100.md@@ -81,3 +81,11 @@ sm_80.0.1.40 with the P100 as helper cache). One reporter's numbers each; this page's own kernel measurements are V100 only.- Volta's tensor cores take FP16 only: a model's BF16 weights are converted, and a weight outside FP16's range would saturate (none did inthe check above).++## The decode kernels measured on a V100 (opt-in: `STRATA_SM70_TABLE=1`)++The interleaved 2-4 column matvec with a Volta rows table, expert mode 8 and the latency-hidden norm/up (bitwise the default+kernels' output, GPU work per verify window 22.8 -> 21.2 ms on a V100-SXM2 in the contributor's measurement) are used on+sm_70 only when `STRATA_SM70_TABLE=1` is set. They become the default once the contributor has confirmed them on a V100 with+the 0.1.41 code. Without the variable sm_70 runs what 0.1.40.3 ran. The single switches (`STRATA_EXP_MODE`, `STRATA_MMVQ_IL`,+`STRATA_GR_FAST`) still apply on top.diff --git a/src/kernels/cuda/fused_gr.cu b/src/kernels/cuda/fused_gr.cuindex 0085be18c..bd0582436 100644--- a/src/kernels/cuda/fused_gr.cu+++ b/src/kernels/cuda/fused_gr.cu@@ -1645,7 +1645,7 @@ static bool gr_fast() {#if defined(__HIPCC__)return true;#else- return cur_dev_volta(); // CUDA: on Volta (V100-SXM2: 50.9 -> 46.7 us a read at T 1, bitwise); elsewhere opt-in+ { const char* v = std::getenv("STRATA_SM70_TABLE"); return cur_dev_volta() && v != nullptr && std::atoi(v) != 0; } // PR 1401: opt-in // CUDA: on Volta (V100-SXM2: 50.9 -> 46.7 us a read at T 1, bitwise); elsewhere opt-in#endif}#elsediff --git a/src/kernels/cuda/iq_kernels.cu b/src/kernels/cuda/iq_kernels.cuindex 509a780e3..7d42b69b6 100644--- a/src/kernels/cuda/iq_kernels.cu+++ b/src/kernels/cuda/iq_kernels.cu@@ -3419,7 +3419,8 @@ int exp_mode() {int major = 0, minor = 0;cudaDeviceGetAttribute(&major, cudaDevAttrComputeCapabilityMajor, dev);cudaDeviceGetAttribute(&minor, cudaDevAttrComputeCapabilityMinor, dev);- per_dev[dev] = 1 + (major == 7 && minor == 0 ? 8 : kExpModeDefault);+ const char* sm70 = std::getenv("STRATA_SM70_TABLE"); // PR 1401: Volta's mode 8 is opt-in until confirmed on a V100+ per_dev[dev] = 1 + (major == 7 && minor == 0 && sm70 != nullptr && std::atoi(sm70) != 0 ? 8 : kExpModeDefault);}return per_dev[dev] - 1;#endifdiff --git a/src/kernels/cuda/native_mmvq.cu b/src/kernels/cuda/native_mmvq.cuindex 364adeb18..069f7149c 100644--- a/src/kernels/cuda/native_mmvq.cu+++ b/src/kernels/cuda/native_mmvq.cu@@ -2591,6 +2591,8 @@ void native_mmvq_il_tune(int rows) { g_tune_rows = rows; }namespace {// sm_80 and newer (measured on sm_86 and sm_120) and Volta (sm_70, its own table above); Pascal/Turing keep// native_mmvq's kernels unchanged+// Volta (PR 1401): opt-in with STRATA_SM70_TABLE=1 until the author confirms on a V100 with the final code+bool sm70_opt_in() { const char* v = std::getenv("STRATA_SM70_TABLE"); return v != nullptr && std::atoi(v) != 0; }bool il_arch_ok() {static int ok[16] = {}; // 0 unknown, 1 yes, -1 no, by device ordinalint dev = 0;@@ -2600,7 +2602,7 @@ bool il_arch_ok() {int minor = 0;cudaDeviceGetAttribute(&minor, cudaDevAttrComputeCapabilityMinor, dev);ok[dev] = (cudaDeviceGetAttribute(&major, cudaDevAttrComputeCapabilityMajor, dev) == cudaSuccess &&- (major >= 8 || (major == 7 && minor == 0))) ? 1 : -1;+ (major >= 8 || (major == 7 && minor == 0 && sm70_opt_in()))) ? 1 : -1;}return ok[dev] > 0;}