Repository navigation
[https://nvbugs/7163265][fix] Forward pre-replay staging in MoE LoRA test - #23008
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 to the original replay method. The test's replay-counting behavior remains unchanged. The skip-list entry for the Qwen MoE native FP8 LoRA versus BF16 reference CUDA-graph test is removed. ChangesReplay argument forwarding
Estimated code review effort: 1 (Trivial) | ~4 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 |
…163265-r701 Signed-off-by: trtllm-agent <296075020+trtllm-agent@users.noreply.github.com>
|
/bot run |
|
PR_Github #87980 [ run ] triggered by Bot. Commit: |
|
Automatically added "ci: full pre-merge approved" because this PR has satisfied the required GitHub review approvals. Unresolved review conversations and other required checks remain independent merge requirements. |
|
PR_Github #87980 [ run ] completed with state
|
|
/bot run |
|
PR_Github #88049 [ run ] triggered by Bot. Commit: |
|
PR_Github #88049 [ run ] completed with state |
Summary
Make the MoE LoRA integration test's
counted_replaywrapper a typedpassthrough. It forwards positional and keyword arguments unchanged to
CUDAGraphRunner.replay, includingpre_replay_staged, and returns its result.The replay counter still increments once per call.
Merge
mainat8a80ee6fd359f223d6e9108227a64945ac25c86fand remove thetemporary waiver for the native FP8
[cudagraph]case, restoring its existingCI coverage.
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.
Forwarding arguments instead of copying the replay parameter list avoids
repeating that mismatch when keywords are added. Relative to the updated base,
this fix changes only the test instrumentation and removes its waiver.
Production code, numerical criteria, assertions, and test registrations are
unchanged by the fix.
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 four cases are selected by
tests/integration/test_lists/test-db/l0_h100.yml.No new tests or registrations are added. Only this bug's exact waiver is removed.
Verification
outward-changed files after the conflict-free merge.
passthrough; all 18 test assertions remain unchanged.
requirements, and a checksum-verified CI package built from the updated base.
8a80ee6fd359f223d6e9108227a64945ac25c86f;candidate:
659af2eb12d4c49171b42671e9f1acdf2070be1f.--test-list,retaining the test-list timeouts. Both arms use the candidate's waiver list so
the reported case is enabled for the before/after comparison.
[cudagraph]case fails becausecounted_replayrejectspre_replay_staged, surfaced as a request error.cache, generation, and graph-replay assertions remain in place.
Fixes https://nvbugs/7163265
Dev Engineer Review
counted_replaynow accepts arbitrary*argsand**kwargs. It forwards them toCUDAGraphRunner.replayand still increments the counter before the call. This is test-only; no production code changed.tests/integration/test_lists/waives.txtremoves the NVBUG 7163265 skip for the native FP8[cudagraph]case. The objectives say CI registrations are unchanged. That statement conflicts with this waiver removal.QA Engineer Review
tests/integration/defs/llmapi/test_llm_api_pytorch_moe_lora.py. Modified test-list file:tests/integration/test_lists/waives.txt(one waiver removed).test_qwen_moe_native_fp8_lora_matches_bf16_reference[cudagraph]. This case failed at baseline because the old wrapper rejectedpre_replay_staged.3ed1de4cb307af817288322717d8bf73efd97270. This result is not independently verified. No completed CI check on the current head was supplied.Per-File QA Perspective
tests/integration/defs/llmapi/test_llm_api_pytorch_moe_lora.py: Covers native FP8 versus BF16 output and routed-expert multi-LoRA in eager and CUDA-graph modes. The wrapper now forwardspre_replay_staged, so the CUDA-graph path can run.tests/integration/test_lists/waives.txt: Removes the skip for the native FP8 CUDA-graph case. Confirm this case runs and passes in the intended CI stage.