Repository navigation
[https://nvbugs/7163265][fix] Forward pre-replay staging in MoE LoRA test - #23008
trtllm-agent wants to merge 2 commits into
Conversation
…test PR NVIDIA#22370 (7a8a077) added pre_replay_staged to CUDAGraphRunner.replay and its decoder callers. Accept and forward that keyword in _run_paired_adapter_engine's replay counter, preserving its instrumentation and the original replay behavior. The existing test_qwen_moe_native_fp8_lora_matches_bf16_reference cudagraph case covers this wrapper and asserts that LoRA replay occurs. Fixes https://nvbugs/7163265 Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
|
No actionable comments were generated in the recent review. WalkthroughThe CUDA-graph replay wrapper now accepts arbitrary positional and keyword arguments and forwards them unchanged to the original replay method. The test’s replay-counting behavior remains unchanged. ChangesReplay argument forwarding
Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Other Merge Risk:
|
trtllm-agent-review
left a comment
There was a problem hiding this comment.
Thanks for the PR. It updates the replay-counting wrapper in the MoE LoRA integration test to accept and forward the pre_replay_staged keyword that #22370 added to CUDAGraphRunner.replay, so the native FP8 [cudagraph] case no longer fails with TypeError.
Reviewed at commit 8c73e49dd6 (1 file, +7/−1).
Approve: no Blocker found. 2 suggestions below are nice to have.
Nice to have (2): 2 inline, 0 below
- (N2: Test design and organization)
counted_replaystill hand-copiesCUDAGraphRunner.replay's keywords, so the next keyword added there makes the FP8[cudagraph]case fail with TypeError again (test_llm_api_pytorch_moe_lora.py:362) - (R3: Repository rules) The rewritten
counted_replaysignature has no type annotations, which CODING_GUIDELINES.md asks for on every function (test_llm_api_pytorch_moe_lora.py:356)
What this review checked
counted_replaynow takes exactly the keyword-only parameters and defaults ofCUDAGraphRunner.replay(tensorrt_llm/_torch/pyexecutor/cuda_graph_runner.py:1383-1391) and forwards all of them. Both decoder call sites pass only those keywords (tensorrt_llm/_torch/pyexecutor/engine/runners/decoder/graphs.py:828-850), and the signature is the same on current main.- Every other test stand-in for
CUDAGraphRunner.replayalready acceptspre_replay_stagedor**kwargs:tests/integration/defs/kv_cache/test_final_single_token_context_cuda_graph.py:124-138,tests/unittest/_torch/pyexecutor/test_model_engine.py:110-115,tests/unittest/_torch/pyexecutor/test_cuda_graph_skip_warmup_pass.py:127and the T5 and BART decoder wrappers. This wrapper was the last one #22370 left behind. - The fixed case runs where it is listed:
tests/integration/test_lists/test-db/l0_h100.yml:409has it in the single-GPU H100 post-merge block, itssupports_native_fp8_loragate is true on SM90 (cpp/tensorrt_llm/kernels/groupGemm.cu:51-55), and no waive names it or nvbugs/7163265. - Not covered: No GPU run: the before and after H100 results in the description were not reproduced.
- Not covered: No CI result for the fixed case: it runs only in the post-merge H100 stages.
Automated review by trtllm-agent-review. If a point is wrong, reply in its thread. Once you have pushed code changes and replied in every Blocker thread, the bot re-checks the Blockers within a few hours. A Blocker you think should not be fixed needs no code change: reply in its thread with the reason and the evidence.
…counter Forward replay arguments and the return value unchanged instead of copying CUDAGraphRunner.replay's evolving signature. Keep the existing replay-count instrumentation and annotate the wrapper. The existing native FP8 CUDA-graph integration case exercises this counter. Fixes https://nvbugs/7163265 Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
|
/bot run |
|
PR_Github #87833 [ run ] triggered by Bot. Commit: |
|
PR_Github #87833 [ run ] completed with state |
|
/bot run |
|
PR_Github #87842 [ run ] triggered by Bot. Commit: |
|
PR_Github #87842 [ run ] completed with state |
Summary
Make the MoE LoRA integration test's
counted_replaywrapper a typedpassthrough. It forwards all positional and keyword arguments unchanged to
CUDAGraphRunner.replay, includingpre_replay_staged, and returns its result.The replay counter still increments once per call.
Why this is a test-only fix
PR #22370
(
7a8a07721021842e363c241e8372fbffa26af308) added this keyword to both theproduction replay interface and its decoder callers. The test's counting
wrapper retained the older explicit signature and rejected the keyword before
delegating to the original replay method.
This updates only that instrumentation. Forwarding the arguments rather than
copying the replay signature avoids repeating this mismatch when that interface
changes. Production code, numerical criteria, assertions, and CI registrations
remain unchanged.
Test Coverage
test_qwen_moe_native_fp8_lora_matches_bf16_reference[cudagraph]exercises thecorrected wrapper, asserts LoRA graph replay, and compares the native FP8
adapter's logit delta with its BF16 reference.
[eager]parametrization is the existing non-graph control.test_qwen_moe_routed_expert_multi_lora_varying_ranks[eager]and[cudagraph]cases provide adjacent MoE LoRA coverage.These cases are already selected by
tests/integration/test_lists/test-db/l0_h100.yml.No additional test cases or CI registrations are introduced.
Verification
omitted defaults, an additional keyword, return values, exception propagation,
and one counter increment per call. All 18 existing test assertions are unchanged.
existing cases run together in one pytest process with
--test-list.86cc005c4fd68dd51f2042a0c861e71955828876:three cases pass; the native FP8
[cudagraph]case fails becausecounted_replayrejectspre_replay_staged.3ed1de4cb307af817288322717d8bf73efd97270.generation, and graph-replay assertions remain in place.
Verification covers these revisions, not a merge with a newer main.
Fixes https://nvbugs/7163265
Dev Engineer Review
The test-only change forwards replay arguments and return values without constraining the evolving
replaysignature. It preserves replay counting. No production code changed.QA Engineer Review
Per-File QA Perspective
tests/integration/defs/llmapi/test_llm_api_pytorch_moe_lora.py: Covers MoE LoRA behavior in eager and CUDA-graph modes. The native FP8 cases are listed in CI; related routed-expert cases are listed in manual QA.