mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #289] [CLOSED] Start: name the GPU and stop at once when the build has no code for it; STRATA_EMULATE_CC #2555
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#2555
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/289
Author: @sergqwer
Created: 9/30/2026
Status: ❌ Closed
Base:
main← Head:pr/gpu-check-emulate📝 Commits (1)
c504d14Start: name the GPU and stop at once when the build has no code for it; STRATA_EMULATE_CC for tests📊 Changes
9 files changed (+85 additions, -4 deletions)
View changed files
📝
include/strata/core/device.hpp(+4 -0)➕
include/strata/core/emulate.hpp(+36 -0)📝
src/core/device.cu(+9 -0)📝
src/kernels/cuda/fused_gr.cu(+2 -0)📝
src/kernels/cuda/qsa.cu(+2 -0)📝
src/kernels/cuda/qsa_prompt_attn.cu(+6 -1)📝
src/kernels/cuda/qsa_select.cu(+6 -1)📝
src/prefill/ggml_cuda_host.cu(+3 -2)📝
src/program/generate.cpp(+17 -0)📄 Description
Summary
capability, and checks that the build has code for it (
cudaFuncGetAttributeson a kernel). A binary built forother GPUs used to fail at its first kernel, after the whole arena had loaded. Now it stops in ~0.3 s, names the
card and its
sm_, and says to rebuild (setup does).STRATA_EMULATE_CC=75|80|86|89, for tests. With a PTX build for an older generation (e.g.CMAKE_CUDA_ARCHITECTURES=86-virtual, JIT-compiled on a newer card), the host's device queries answer as thatcard: compute capability for ggml's MMQ configs and the QSA kernel choice, shared memory per block (64 KB on
Turing). The kernels are then the real card's, so their results are too, though their speed is not. This is how
the fork tested RTX 20/30/40 code paths on an RTX 5090.
STRATA_QSA_WARP=1|select|attn: the pre-sm_80 QSA kernels on any card, for A/B.Measured
On the fork, an sm_86-only build on the RTX 5090 stops in 0.3 s with the card's name. Emulated sm_75/86/89 builds
give first-token KL to the native sm_120a build of 0.0005 (sm_89), 0.0003 (sm_86) and 0.0034 (sm_75), all with the
same top-1. On main (IQ2_XS) the check prints the card and changes nothing else.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VZy1yKaDDiA8a7svdwaHio
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.