Skip to content

[TRTLLM-14849][chore] Rename tests/unittest/_torch/executor to pyexecutor and split out its connector tests - #20669

Merged
lori-ren merged 13 commits into
NVIDIA:mainfrom
lori-ren:chore/rename-torch-executor-tests
Oct 30, 2026
Merged

lori-ren merged 13 commits into
NVIDIA:mainfrom
lori-ren:chore/rename-torch-executor-tests

Conversation

@lori-ren

@lori-ren lori-ren commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Dev Engineer Review

The test tree moved from tests/unittest/_torch/executor/ to tests/unittest/_torch/pyexecutor/. The move also groups connector, Mooncake Store, engine, and KV-cache tests by component. Five helper imports and related path references, CI selectors, duration entries, waivers, lint lists, and CODEOWNERS entries were updated. No production-code changes are reported.

The main risk is a missed path update that could affect test discovery, CI selection, waiver matching, linting, or ownership. KV-cache tests now use KV-cache-manager ownership; that group was asked to confirm.

QA Engineer Review

The supplied report says pytest collection node IDs stayed unchanged, with and without -m cpu_only. It also reports that patch targets resolved and that the five files with updated imports and two connector tests passed on H100. These results are reported by the change description; no independent test run is available here.

The test-list and waiver entries were relocated to match the new paths. CI comments include two failed L0 merge-request pipelines, several aborted or canceled runs, and later runs without a supplied completion outcome. Coverage verdict: needs follow-up.

Per-File QA Perspective

  • .claude/skills/perf-host-optimization/SKILL.md, .claude/skills/perf-host-optimization/references/hot-path-files.md: Examples and test mappings point to the relocated test paths.
  • .github/CODEOWNERS: Ownership rules follow the relocated tests. Confirm the KV-cache manager ownership.
  • .pre-commit-config.yaml, legacy-files.txt, pyproject.toml, ruff-legacy.toml: Pre-commit and Ruff path lists follow the relocation; verify the updated paths remain covered by the intended hooks.
  • tests/integration/defs/.test_durations: Duration records use the new paths; the supplied report says their values are unchanged.
  • tests/integration/test_lists/test-db/*.yml: CI selectors use the relocated paths across hardware and CPU suites. The supplied CI reports include failures and runs with no completion outcome.
  • tests/integration/test_lists/waives.txt: Existing waiver entries use the new paths. Verify waiver matching against collection.
  • tests/unittest/_torch/pyexecutor/connectors/** and connectors/mooncake_store/**: Connector tests moved into component-specific directories. The supplied report says two connector tests passed on H100.
  • tests/unittest/_torch/pyexecutor/engine/**: Engine tests moved under engine/; no test-body changes are reported.
  • tests/unittest/_torch/pyexecutor/kv_cache/** and kv_cache/sharing/**: KV-cache, sharing, connector, and sizing tests moved under kv_cache/; verify CI selection and ownership.
  • tests/unittest/_torch/pyexecutor/**: Remaining PyExecutor tests and helper modules moved to the renamed tree. Five helper imports changed; the supplied report says patch targets were checked.
  • tests/unittest/_torch/modeling/test_modeling_nemotron_h.py, tests/unittest/_torch/multi_gpu/test_kv_pool_rebalance_tp.py, tests/unittest/llmapi/apps/_test_trtllm_serve_profile.py, tests/integration/defs/llmapi/test_llm_api_connector_mooncake.py: Comments now reference relocated tests; no behavior change is reported.

Description

tests/unittest/_torch/executor/ tests tensorrt_llm/_torch/pyexecutor/, not tensorrt_llm/executor/ (whose tests live in tests/unittest/executor/), so it is renamed to tests/unittest/_torch/pyexecutor/. Five tests import shared helpers through the test path (from _torch.executor.<helper> import ...) and are rewritten to the new path. Test-list entries, waives, .test_durations, the agg_unit_mem_df.csv row, the legacy lint lists and CODEOWNERS are renamed in place, so every stage runs the same tests with the same xdist worker count and every file keeps its owner. The patch("tensorrt_llm._torch.pyexecutor...") targets name the production module and are unchanged.

Further commits sort tests by the module they test. The KV connector tests move to the new connectors/ subdirectory, with the Mooncake store tests in connectors/mooncake_store/, and test_context_only_warmup.py (decoder warmup runners) moves to engine/; these keep their owner. test_kv_connector_v2_prefix*.py and test_per_layer_head_dim.py test only KVCacheManagerV2 and move to kv_cache/, which changes their owner from @NVIDIA/trt-llm-runtime-devs to @NVIDIA/trt-llm-kv-cache-manager-devs, matching the module under test. KV cache owners: please confirm you want them. Tests that exercise PyExecutor itself (test_send_kv_async_split.py, test_disagg_receive_ordering.py, test_kv_connector_executor_lifetime.py) stay at the root.

Test Coverage

Renames only; apart from the five helper imports, test bodies are unchanged.

  • tests/unittest/_torch/pyexecutor/, through the same A10, H100, B300, GB300 and CPU stages that ran it from _torch/executor/.
  • Local (H100): pytest --collect-only over the directory gives the same node IDs before and after the rename (paths mapped), with and without -m cpu_only; every patch() target still resolves; the five files with rewritten imports and two connectors/ tests pass from their 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-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.

…utor

The directory tests tensorrt_llm/_torch/pyexecutor, not tensorrt_llm/executor. Test lists, waives, durations, lint lists, CODEOWNERS and the five helper imports through the test path follow the rename.

Signed-off-by: Lori Ren <[email protected]>
…into tests/unittest/_torch/pyexecutor/kv_cache/

Ownership moves from the runtime team to the KV cache team, following the module under test.

Signed-off-by: Lori Ren <[email protected]>
…ttest/_torch/pyexecutor/engine/

Signed-off-by: Lori Ren <[email protected]>
…st/_torch/pyexecutor/connectors/mooncake_store/

Signed-off-by: Lori Ren <[email protected]>
…test/_torch/pyexecutor/kv_cache/

It tests only KVCacheManagerV2, so ownership moves from the runtime team to the KV cache team.

Signed-off-by: Lori Ren <[email protected]>
@lori-ren
lori-ren marked this pull request as ready for review October 20, 2026 08:42
@lori-ren

Copy link
Copy Markdown
Contributor Author

/bot run

@lori-ren
lori-ren force-pushed the chore/rename-torch-executor-tests branch from 348fb8b to 0b04240 Compare October 30, 2026 01:42
Brings main up to 7aa8f85 through the rename.

Signed-off-by: Lori Ren <[email protected]>
Brings main up to 3cded66; the new test_executor_resource_rebind.py lands under pyexecutor/.

Signed-off-by: Lori Ren <[email protected]>
@lori-ren

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81636 [ run ] triggered by Bot. Commit: fe44e4b Link to invocation

@lori-ren

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81680 [ run ] triggered by Bot. Commit: 20cccda Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81636 [ run ] completed with state ABORTED. Commit: fe44e4b

Link to invocation

Brings main up to 54da997; l0_b200.yml keeps main's list with the pyexecutor paths.

Signed-off-by: Lori Ren <[email protected]>
@lori-ren

Copy link
Copy Markdown
Contributor Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81689 [ run ] triggered by Bot. Commit: 30570bb Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81680 [ run ] completed with state ABORTED. Commit: 20cccda

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #81689 [ run ] completed with state SUCCESS. Commit: 30570bb
/LLM/main/L0_MergeRequest_PR pipeline #67351 completed with status: 'SUCCESS'

CI Report

Link to invocation

@lori-ren
lori-ren merged commit d870ded into NVIDIA:main Oct 30, 2026
7 checks passed
BoyueZ added a commit to tensorrt-cicd/TensorRT-LLM that referenced this pull request Oct 31, 2026
Brings in the main-branch fix for
tests/unittest/executor/test_forward_error_survival.py (NVIDIA#20883), which the
branch point predates and which failed in this PR's first CI run, and follows
the rename of tests/unittest/_torch/executor/ to tests/unittest/_torch/pyexecutor/
(NVIDIA#20669) so that test_forced_chunk_context_limit.py stays in the directory the L0
test lists run.

Signed-off-by: berryz <[email protected]>
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.

10 participants