mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4406] [Engine] build v0.2.7 with nvcc 12.0: leave out the opt-in WideBatch prefill kernels (kernel parameters over 4096 bytes) #5035
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#5035
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/4406
Author: @nomishbhardwaj
Created: 10/28/2026
Status: 🔄 Open
Base:
main← Head:fix/cuda120-prefill-wide-params📝 Commits (1)
6d81f39prefill fused IQ: build with nvcc 12.0 (kernel parameters over 4096 bytes)📊 Changes
1 file changed (+22 additions, -0 deletions)
View changed files
📝
src/prefill/moe_fused_iq.cu(+22 -0)📄 Description
Problem and result
v0.2.7 (
5e8a4cca) no longer compiles with nvcc 12.0.src/prefill/moe_fused_iq.cufails for every WideBatch instance ofnative_kernel(NT = 256) andnative_ws_kernel:nvcc before 12.1 caps kernel parameters at 4096 bytes; 12.1 raised the limit to 32764. The
WideBatch+NativeGeom+Tablesparameters of these kernels take 4216.setup.sh --setup --buildstops and keeps the previous engine binary. v0.2.6 built fine on the same machine. This is the same class as #2322 / #3368 (CUDA 12.0/12.1 builds), in a new file.With this change, v0.2.7 builds and runs with nvcc 12.0.140. The default prefill kernels are unchanged. Only the opt-in WideBatch kernels (
STRATA_PF_FUSED_NT=256,STRATA_PF_FUSED_F16=1,STRATA_PF_FUSED_WS=1) are left out of such a build. Asking for them prints the existing "... is not available here" line and the engine keeps the default path.Related discussion
none (focused build fix)
Approach
STRATA_PF_WIDE_PARAMSis 0 when compiling with nvcc older than 12.1 (__CUDACC_VER_MAJOR__/__CUDACC_VER_MINOR__) and 1 otherwise. It is defined outside the CUDA-only host block, so HIP and nvcc 12.1+ builds see 1 and compile exactly as before. When it is 0:setup_nt()andsetup_ws()return false, soocc_ntstays 0 andwsstays false.native_wide()is false, and the widelaunch()overload is never reached.launch()body is compiled out, so the WideBatch instances are never instantiated.I picked this over shrinking the parameter block (moving
TablesorWideBatchto constant memory or behind a pointer) because that would change the default kernels and their launch path for every toolchain. Older toolkits only lose opt-in kernels.Validation
Passed:
./setup.sh --setup --build --yes --no-start --model IQ2_XS --vision gpuon v0.2.7 + this commit. Ubuntu 24.04, nvcc 12.0.140 (Ubuntunvidia-cuda-toolkit), driver 580.159.03, RTX 3090 (sm_86), i7-10700F, 62 GB RAM.engine/strata --versionreportsstrata 0.1.52, BUILD.json archs [86]. The same build without this commit fails with the errors above.--kv-resident 32768. One server life per setting, withSTRATA_PF_FUSED_NT=256,STRATA_PF_FUSED_WS=1andSTRATA_PF_FUSED_F16=1each set alone. The log printsprefill fused experts (native): STRATA_PF_FUSED_NT=256 is not available here, and... STRATA_PF_FUSED_WS=1 is not available here. In each setting, 8 greedy prompts (160 tokens, one with a ~3K-token prompt) gave output byte-identical to the default setting.tools/needle_bench.py)Failed:
none observed
Not run:
tests/cuda/prefill_fused_iq_test(I built withSTRATA_BUILD_TESTS=OFF).Limits
A build with nvcc 12.0 has no
STRATA_PF_FUSED_NT=256/_F16/_WS. Getting them back on 12.0 would need the parameter block below 4096 bytes. If you would rather do that, or drop 12.0 support, I'm happy to close this.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.