Skip to content

fix(_workload_envs): assert profiler=torch alongside the profile bounds injected for EXTRA_VLLM_ARGS - #1565

Open
BaoYunkai wants to merge 1 commit into
mainfrom
bugfix/yunkai/workload-envs-profiler-torch
Open

BaoYunkai wants to merge 1 commit into
mainfrom
bugfix/yunkai/workload-envs-profiler-torch

Conversation

@BaoYunkai

Copy link
Copy Markdown
Collaborator

Problem

Magpie's vllm_mi355x.sh sets --profiler-config.profiler torch itself, but
only in the flags it appends after EXTRA_VLLM_ARGS at actual launch. The
argv preflight probe only sees EXTRA_VLLM_ARGS, so it parses the
delay_iterations / max_iterations / capture_torch_profiler /
detailed_trace_annotation flags this layer injects, and then vLLM's own
ProfilerConfig validator rejects capture_torch_profiler without
profiler == 'torch' present in that same fragment.

The result is an argv that is valid once Magpie's flags are appended being
rejected as VALUE_REJECTED (terminal, no repair), because the checked
fragment was incomplete.

Fix

Assert --profiler-config.profiler torch in this same injection, so the
fragment Hyperloom controls is self-consistent on its own. A duplicate from
Magpie's script is a harmless last-wins repeat under vLLM's dotted-flag merge,
not a conflict; an operator-set profiler flag is left untouched.

Test plan

  • test_profile_and_kernel_handlers.py (175 passed; 1 failure,
    test_trace_certificate_stays_out_of_the_resolver_namespace, also fails
    on unmodified main with ModuleNotFoundError)
  • ruff check . + ruff format --check .

…ds vLLM injects for EXTRA_VLLM_ARGS

Magpie's vllm_mi355x.sh sets --profiler-config.profiler torch itself,
but only in the flags it appends after EXTRA_VLLM_ARGS at actual
launch. The argv preflight probe (now fixed to call parse_args, see
previous commit) only sees EXTRA_VLLM_ARGS, so it correctly parses the
delay_iterations/max_iterations/capture_torch_profiler/
detailed_trace_annotation flags this layer injects, then vLLM's own
ProfilerConfig validator rejects capture_torch_profiler without
profiler=='torch' present in that same fragment -- an argv that is
valid once Magpie's flags are appended, rejected as VALUE_REJECTED
(terminal, no repair) because the checked fragment was incomplete.

Assert --profiler-config.profiler torch in this same injection so the
fragment Hyperloom controls is self-consistent on its own. A duplicate
from Magpie's script is a harmless last-wins repeat under vLLM's
dotted-flag merge, not a conflict; an operator-set profiler flag is
left untouched.
@BaoYunkai
BaoYunkai requested a review from a team as a code owner September 18, 2026 04:46
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.

1 participant