mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1742] [CLOSED] CUDA SM86: opt-in one-superblock prefetch build #3642
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#3642
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/1742
Author: @InB4DevOps
Created: 10/9/2026
Status: ❌ Closed
Base:
main← Head:perf/cuda-prefill-prefetch-one📝 Commits (3)
93dcf97CUDA prefill: opt-in one-superblock weight prefetchfee8346CUDA prefill: isolate SM86 prefetch behind a build optionfab43d0setup: offer opt-in SM86 prefill builds📊 Changes
16 files changed (+5674 additions, -16 deletions)
View changed files
📝
.gitignore(+4 -0)📝
CMakeLists.txt(+14 -1)📝
docs/DETAILS.md(+9 -0)📝
docs/INSTALL.md(+5 -0)➕
docs/INSTALL_SM86_PREFILL.md(+102 -0)➕
docs/benchmarks/2026-10-09-rtx3060-prefetch-one/README.md(+133 -0)➕
docs/benchmarks/2026-10-09-rtx3060-prefetch-one/cuda-only-evidence.json(+2016 -0)➕
docs/benchmarks/2026-10-09-rtx3060-prefetch-one/cuda-only-parity.log(+369 -0)➕
docs/benchmarks/2026-10-09-rtx3060-prefetch-one/evidence.json(+2014 -0)➕
docs/benchmarks/2026-10-09-rtx3060-prefetch-one/isolated-parity.log(+227 -0)➕
docs/benchmarks/2026-10-09-rtx3060-prefetch-one/prompts.json(+14 -0)📝
setup.py(+166 -15)➕
src/prefill/cuda/moe_fused_iq_prefetch_sm86.cu(+81 -0)➕
src/prefill/cuda/native_fused_iq_sm86.cuh(+244 -0)➕
tools/test_cuda_prefill_variant.py(+47 -0)➕
tools/test_setup_sm86_prefill.py(+229 -0)📄 Description
Summary
Add the off-by-default
STRATA_CUDA_SM86_PREFETCH_ONECMake option. With anexplicit CUDA architecture 86 target, it builds a CUDA-only specialization for the
existing native fused path. Runtime opt-in remains
STRATA_PF_FUSED=1 STRATA_PF_PREFETCH_ONE=1.Gate/up weights are prefetched one superblock ahead instead of two.
Updated scope: the initial draft edited shared CUDA/HIP source. That edit and
the shared C++ test change have now been completely reverted. The new translation
unit is selected only inside the CUDA CMake branch, with an additional runtime
SM86 check. HIP's implementation/build branch and SYCL's build remain unchanged;
there is no HIP change to build. Other CUDA devices use the original implementation.
SM86 includes more cards than the 3060; measurements remain 3060-specific. Windows
and other GPU hardware have not been tested.
What changed
Installer integration (separate commit
fab43d04)Eligible NVIDIA users now get an off-by-default setup question, or can use:
Setup detects architecture 86 as before, selects the build option, bypasses plain
prebuilt engines, and writes the required fused/runtime settings. It keeps the
choice through starts and updates. Dedicated engine/build directories avoid
replacing another model's engine; the build metadata/cache includes the variant.
--sm86-prefill offreturns to normal engine selection and restores the earlierfused-path setting.
--yesalone does not enable it. No manual CMake/env editingis needed for installer users. Details:
docs/INSTALL_SM86_PREFILL.md.Installer validation: 98 relevant setup tests pass, including default-config
goldens, simulated Windows/Linux behavior, cache invalidation, opt-out, starts and
updates. Full setup discovery also found two existing checksum-caller test failures
from an unmocked HTTP HEAD/404; both reproduce on untouched
fb58e0dband are notintroduced by this integration.
Kernel and measurement commits
and the fallback by including the unchanged original implementation. Down keeps
its original instance. The specialized body must retain the original arithmetic.
evidence, and final isolated validation results.
No activation-stage, tile/grid, residency, decode, model/setup-default or HIP-kernel
policy change. This branch is independently based on
fb58e0dband contains noneof the other experimental engine patches.
Measured evidence
RTX 3060 12 GB / 100 W, i7-12700KF AVX2, Linux, CUDA 13.4.92, native IQ3_XXS,
explicit 4096-token prefill and static residency. Six balanced pairs per realistic
prompt, 128 generated tokens:
All 18 pairs had identical token IDs and draft counts, with within-arm repeatability.
Three independent fixed-work process pairs per shape gave +1.71–6.52% across
twelve format/size combinations; all 36 shape/process pairs were faster with matching hashes.
These are prototype measurements of the same policy, not inflated to represent
the separate MMQ-to-fused speedup. The isolated extraction's tests/smoke pairs are
reported separately. A/A controls had near-zero medians but individual outliers up
to about +/-1.5%; all outliers remain in the evidence. No broad GPU/model/default
or quality-equivalence claim is made.
Validation
strataandprefill_fused_iq_test.default-build fingerprint comparison; existing FP64/MMQ numerical checks retained.
token IDs, draft counts and repeatability checked.
git diff --check.Details and commands:
docs/benchmarks/2026-10-09-rtx3060-prefetch-one/README.md.Current validation:
cuda-only-evidence.jsonandcuda-only-parity.log; historicalprototype/initial extraction:
evidence.jsonandisolated-parity.log. Exact prompts are included.The separate IQ3-only stage-buffering proposal (#1744) touches the same kernel but is not
a dependency. Combining the two opt-ins requires its own validation.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.