mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#4478
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/3151
Author: @gt50
Created: 10/19/2026
Status: ❌ Closed
Base:
main← Head:fix-qsa-scores-default📝 Commits (1)
a1ea109qsa: the default block-scores kernel without #2234's per-query keys; the batch rows get their own kernel📊 Changes
1 file changed (+33 additions, -14 deletions)
View changed files
📝
src/kernels/cuda/qsa_select.cu(+33 -14)📄 Description
On v0.1.45 a Radeon 8060S (gfx1151, Windows 11, ROCm 10.2.0a20260930) stalls in its first verify window when gfx1151's default switches are on. The engine prints
verify: an earlier window never finished on the GPU (#267)and "the GPU rang 0", the watchdog restarts it after 60 s, and no token comes out. It happens with a stock config and with mine. The installed 0.1.40.2 engine, with the same switches and config, does not stall.Cause:
f629fb04(#2234), itsqsa_select.cuchange.block_scores_multi_kernelis the kernel every decode window's QSA block scores run on. #2234 gave it a by-valueQsaScoreRowsargument (16 pointers and a count) and a per-query branch for the opt-inSTRATA_BATCH_ATTN_ROWSpath. Both apply with that switch off.Fix:
block_scores_multi_bodyis a template onOWN.OWNfalse) is the pre-#2234 kernel again, with noQsaScoreRowsargument and no branch.qsa_block_scores_rowslaunches a newblock_scores_multi_rows_kernel(OWNtrue).src/kernels/cuda/qsa_select.cu, +33/−14.How it was found
All on that Radeon 8060S, Qwen3.8-Flash-Next UD-IQ4_XS,
--spec 4 --mtp,--kv int8. Each trial was a fresh start, then a 14-token request withmax_tokens8. No answer in 30 s counted as a stall; a normal answer takes 0.4-0.7 s.STRATA_GFX1151_DEFAULTS=0and subsets turned on.STRATA_PLE_BATCHis on in every set that stalled. It needsSTRATA_LFUSEandSTRATA_TSUMorSTRATA_GDN_SPLITbeside it, and other switches change which set is enough. With the other 18 defaults on,STRATA_PLE_BATCH=0stops the stall.c8265fce, the commit just before v0.1.45 on main). So each step below used 3 starts.e8b1edbc"perf-PR group batch". Its parent5a6f4ed5answered 3 of 3. Inside the merge, the commits fromf629fb04up tof755a06ddo not build on HIP (qsa_decode_attn.cu;f755a06dfixes that). So each part was applied alone to the merge base296b59d2:296b59d2a2de7446(PleTable lock)f629fb04+739bc948+f755a06dqsa_decode_attnfiles (f755a06d's refactor)verify_kernels)qsa_select.cu/.hppchangeThe f-145-fix3 merge with #2622 answered 3 of 3, so the PLE gather change is not the cause. Several 0.1.45 merges do not build on Windows HIP without e6ad6c81's 4-line
hip_compatfix, which these tests applied.Checked with this change
On v0.1.45 (
477ac13c) plus this commit, on the same machine:batch_rows_paritypasses (it checksqsa_block_scores_rowsat 1, 2, 4 and 8 rows against one call per row, bitwise). So doqsa_parity,qsa_topk_parity,hip_native_qsa_scoreandverify_batch_parity.qsa_scores_gfx1100_paritybuilds and skips itself, since it is gfx1100 only.STRATA_PLE_BATCH=0.Not covered
if constexpr, as other.cufiles here already do.--batchandSTRATA_BATCH_ATTN_ROWS=1was not measured. Only its parity test ran.tools\hip\build_windows.bat testsstops athc_persist_parity.cpp. It uses POSIXsetenv/unsetenv, which this change does not touch.Found while testing #1916 on v0.1.45. cc @yi-sudo (#2234)
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.