Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion examples/layer_wise_benchmarks/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ def comma_separated_floats(s):
parser.add_argument("--load-format", type=str, choices=["AUTO", "DUMMY"])
parser.add_argument("--max-num-tokens", type=int)
parser.add_argument("--moe-backend", type=str)
parser.add_argument("--moe-backend-for-prefill", type=str, choices=["CUTLASS", "DEEPGEMM"])
# No choices= here, for the same reason --moe-backend above has none: both values reach

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says "this file's own runner.py", but replace_routing_method_ctx lives in tensorrt_llm/tools/layer_wise_benchmarks/runner.py:688, not in this directory. Suggest collapsing the whole block to something that can't go stale, e.g.:

# No choices= (same as --moe-backend above): both flags feed MoeConfig.backend,
# whose Literal is the authoritative list. A second list here can only drift.

# the same Runner(moe_backend=...) and end up in MoeConfig.backend, whose Literal is the
# authoritative list and rejects anything invalid with a clear pydantic error. A second
# list here can only drift from that one, and it did -- it accepted two of the eleven
# values MoeConfig allows, excluding TRTLLM and CUTEDSL, both of which this file's own
# runner.py names as supported in replace_routing_method_ctx.
parser.add_argument("--moe-backend-for-prefill", type=str)
parser.add_argument("--moe-max-num-tokens", type=int)
group = parser.add_mutually_exclusive_group()
group.add_argument(
Expand Down
Loading