mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1465] [CLOSED] cuda: retain HC norm products in existing scratch #3475
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#3475
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/1465
Author: @W1nge
Created: 10/7/2026
Status: ❌ Closed
Base:
main← Head:codex/hc-norm-input-reuse📝 Commits (1)
e952756cuda: retain HC norm products in existing scratch📊 Changes
1 file changed (+8 additions, -16 deletions)
View changed files
📝
src/kernels/cuda/fused_gr.cu(+8 -16)📄 Description
The split/staged HC normalization reads the residual twice and recomputes a pending write after its reduction. Store the unscaled R * norm product in the existing xn scratch during the first pass, then scale it in place. The reduction order and two multiplication roundings stay unchanged. This extracts the useful part of our local stream-norm path without adding another kernel variant or tuning flag.
Validation on RTX 2080 Ti (sm_75), Windows/MSVC, driver 560.94:
The existing internal selftest can be run in a small CUDA TU including src/kernels/cuda/fused_gr.cu, calling fused_gr_selftest(ok, why), and requiring ok[1], ok[2], ok[3]. This checks the actual production kernels. No changes to public APIs, allocation sizes or hardware selection.
Based directly on
d5ea713, independent of the prefill memory and prompt-reuse PRs.Validation update (2026-10-08): a complete current-main integration build including #1451, #1454, #1455, #1457 and #1465 passed four real IQ3_XXS model baseline/integration pairs on RTX 2080 Ti: default, GR_UNFUSED, PREFILL_BF16X2 and legacy RING_BYTES modes. Each used INT8 KV, 194 input tokens, two prefill chunks and 8 output tokens; all runs exited successfully and output IDs matched within each pair. A 256K configured-context startup and short generation also passed (this did not fill a 256K prompt). These are combined regression checks, not an isolated performance result or exhaustive state equality. Other hardware/backends remain untested. The earlier draft-only status reflected the absence of any current-main model run; now requesting review with these limits explicit.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.