mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #88] [CLOSED] Pascal port: lower the CUDA floor to sm_61 (GTX 10 series) #2448
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2448
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/88
Author: @hireymage
Created: 9/28/2026
Status: ❌ Closed
Base:
main← Head:pascal-sm61📝 Commits (2)
e89bda3Turing port: run on RTX 20 (sm_75) and newer833f5f6Pascal port: lower the floor to sm_61 (GTX 10 series)📊 Changes
11 files changed (+182 additions, -23 deletions)
View changed files
📝
CMakeLists.txt(+6 -4)📝
include/strata/artifact/gguf_reader.hpp(+3 -0)📝
include/strata/kernels/ngram.hpp(+6 -6)📝
include/strata/prefill/gemm.hpp(+10 -1)📝
setup.py(+2 -2)📝
src/core/device.cu(+8 -6)📝
src/kernels/cuda/elementwise.cu(+6 -0)📝
src/kernels/cuda/fused_gr.cu(+36 -3)📝
src/kernels/cuda/native_qsa_score.cu(+39 -1)📝
src/kernels/cuda/verify_kernels.cu(+6 -0)📝
src/prefill/gemm.cu(+60 -0)📄 Description
Follow-up to #87 (Turing port, sm_75) - this one is stacked on that branch, so the diff below shows both; once #87 merges, this PR's diff shrinks to just the Pascal delta. Files touched by this branch: CMakeLists.txt, setup.py, src/core/device.cu, src/prefill/gemm.{hpp,cu}, src/kernels/cuda/{elementwise,verify_kernels}.cu, include/strata/{artifact/gguf_reader,kernels/ngram}.hpp.
What Pascal (sm_61) is missing, and what this adds
Developed and measured on a GTX 1080 Ti (sm_61, CUDA 12.6, Linux), running the 125B Q2_0 pack end to end. All changes are runtime-guarded, so the sm_80+ path stays bit-identical.
Gemm::bf16- cuBLAS has no BF16 GEMM below sm_80. On cc < 70 both operands are converted to FP32 (a lossless 16-bit shift per element) and the same GEMM runs overCUDA_R_32F. Converted weights are cached per device pointer (the arena keeps weight pointers stable); activations are converted per call into a grown-on-demand buffer. Measured prefill slowdown ~2x on Pascal - expected, FP32 GEMM without tensor cores.doorbell_wait_kernel/wait_flag_ge_kernel-__nanosleeplanded with Volta (sm_70); pre-sm_70 builds spin with a bare__threadfence()instead (one thread, waiting on host-published memory).GgufFile::open(Linux) -madvise(MADV_RANDOM)on the GGUF mapping: token gathers 16 rows scattered over the whole file, so read-ahead is pure waste. Guarded by#ifdef MADV_RANDOM. Thengram.hppcomment now documents the Linux/Windows split instead of claiming there is no Linux.Verification on the 1080 Ti
-DCMAKE_CUDA_ARCHITECTURES=61: 181/181 targets, 0 errors.strata-deviceon the card:compute capability 6.1 (sm_61).Same note as #87: the sm_120 card I developed on is the author's documented target, so the Ampere+ path is unchanged by construction - every fallback sits behind a
__CUDA_ARCH__ >= 700/cc_major < 70/cc_major < 80guard.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.