Skip to content

[TRTLLM-13696][test] Part2.4: Migrate CPU only tests - others - #17339

Merged
QiJune merged 3 commits into
NVIDIA:mainfrom
tongyuantongyu:ytong/host-only-rest
Aug 12, 2026
Merged

[TRTLLM-13696][test] Part2.4: Migrate CPU only tests - others#17339
QiJune merged 3 commits into
NVIDIA:mainfrom
tongyuantongyu:ytong/host-only-rest

Conversation

@tongyuantongyu

@tongyuantongyu tongyuantongyu commented Aug 6, 2026

Copy link
Copy Markdown
Member

Dev Engineer Review

  • Migrates CPU-compatible attention, executor, MoE, visual-generation, weight-sharing, API stability, Dynamo, KV-cache, scaffolding, and usage tests to the CPU stage.
  • Adds pytest.mark.cpu_only at module or class scope.
  • Adds CPU-safe CUDA capability handling in test_attention_mla.py.
  • Removes migrated tests from GPU test lists.
  • Adds the corresponding suites to l0_cpu.yml.
  • Test-list paths and YAML changes are consistent. No public API changes are present.
  • The latest full CI run succeeded.

QA Engineer Review

  • Modified coverage includes attention, sparse DSA, KV-cache, MoE, visual-generation, weight-sharing, API stability, Dynamo, scaffolding, and usage tests.
  • The modified tests are assigned to tests/integration/test_lists/test-db/l0_cpu.yml.
  • GPU test lists remove the migrated entries.
  • Verdict: needs follow-up. CBTS coverage data is unavailable.

Description

Move the rest of test cases don't need GPU to CPU stage.

Test Coverage

The CPU stage.

PR Checklist

Please review the following before submitting your PR:

  • PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.

  • PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.

  • Test cases are provided for new code paths (see test instructions)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • Any new dependencies have been scanned for license and vulnerabilities

  • CODEOWNERS updated if ownership changes

  • Documentation updated as needed

  • Update tava architecture diagram if there is a significant design change in PR.

  • The reviewers assigned automatically/manually are appropriate for the PR.

  • Please check this after reviewing the above items as appropriate for this PR.

GitHub Bot Help

To see a list of available CI bot commands, please comment /bot help.

@tongyuantongyu

Copy link
Copy Markdown
Member Author

/bot run --stage-list "CPU-Generic-x86-1, CPU-Generic-arm-1" --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64218 [ run ] triggered by Bot. Commit: 4cd04e1 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64218 [ run ] completed with state SUCCESS. Commit: 4cd04e1
/LLM/main/L0_MergeRequest_PR pipeline #52125 (Partly Tested) completed with status: 'SUCCESS'

CI Report

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64293 [ run ] triggered by Bot. Commit: c1f6428 Link to invocation

@BowenFu BowenFu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Checked the one thing that can actually go wrong here: all 31 entries removed from the GPU stage lists are covered by l0_cpu.yml at this head — unittest/_torch/executor and unittest/_torch/modules bridge the test_kv_cache_*/test_moe_host_sharer/test_cute_dsl_b12x_moe_backend removals, unittest/usage and unittest/dynamo the rest — so this is a move, not a drop, and nothing falls out of every stage.

Also confirmed the newly-marked scopes are genuinely GPU-free rather than GPU tests hidden behind a marker: the mixed files use narrow class/method markers and leave the real CUDA cases unmarked. The cuda_capability hoist in test_attention_mla.py reads the same get_device_capability() on a GPU box, so tokens_per_block and the FP8 parameterization are unchanged there.

Not blocking, just noting: that hoist caches capability at import time. Fine today since nothing in the file switches device, but it is now an assumption the file depends on.

@DomBrown DomBrown left a comment

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.

Approving from API committee perspective

@WeiHaocheng WeiHaocheng left a comment

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.

LGTM for scaffolding part.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64293 [ run ] completed with state FAILURE. Commit: c1f6428
/LLM/main/L0_MergeRequest_PR pipeline #52192 completed with status: 'UNSTABLE'

CI Report

⚠️ Multi-GPU Label Required:
Multi-GPU tests require the ci: full pre-merge approved label on this PR. Ask a member of NVIDIA/trt-llm-ci-approvers to add the label, then re-trigger CI with the same bot command (no rebase needed).

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Link to invocation

@brnguyen2 brnguyen2 left a comment

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.

Approving — the comments below are optional touch-ups, not blockers.

Mechanically clean, and the marker/test-list bookkeeping lines up on the files I spot-checked. I verified that the fully-marked files really are GPU-free (kv-cache estimation/rebalance/dual-pool mock torch.cuda.*, test_visual_gen_multinode.py patches set_device, TestSequenceSharderDistributed uses gloo), and that no GPU list is left with a directory entry that would now collect zero tests — weight_sharing and api_stability both keep unmarked files.

One gap worth closing before merge: three files get pytestmark = pytest.mark.cpu_only but appear in no test list at all, so they still never run — and the marker now also locks them out of any future GPU-stage directory entry. Details inline.

Since GPU stages run with -m "not cpu_only", the marker alone is enough to drop a test from GPU; the list deletions are cosmetic, so the two halves of this change can't drift out of sync in a dangerous direction. Good.

Test-only, no docs or release notes owed.

Comment thread tests/integration/test_lists/test-db/l0_cpu.yml
Comment thread tests/unittest/_torch/attention/test_attention_mla.py
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@tongyuantongyu

Copy link
Copy Markdown
Member Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64937 [ run ] triggered by Bot. Commit: 19e3f6b Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64937 [ run ] completed with state SUCCESS. Commit: 19e3f6b
/LLM/main/L0_MergeRequest_PR pipeline #52772 completed with status: 'SUCCESS'

CI Report

Link to invocation

Signed-off-by: Yuan Tong <13075180+tongyuantongyu@users.noreply.github.com>
Signed-off-by: Yuan Tong <13075180+tongyuantongyu@users.noreply.github.com>
Signed-off-by: Yuan Tong <13075180+tongyuantongyu@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@tongyuantongyu

Copy link
Copy Markdown
Member Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65563 [ run ] triggered by Bot. Commit: 8b185ed Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65563 [ run ] completed with state SUCCESS. Commit: 8b185ed
/LLM/main/L0_MergeRequest_PR pipeline #53298 completed with status: 'SUCCESS'

CI Report

Link to invocation

@QiJune
QiJune merged commit 37b12de into NVIDIA:main Aug 12, 2026
10 checks passed
@tongyuantongyu
tongyuantongyu deleted the ytong/host-only-rest branch August 14, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.