Skip to content

cleanup(scripts): drop unread serve knobs and idle kill sleep - #46

Closed
BlivionIaG wants to merge 1 commit into
rdna_extrasfrom
cursor/serve-noop-knobs-80f5
Closed

BlivionIaG wants to merge 1 commit into
rdna_extrasfrom
cursor/serve-noop-knobs-80f5

Conversation

@BlivionIaG

Copy link
Copy Markdown

Purpose

Live serve path only. Four items, no new flags, functions, or files.

  1. Stop exporting env knobs nothing in vllm/, csrc/, or tests/ reads. rg -n NAME vllm csrc tests is empty for each name below, so none of the findings were dropped.
    • VLLM_RDNA_FORCE_FP16: removed from rdna_init and from serve_rdna.sh's print list.
    • VLLM_ROCM_SKIP_LIVE_TAIL_HASH: removed from scripts/recipes/full.env (assignment and the stale comment) and from the print list.
    • VLLM_ROCM_MOE_PREFILL: removed from flashnext-mtp0.env, flashnext-mtp2.env, and the print list. VLLM_GDN_HIP_PREFILL stays; it is read in vllm/model_executor/layers/mamba/gdn/qwen_gdn_linear_attn.py.
  2. tools/rdna2/tunableop_env.sh was byte-identical to tools/rdna2_028/tunableop_env.sh below a 3-line header. Its body is now one source of the rdna2_028 file, path resolved from this script's directory. SPDX header kept. Callers (serve_v620_baseline.sh included; that file is not edited) still get configure_tunableop, configure_v620_tunableop, and _tunableop_profiles.
  3. Deleted the dead alias configure_mtp_tunableop and its "kept for existing callers" comment. rg of the name is empty after the edit.
  4. rdna_kill_stale slept 8s after TERM and 3s after the loop even when pgrep matched nothing. It now sleeps only after a pid was actually signaled. The pgrep/kill loops are unchanged.

Not a duplicate of #42. That PR deletes finished-experiment drivers under tools/ and leaves VLLM_ROCM_MOE_PREFILL in the serve_rdna.sh print list. It does not change rdna_kill_stale. This PR is only the live serve path (scripts/serve_rdna.sh, scripts/rdna_launcher_common.sh, scripts/recipes/*.env, the two TunableOp helpers). Untouched: tools/rdna2/serve_v620_baseline.sh (#25), docs/, bench_results/, every vllm/ and csrc/ file, and the other tools/ scripts.

AI assistance was used (Cursor Grok 4.7). No model-output, accuracy, or serving change, so no model eval. Launch behavior changes only by not exporting unread names and by skipping the 11s wait when there is nothing to kill.

Test Plan

rg -n VLLM_RDNA_FORCE_FP16 vllm csrc tests
rg -n VLLM_ROCM_SKIP_LIVE_TAIL_HASH vllm csrc tests
rg -n VLLM_ROCM_MOE_PREFILL vllm csrc tests
rg -n configure_mtp_tunableop

bash -n scripts/serve_rdna.sh scripts/rdna_launcher_common.sh \
  scripts/recipes/full.env scripts/recipes/flashnext-mtp0.env \
  scripts/recipes/flashnext-mtp2.env \
  tools/rdna2/tunableop_env.sh tools/rdna2_028/tunableop_env.sh

shellcheck -s bash --format=gcc \
  scripts/serve_rdna.sh scripts/rdna_launcher_common.sh \
  scripts/recipes/full.env scripts/recipes/flashnext-mtp0.env \
  scripts/recipes/flashnext-mtp2.env \
  tools/rdna2/tunableop_env.sh tools/rdna2_028/tunableop_env.sh

# PRINT=1 dry-run, before vs after, for each recipe
# full, flashnext, flashnext-mtp0, flashnext-mtp2, 27b-awq, 27b-exl3
PRINT=1 bash scripts/serve_rdna.sh RECIPE=<name> MODEL=/tmp/model VENV=/tmp/venv

bash -c 'source tools/rdna2/tunableop_env.sh; declare -F'
diff <(bash -c 'source tools/rdna2/tunableop_env.sh; declare -f') \
     <(bash -c 'source tools/rdna2_028/tunableop_env.sh; declare -f')

python -m pytest tests/tools/test_v620_tuning_coverage.py -q --noconftest

rdna_kill_stale under set -euo pipefail: time a call with no matching pid; then a pid whose command line matches but whose VLLM_CACHE_ROOT does not; then a pid that matches both (sleep overridden so the positive path does not actually wait 11s).

Test Result

  • rg of the three env names under vllm/, csrc/, and tests/: no matches. configure_mtp_tunableop: no matches.

  • bash -n on the seven touched shell files: ok.

  • shellcheck 0.9.0 (same invocation, .shellcheckrc applied): 126 findings before, 123 after, 0 new. The three that disappeared are SC2034 on the deleted recipe assignments.

  • PRINT=1 env diff, only these lines removed (commands unchanged):

    • every recipe: export VLLM_RDNA_FORCE_FP16='1'
    • full only: export VLLM_ROCM_SKIP_LIVE_TAIL_HASH='1'
    • flashnext-mtp0 and flashnext-mtp2 only: export VLLM_ROCM_MOE_PREFILL='0'
    • VLLM_GDN_HIP_PREFILL='0' still printed for the two flashnext-mtp recipes.
  • declare -F after source tools/rdna2/tunableop_env.sh:

    declare -f _tunableop_profiles
    declare -f configure_tunableop
    declare -f configure_v620_tunableop
    

    Before, the same list also had configure_mtp_tunableop. declare -f bodies are identical to sourcing tools/rdna2_028/tunableop_env.sh directly.

  • rdna_kill_stale:

    • no matching pid: returned 0 in 8 ms (set -e did not abort). Before this change the same call took 11015 ms.
    • pgrep hit with a different VLLM_CACHE_ROOT: no sleep, process left alive.
    • pgrep hit with the launcher's VLLM_CACHE_ROOT: kill succeeded, recorded SLEEP 8 then SLEEP 3, process was gone, function returned 0.
  • python -m pytest tests/tools/test_v620_tuning_coverage.py -q cannot load tests/conftest.py here (it imports torch and vllm; no project venv). The same file with --noconftest on CPU: 4 passed, 2 subtests passed in 0.20s. python3 -m unittest tests.tools.test_v620_tuning_coverage -q: Ran 4 tests ... OK. That test sources tools/rdna2/tunableop_env.sh and calls configure_v620_tunableop.


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

BEFORE SUBMITTING, PLEASE READ https://docs.vllm.ai/en/latest/contributing

Open in Web Open in Cursor 

Stop exporting three env names nothing in vllm/, csrc/, or tests/ reads.
Point tools/rdna2/tunableop_env.sh at the rdna2_028 copy and delete the
unused configure_mtp_tunableop alias. rdna_kill_stale sleeps only after
it actually signals a pid.

Co-authored-by: Grok 4.7 <grok@x.ai>
Signed-off-by: BlivionIaG <kev29lt@gmail.com>
@BlivionIaG BlivionIaG closed this Oct 7, 2026
@BlivionIaG

Copy link
Copy Markdown
Author

Closed as overlapping #42. Same no-op env knobs + tunableop_env.sh dedupe. The unique rdna_kill_stale sleep-only-after-signal tweak is being folded into #42 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants