mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1758] [Feature]: fail the test build when a release-engine CUDA kernel spills registers or uses local memory (per sm_) #700
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#700
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?
Originally created by @Avicennasis on GitHub (Oct 9, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1758
What do you want to do?
A build-time check that fails
STRATA_BUILD_TESTSwhen a CUDA kernel in the release engine spills registers to local memory or uses local memory at all, per architecture inCMAKE_CUDA_ARCHITECTURES.Why. Strata now carries per-architecture kernel tables and recently found two defects that were compiler-output facts rather than source facts: #1522 (
gdn_l2_kernelcompiles without the fma the fused kernel spells out on CUDA 13.3 / sm_120) and #1469 (Pascal decode regression). A register spill is the same kind of fact: it shows up inptxas -voutput and nowhere in the source, it varies by toolkit andsm_, and it costs decode throughput silently. Today nothing in the tree reads that output (git grep -i 'ptxas\|spill\|resource-usage'onfb58e0dfinds only the SYCL docs and the conversation-cache "spilled" event).Shape. Build the kernel translation units with
-Xptxas -v(or--resource-usage) in the test configuration, capture the per-kernel lines, and fail whenspill stores/spill loadsis non-zero orlmemis non-zero for a kernel on an allow-list of the hot decode/prefill kernels (tests/cuda/already names the prefill fused IQ/MoE/MMQ kernels). A kernel that legitimately needs local memory gets an entry in a short exceptions table with the number it is allowed, so a change that adds a spill is a red test with the kernel's name, thesm_, and the two numbers in the message. This is how DeepGEMM gates its kernels (DG_JIT_CHECK_NO_SPILLS/DG_JIT_CHECK_NO_LOCAL_MEMORY, asserted in its sanitizer run), and it needs no GPU at test time: the numbers come from the compiler, so it runs wherever the engine is built.What I have not measured. I have not run
ptxas -vover Strata's kernels, so I am not reporting that any kernel spills today; this asks for the gate, not a fix. If you want it, I can send a PR that adds the capture and the allow-list with the numbers from an sm_86 and an sm_120 build, so the first run documents the current state rather than failing on it. Where in the tree the capture should live (a CMake option next toSTRATA_BUILD_TESTS, or atools/script over the build log) is your call.@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.