Repository navigation
[TRTLLM-14848][chore] Move the MoE-owned thop unit tests into tests/unittest/_torch/moe/kernels/ - #20658
Conversation
…nittest/_torch/moe/kernels/ The CI test-list entries, parallelism rows, lint configs and CODEOWNERS follow the move; tests/unittest/_torch/thop/ no longer exists. Signed-off-by: Lori Ren <lorir@nvidia.com>
|
/bot run |
|
PR_Github #79167 [ run ] triggered by Bot. Commit: |
yiqingy0
left a comment
There was a problem hiding this comment.
Approve for infra part.
|
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 #79167 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
1 similar comment
|
/bot run --disable-fail-fast |
|
PR_Github #79445 [ run ] triggered by Bot. Commit: |
|
PR_Github #79445 [ run ] completed with state
|
|
/bot run |
|
PR_Github #79559 [ run ] triggered by Bot. Commit: |
|
PR_Github #79559 [ run ] completed with state
|
|
/bot run |
|
PR_Github #79693 [ run ] triggered by Bot. Commit: |
|
PR_Github #79693 [ run ] completed with state |
…ct-fusion relu2 test The kernel computes the activation and per-block amax in fp32, while the reference rounds the GEMM output and the Relu2 output to bf16 before fp4_quantize. Blocks whose scale factor sits near an E4M3 rounding midpoint then round to the adjacent code, which affects 2-5% of the blocks for Relu2, so the 95% exact-match threshold failed intermittently (~2.6% of runs for 8192-8-1-128-relu2). Lower it to 90%. Also remove the stale unittest/_torch/thop/parallel waiver: nvbugs 6966263 and 6971596 report the same relu2 SF mismatch, and the test has moved to unittest/_torch/moe/kernels/parallel (NVIDIA#20658), so the entry no longer matches anything. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: leslie-fang25 <leslief@nvidia.com>
…tions into the K3 kernels branch Propagate k3-cons/b-runtime a43e651 (main NVIDIA#20658, the thop -> moe/kernels unit-test move) into the K3 kernels branch. No conflicts. Signed-off-by: Vasanth Sabavat <vsabavat@nvidia.com>
Merge the K3 kernels branch after it absorbed k3-cons/b-runtime a43e651 (main NVIDIA#20658). Resolve l0_b200.yml: keep this branch's DSpark drafter and decode-kernel entries and take the move of thop/parallel to moe/kernels/parallel. Signed-off-by: Vasanth Sabavat <vsabavat@nvidia.com>
…ct-fusion relu2 test The kernel computes the activation and per-block amax in fp32, while the reference rounds the GEMM output and the Relu2 output to bf16 before fp4_quantize. Blocks whose scale factor sits near an E4M3 rounding midpoint then round to the adjacent code, which affects 2-5% of the blocks for Relu2, so the 95% exact-match threshold failed intermittently (~2.6% of runs for 8192-8-1-128-relu2). Lower it to 90%. Also remove the stale unittest/_torch/thop/parallel waiver: nvbugs 6966263 and 6971596 report the same relu2 SF mismatch, and the test has moved to unittest/_torch/moe/kernels/parallel (NVIDIA#20658), so the entry no longer matches anything. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: leslie-fang25 <leslief@nvidia.com>
Dev Engineer Review
tests/unittest/_torch/thop/totests/unittest/_torch/moe/kernels/without reported test-body changes.unittest/_torch/moe/. MoE owners should confirm that outer-case reporting is sufficient.QA Engineer Review
serial/andparallel/layout. The oldthop/directory is removed.test_cute_dsl_moe.py::test_count_native_cutedsl_matches_legacy_sort_bitwiseuses the new path.pytest --collect-onlyand confirmed identical node IDs.test_moe_gate.pyandtest_moe_densegemm.pywere run from their new locations.Per-File QA Perspective
.github/CODEOWNERS: Removes obsoletethopownership rules. Verify that the relocated MoE tests still resolve to the intended owners..pre-commit-config.yaml: Replacesthop/serialpaths withmoe/kernels/serialpaths in generated file lists. Verify pre-commit discovery.legacy-files.txt: Updates legacy test paths. Verify the relocated serial tests remain included.pyproject.toml: Updates Ruff legacy exclusions for the new serial-test paths. Verify lint behavior.ruff-legacy.toml: Updates Ruff legacy includes for the new serial-test paths. Verify lint coverage.tests/integration/defs/.test_durations: Renames one duration key. Verify CI duration lookup.tests/integration/test_lists/test-db/l0_b200.yml: Updates B200 MoE parallel and serial entries. Verify CI selection.tests/integration/test_lists/test-db/l0_b300.yml: Updates B300 MoE parallel and serial entries. Verify CI selection.tests/integration/test_lists/test-db/l0_gb300.yml: Updates the GB300 MoE parallel entry. Verify CI selection.tests/integration/test_lists/test-db/l0_gb300_multi_gpus.yml: Updates GB300 multi-GPU MoE entries. Verify post-merge selection.tests/integration/test_lists/test-db/l0_h100.yml: Updates H100 MoE parallel and serial entries. Verify CI selection.tests/unittest/_torch/modeling_v2/comm/test_modeling_v2_allgather_op_matrix.py: Updates the no-xdist marker reference to the relocatedtest_moe_alltoall.py. Verify marker-based serialization.tests/unittest/_torch/modeling_v2/comm/test_modeling_v2_reducescatter_op_matrix.py: Updates the corresponding serialization reference. Verify marker-based serialization.tests/unittest/_torch/moe/test_kimi_k3_situ_moe.py: Updates documentation references to the relocated serial MoE test. No test behavior changes are reported.tests/unittest/_torch/moe/test_moe_backend.py: Updates documentation references for backend and shared-expert coverage. No test behavior changes are reported.tests/unittest/_torch/moe/kernels/: Preserve the existing MoE kernel test bodies andserial//parallel/structure. Verify collection, selectors, CI listing, and Jenkins reporting at the new prefix.Description
Moves the MoE-owned kernel tests left in
tests/unittest/_torch/thop/intotests/unittest/_torch/moe/kernels/, the test-side counterpart oftensorrt_llm/_torch/moe/kernels/introduced by #19275. After #19275 these were the only files left inthop/, so that directory is gone.The
serial/andparallel/subdirectories are kept because CI configures xdist parallelism per directory inagg_unit_mem_df.csv. Eachthop/{serial,parallel}test-list entry and CSV row is renamed in place, so every stage runs the same tests with the same worker count. The two serial files stay on the legacy lint list under their new paths. In CODEOWNERS the twothop/*moe*rules and the now-empty/tests/unittest/_torch/thoprule are dropped; the existing/tests/unittest/_torch/moerule already assigns the new location to the MoE team.Because the renamed test-list entries now start with
unittest/_torch/moe/,tests/integration/defs/test_unittests.pywrites their sub-run JUnit files with themoe-results-prefix, which Jenkins does not ingest. After the move these files report only the outer case's pass/fail in Jenkins, like the other MoE unit tests, rather than one result per parametrisation as they did underthop/. Stage failures and the culprit names in the failure message are unaffected. MoE owners: please confirm this is acceptable. If you want per-test results kept formoe/kernels/, I'll exempt that prefix intest_unittests.py.Test Coverage
Renames only; no test body changes.
tests/unittest/_torch/moe/kernels/serial/andtests/unittest/_torch/moe/kernels/parallel/, through the DGX_H100, DGX_B200, B300 and GB300 pre-merge stages and the GB300 4-GPU post-merge stage that ran them fromthop/.pytest --collect-onlyon each file gives identical node IDs at the old and new paths;test_moe_gate.pyandtest_moe_densegemm.pyrun from the new paths.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-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin 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.