mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4769] [Engine] sm_52 build: leave the GP100-only weight-stationary down kernels empty below sm_53 #5174
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#5174
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/4769
Author: @roshanraj
Created: 10/31/2026
Status: 🔄 Open
Base:
main← Head:maxwell-sm52-ws-down-guard📝 Commits (1)
f257853[Engine] sm_52 build: leave the GP100-only weight-stationary down kernels empty below sm_53📊 Changes
1 file changed (+8 additions, -0 deletions)
View changed files
📝
src/prefill/moe_ws_down.cu(+8 -0)📄 Description
Problem and result
The Maxwell (sm_52) recipe in
docs/OLDER_GPUS.mddoes not build on currentmain(870aedd):stops in
CMakeFiles/strata_mmq.dir/src/prefill/moe_ws_down.cu.owith 400 errors of the formmoe_ws_down.cu(the GP100 weight-stationary down kernels) uses HFMA2, which ptxas accepts from sm_53. With this change thebuild completes and the engine runs on a Tesla M40 (sm_52).
Related discussion
Refs #3218 (lower the architecture floor for Maxwell). The sm_52 floor itself is already in
CMakeLists.txt(61ede87e); thisonly fixes the compile error that remains behind it. No scope change:
setup.pystill refuses Maxwell, as inc966d7ad("Maxwell gets a warning withthe build recipe, not an env switch"), and the closed Maxwell PRs (#3595, #3596) are not revived.
Approach
moe_ws.hppsays these kernels are for GP100 only, andws::mode()returns 0 on any other card, so on sm_52 they are neverlaunched. The file is wrapped in
#if !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 530: the device pass is empty below sm_53,the host pass (launch code, which
prefill.cpplinks against) is unchanged. 530 is the ISA limit ptxas reports, not a tuningchoice. I checked the other three
moe_ws*.cufiles: they compile unguarded for sm_52, so they are left alone.Validation
Environment: Tesla M40 24 GB (sm_52), driver 580.159.03, Ubuntu 24.04 VM, gcc 13.3, CUDA 12.9.86, cmake 4.4.4, Strata
main870aeddplus this commit. Setup's own build of the engine was used for the run below; to let setup accept a 5.2 card I changedsm60_card()locally. That change is not part of this PR.Passed:
moe_ws*.cufor sm_52 on its own with the build'sexact flags:
moe_ws.cu,moe_ws_gu_iq2.cu,moe_ws_gu_iq3.cucompile;moe_ws_down.cufails (400 ptxas errors).-DSTRATA_EXPERIMENTAL_SM60=ON, arch 52) completes and links, with all fourmoe_ws*.cuobjects rebuilt.moe_ws_down.cufor sm_61, sm_75 and sm_86 with the build's flags, before and after, givesidentical
cuobjdump -sassinstruction streams (12384 / 16160 / 16240 instructions).was correct, and
is_prime(n)came back as a complete, correct function. One run each,temperature0; the 140-token code answer took 9.7 send to end. That is a smoke test, not a benchmark under the community protocol.
Failed: nothing else observed. (Before the change: the build failure above.)
Not run:
sm_60+ unchanged by construction, and the SASS check above covers sm_61/75/86 only.
STRATA_BUILD_TESTS=ON.Limits
Maxwell is still only a hand build; this does not change
setup.pyor add a ready-made engine.Prepared with Claude Code (AI-assisted): the diff is 8 lines in one file; the commands and results above were run on the machine described.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.