Pull requests / #101

#101 build: allow sm_70 (Volta) builds — the only sm_80+ dependency is unreferenced

closed · @eightman999 · 0 comentários · No GitHub

BenchmarksNVIDIA / CUDAModels & quantsLinux

Descrição

## English

**What**: relax the `CMAKE_CUDA_ARCHITECTURES` floor from sm_80 to sm_70, and exclude `src/kernels/cuda/native_qsa_score.cu` when building for sm_70.

**Why it works**: `native_qsa_score.cu` is the only TU using sm_75+/sm_80+ instructions (`ldmatrix`, `mma.sync` TF32). It fails `ptxas` on sm_70 (`Feature 'ldmatrix' requires .target sm_75 or higher`), but nothing in the runtime references its symbols — no `set_enabled` path, no call sites. Every other kernel uses portable intrinsics (custom BF16 bit conversion, FP16 atomics) and compiles clean for sm_70.

**Verified on**: Tesla V100-PCIE-32GB (sm_70), CUDA 12.x, Linux — `Qwen3.8-Flash-Next` Q2_0 loads, generates correct output, and sustains ~47-52 tok/s decode at 18K context with ~20K resident experts (26 GiB expert cache). Correctness sanity-checked (arithmetic + reasoning output).

**Caveat for maintainers**: sm_70 is only *buildable* — this PR does not claim Volta as a supported tier. If `native_qsa_score.cu` gains a live call path later, the `STRATA_SM70` exclusion will need a fallback or the file will need `#if __CUDA_ARCH__ >= 800` guards instead.

## 日本語

**内容**: `CMAKE_CUDA_ARCHITECTURES` の下限を sm_80 から sm_70 に緩和し、sm_70 ビルド時のみ `src/kernels/cuda/native_qsa_score.cu` をソースから除外します。

**動く理由**: sm_75+/sm_80+ 専用命令(`ldmatrix`、`mma.sync` TF32)を使うのは `native_qsa_score.cu` のみです。このファイルは sm_70 の `ptxas` で確実に失敗しますが、実行時に参照するコードパスが存在しないデッドコードです。他のカーネルはポータブルな実装(独自 BF16 ビット変換・FP16 atomic など)で、sm_70 でクリーンにコンパイルされます。

**検証環境**: Tesla V100-PCIE-32GB(sm_70)、CUDA 12.x、Linux。`Qwen3.8-Flash-Next` Q2_0 がロード・正常生成し、18K コンテキストで decode ~47-52 tok/s を維持(エキスパート ~20K 個・26 GiB 常駐)。算術+推論出力で正答を確認済み。

**注意点**: この PR は「sm_70 でビルド可能」を主張するもので、Volta の正式サポートを提案するものではありません。将来 `native_qsa_score.cu` に生きた呼び出し経路ができた場合、`STRATA_SM70` 側にフォールバック実装か `#if __CUDA_ARCH__ >= 800` ガードが必要になります。

No site

Links install, modelos, releases.