Repository navigation
cleanup(rocm): drop W4A16 prefill dispatcher diary and experiment env hooks - #48
Closed
BlivionIaG wants to merge 1 commit into
Closed
BlivionIaG wants to merge 1 commit into
BlivionIaG wants to merge 1 commit into
Conversation
… hooks The two config-selection essays contradicted each other, and the three VLLM_RDNA2_PREFILL_* hooks only existed for finished experiments. Default select_config branches and compute_split_k dispatch are unchanged. Co-authored-by: Cursor Agent <cursoragent@cursor.com>
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Subtraction-only cleanup of fork-owned W4A16 prefill dispatch in
csrc/rocm/q_gemm_rdna2_prefill.cu. Two stacked comments aboveselect_configcontradicted each other, and threeVLLM_RDNA2_PREFILL_*getenv hooks existed only for finished experiments. Default dispatch is unchanged when those variables are unset.No other file is modified. This does not touch the QSA kernel, W4A8 sources,
rdna_allreduce.cu,ops.h,torch_bindings.cpp, orfa_rdna2.cu.AI assistance was used (Cursor Grok 4.7). A human should review every changed line before marking this ready.
Why this is not a duplicate
Open PRs on
opengfx1030/vllm-rdnawere listed before this branch was opened: #47, #44, #42, #41, #40, #39, #37, #35, #33, #31, #25, #23, #18, #10, #2. None of them editcsrc/rocm/q_gemm_rdna2_prefill.cu. #41 is the W4A8 sweep, #42 is tools, #44 is Python debug probes, #33 isfa_rdna2.cu, #18 is GPTQBLOCK_KNfor gfx1030.What was deleted
select_config. The first said this function never sees an out-of-envelopeM. The second narrated the 2026-09-10 "53% of peak" profile and thesize_m > 256branch. The branch is still the documentation; it was not rewritten into a new comment.VLLM_RDNA2_PREFILL_DEBUGprintf and itsdebug_splitcache at the end ofcompute_split_k.VLLM_RDNA2_PREFILL_FORCE_CONFIGearly return insideselect_config.maybe_force_split_kandVLLM_RDNA2_PREFILL_FORCE_SPLIT_K.launch_dispatchnow passescompute_split_k<Config*>straight through.#include <cstdio>and#include <cstdlib>, which were only used by those hooks.The four-line tile note already sitting on
if (size_m > 256)was left as it was. No new comment was added.Net: 58 deletions, 3 insertions (55 lines removed). The three insertions are the same
compute_split_kcalls with the force wrapper removed.Default control flow (unchanged when the env vars are unset)
compute_split_k: both the power-of-two path and the factor-enumeration path still assignresultand return it. Previously a process-lifetimedebug_splitflag printed that value only whenVLLM_RDNA2_PREFILL_DEBUGwas set. Unset, the print was skipped and the return value was alreadyresult. The split search above the return is untouched.select_config: previously a cachedVLLM_RDNA2_PREFILL_FORCE_CONFIG(atoi, default-1) returned early when>= 0. Unset, that return never fired. The remaining branches are the same, in the same order:size_m > 256:size_n >= 4096returns ConfigA, otherwise ConfigCsize_m < 4 && size_n > 4096returns ConfigA4 <= size_m <= 8 && size_n >= 2048 && size_k >= 1024returns ConfigCsize_m == 12 && 2560 <= size_n <= 8192 && size_k >= 512returns ConfigCsize_m == 32 && 5120 <= size_n <= 6144 && size_k >= 1536returns ConfigClaunch_dispatch: each arm wasmaybe_force_split_k(compute_split_k<Config>(...)). That helper returned the computed split unlessVLLM_RDNA2_PREFILL_FORCE_SPLIT_Kwas a positive integer. Unset, it returned the computed split. Each arm now passes that computed split to the samelaunch_for_configcall. The switch cases are unchanged.Setting any of the three variables no longer changes behavior. That is the point of removing the experiment hooks. The unset path is the same.
#42 dependency
rg VLLM_RDNA2_PREFILL_on this tree finds no readers undervllm/,tests/,benchmarks/, orscripts/. Readers were only this.cufile plus tools:tools/rdna2_028/probe_prefill_split.py(VLLM_RDNA2_PREFILL_DEBUG)tools/rdna2_028/probe_force_split.py(VLLM_RDNA2_PREFILL_FORCE_SPLIT_K)tools/rdna2_028/audit_w4a16.sh(VLLM_RDNA2_PREFILL_DEBUG)tools/rdna2_028/audit_split/audit_split_swap.pydoes not read the variable. It splices this.cufile and usesstatic const bool debug_split =as its end anchor.Draft PR #42 deletes all four of those files (
changeType: DELETED). Nothing undertools/,scripts/, ordocs/is edited here. Merge this after #42 soaudit_split_swap.pyis already gone; if this lands first, that script's anchor no longer exists.VLLM_RDNA2_PREFILL_FORCE_CONFIGhad no tool or recipe reader.bench_results/2026-09-29_w4a16-regression-audit/SUMMARY.mdnamesVLLM_RDNA2_PREFILL_DEBUGandVLLM_RDNA2_PREFILL_FORCE_SPLIT_Kin a past writeup. It does not set or read them. Left untouched.#47 cherry-pick
On
rdna_extra/v0.31.0(PR #47) this file's blob isf4b5abc32387024e16f42f39f5d6d5630a471ae4, the same blob asrdna_extrasbefore this commit. The port does not already edit the file, so this commit should cherry-pick cleanly.Test Plan
VLLM_RDNA2_PREFILL_(rgovervllm/,tests/,benchmarks/,scripts/).hipcc --offload-arch=gfx1030 -fsyntax-onlyfor this translation unit, if a ROCm toolchain is present..cufile andrgthat the removed symbols are gone from it.Test Result
vllm/,tests/,benchmarks/, orscripts/.hipccis not on this machine (command -v hipccempty, no/opt/rocm). No gfx1030 syntax compile was run.csrc/rocm/q_gemm_rdna2_prefill.cufound(),{}, and[]balanced, with no unclosed comment or string.rgforVLLM_RDNA2_PREFILL_,maybe_force_split_k,debug_split,getenv,atoi, andprintfin this file: no matches.Left in place on purpose
The block comment above the
ConfigIdenum (around the oldselect_config(M, N)M<64 / N<=1024 / otherwise rules) does not match the function that remains. It was outside the two audited hunks, so it was not edited.