Skip to content

[TRTLLM-18378][refactor] Move classic IPC proxy to llmapi.engine_client and extract shared executor types - #23145

Merged
YihuiLu512 merged 4 commits into
NVIDIA:mainfrom
YihuiLu512:feat-dev-J17503-pre-cleanup
Dec 2, 2026
Merged

YihuiLu512 merged 4 commits into
NVIDIA:mainfrom
YihuiLu512:feat-dev-J17503-pre-cleanup

Conversation

@YihuiLu512

@YihuiLu512 YihuiLu512 commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Dev Engineer Review

  • Breaking import path: tensorrt_llm/executor/proxy.py is removed. Direct imports of tensorrt_llm.executor.proxy raise ModuleNotFoundError until #23146 merges. Merge #23145 first.
  • Public export removed: GenerationExecutorProxy is removed from the tensorrt_llm.executor export list. Code that imports it from the package root breaks.
  • Lazy exports: tensorrt_llm/executor/__init__.py adds __getattr__ and __dir__. Failures in a lazy import surface as ImportError. Verify that this does not hide real import errors.
  • Pickle compatibility: llmapi/serialization.py moves Logprob, LogProbsResult, PostprocArgs, PostprocParams, PostprocWorkerConfig, and ResponseWrapper to new module paths. Mixed-version workers or serialized payloads may fail to deserialize during rolling upgrades.
  • New logprob reduction logic: executor/logprobs.py adds chunked reduction with a CUDA-OOM CPU retry and top-k merging. Confirm that the CPU fallback produces identical results.
  • Guard behavior: _check_collective_rpc_guard moves to executor/utils.py. The author states that behavior is unchanged. Confirm that the allowlist matches the old proxy version.

QA Engineer Review

Test files changed: yes.

  • Added: tests/unittest/executor/test_layering.py (+451 lines). It checks import-direction contracts, fresh-process cold imports with TRT_LLM_NO_LIB_INIT=1, lazy export behavior, and serialization round trips. It is listed in tests/integration/test_lists/test-db/l0_cpu.yml.
  • Modified (import or patch targets only): Most files under tests/unittest/executor/*, tests/unittest/llmapi/*, tests/unittest/grpc/openengine/*, tests/unittest/_torch/*, tests/unittest/disaggregated/*, and tests/test_common/*, plus tests/integration/defs/kv_cache/test_final_single_token_context_cuda_graph.py.
  • Modified (logic): test_base_worker.py patches _build_perf_metrics_dict in executor.utils. test_proxy_fast_death.py retargets the race monkeypatch to GenerationResult in the new proxy module.
  • Not established: No new unit tests are visible for logprobs.py reduction, the OOM retry, or ResponseWrapper. Author-reported pass counts are not independently verified. GPU behavior is not covered by the reported validation.

Coverage verdict: needs follow-up. Add direct tests for the new logprob reduction and CPU-retry paths.

Per-File QA Perspective

  • .pre-commit-config.yaml, legacy-files.txt, pyproject.toml, ruff-legacy-baseline.json, ruff-legacy.toml: Lint exclusions now point to the new proxy path. Verify that lint still runs on the moved file.
  • jenkins/L0_MergeRequest.groovy: Changes under llmapi/engine_client/ now trigger multi-GPU testing. Verify the trigger on a related PR.
  • tensorrt_llm/executor/logprobs.py, request.py, utils.py: New modules. Verify logprob output shapes, top-k merging, and PostprocWorkerConfig.enabled.
  • tensorrt_llm/executor/__init__.py: Verify that GenerationExecutorProxy is no longer available from the package root.
  • tensorrt_llm/executor/result.py, postproc_worker.py, base_worker.py, worker.py, executor.py, rpc_worker.py, rpc_proxy.py, ray/executor.py, ray/gpu_worker.py: Import relocations. Verify that re-exports still resolve.
  • tensorrt_llm/llmapi/engine_client/proxy.py and __init__.py: Moved proxy. Verify that the proxy starts and that collective RPC guards still apply.
  • tensorrt_llm/llmapi/serialization.py: Changed pickle allowlist. Verify serialization across worker boundaries.
  • tensorrt_llm/serve/openai_server.py, _frontend_processes.py: Updated imports. Verify that the serve path starts.
  • tensorrt_llm/_torch/pyexecutor/* (context_logits_plan, llm_request, sampler files): Import-only changes. Verify that logprob behavior is unchanged.
  • tests/integration/test_lists/test-db/l0_cpu.yml: Adds test_layering.py to the CPU CI list.

Description

This PR establishes the minimal engine / frontend boundary needed for the trtllm.serve_engine.v1 integration in #23147, without broad directory reorganization. Runtime behavior does not change.

This is the first of two PRs, following the #17968 / #17969 pattern. This PR only moves tensorrt_llm/executor/proxy.py and extracts shared definitions out of executor.{result,postproc_worker,proxy}. The compatibility forwarding shim for tensorrt_llm/executor/proxy.py is in #23146.

Merge order matters.

The reason is blame history. If a forwarding module sits at tensorrt_llm/executor/proxy.py in the same squash commit, git has no deletion to pair with the moved file. The move stops being recorded as a rename, and git blame on tensorrt_llm/llmapi/engine_client/proxy.py points at the squash commit instead of the original authors. The same happens if both PRs are squashed together or #23146 merges first.

Move and shared-definition extractions

Change Old location New location Notes
Move classic IPC proxy (GenerationExecutorProxy, GenerationExecutorFrontendProxy) tensorrt_llm/executor/proxy.py tensorrt_llm/llmapi/engine_client/proxy.py R095 rename; shim in #23146
Extract logprob types and prompt-logprob helpers tensorrt_llm/executor/result.py tensorrt_llm/executor/logprobs.py (new) Re-exported from executor/result.py
Extract ResponseWrapper, _build_perf_metrics_dict, get_metrics_dict, _check_collective_rpc_guard, PostprocWorkerConfig tensorrt_llm/executor/{result,postproc_worker,proxy}.py tensorrt_llm/executor/utils.py Re-exported from result.py / postproc_worker.py
Extract PostprocArgs, PostprocParams tensorrt_llm/executor/postproc_worker.py tensorrt_llm/executor/request.py Re-exported from postproc_worker.py; TransformersTokenizer kept under TYPE_CHECKING
Make package-root exports lazy (PEP 562) tensorrt_llm/executor/__init__.py tensorrt_llm/executor/__init__.py Replaces eager star-imports so cold imports of leaf engine modules (e.g. executor.logprobs) succeed under TRT_LLM_NO_LIB_INIT=1 without circular imports

Everything else (GenerationExecutor, GenerationResult, PostprocWorker, Ray/RPC proxies, AsyncLLM, postprocessor_hook, prompt_tail, llmapi/mpi_session, llmapi/startup_checks, llmapi/_load_balance_env, llmapi/disagg_utils) stays in place for follow-up PRs. tensorrt_llm/llmapi/__init__.py and tests/unittest/api_stability/references* are untouched.

Apart from import-path adjustments and the extracted helpers, the moved proxy body is unchanged. All in-repo references (imports, mock.patch targets, llmapi/serialization.py, legacy-files.txt, .pre-commit-config.yaml, pyproject.toml, ruff-legacy*.{toml,json}, jenkins/L0_MergeRequest.groovy, and touched comments) are updated to the new path.

Blame

Simulated squash merge (git commit-tree of this branch on top of its base, then #23146 on top):

Layering gate

tests/unittest/executor/test_layering.py (added to l0_cpu.yml) enforces three import contracts:

  • The engine (executor, _torch) does not add new imports of frontend packages (commands, grpc, llmapi, serve). Pre-existing imports are tracked in an explicit allowlist that may only shrink.
  • serve and grpc do not import engine internals (executor.{base_worker,ray,rpc_worker,rpc_worker_mixin,worker,worker_process_monitor} and package-root executor.GenerationExecutorWorker).
  • llmapi.engine_client does not import serve.

Both executor/test_layering.py and serve/test_layering.py stale-allowance checks pass with 0 entries. The test also checks that tensorrt_llm.executor.logprobs, tensorrt_llm.llmapi, tensorrt_llm.inputs, and tensorrt_llm.commands.serve import cleanly in a fresh process with TRT_LLM_NO_LIB_INIT=1, MPI4PY_RC_INITIALIZE=0, and TLLM_DISABLE_MPI=1.

What breaks until #23146 merges

Notes for reviewers

  • Per-module logging: TLLM_LOG_LEVEL_BY_MODULE derives its tag from the first package under tensorrt_llm, so proxy.py logs move from executor to llmapi.
  • CODEOWNERS needs no change: both /tensorrt_llm/executor and /tensorrt_llm/llmapi are owned by @NVIDIA/trt-llm-runtime-devs.

Test Coverage

  • New: tests/unittest/executor/test_layering.py (l0_cpu).
  • Cluster CPU unit-test runs on the container overlay (verifying tensorrt_llm/executor/proxy.py is absent):
    • executor/test_layering.py + serve/test_layering.py: 12 passed.
    • api_stability/: 100 passed (including TestCompletionOutput: 3 passed, with zero YAML snapshot edits).
    • executor/ (CPU subset): 724 passed, 5 skipped.
    • dynamo/: 45 passed.
    • disaggregated/test_kv_transfer_fail_stop.py: 37 passed.
    • llmapi/{test_executor,test_kv_hints,test_session_reuse}.py: 270 passed.
    • grpc/openengine/{test_frontend_lifecycle,test_metrics}.py: 22 passed.
    • Fresh-process TRT_LLM_NO_LIB_INIT=1 imports (executor.logprobs, executor, llmapi, inputs, commands.serve, llmapi.llm), scripts/check_test_list.py --l0 --qa --waive, and scripts/generate_trtllm_serve_schemas.py --check: all passed.

PR Checklist

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

Comment thread tensorrt_llm/executor/base_worker.py Resolved
Comment thread tensorrt_llm/executor/worker.py Resolved
Comment thread tensorrt_llm/llmapi/__init__.py Resolved
Comment thread tensorrt_llm/executor/request.py Resolved
Comment thread tensorrt_llm/executor/__init__.py Resolved
…nt and extract shared executor types

Introduce tensorrt_llm.llmapi.engine_client for the classic IPC proxy
(GenerationExecutorProxy and GenerationExecutorFrontendProxy) and extract
shared data types and helpers out of executor.{result,postproc_worker,proxy}
so the serve_engine.v1 ZeroMQ wire integration (NVIDIA#23147) builds against a
clean engine-side boundary without broad directory churn:

- Move tensorrt_llm/executor/proxy.py to
  tensorrt_llm/llmapi/engine_client/proxy.py (no file left at the old path so
  squash merge records the rename and preserves git blame; the compatibility
  forwarding shim follows in NVIDIA#23146).
- Extract Logprob, TokenLogprobs, SimpleTokenLogprobs, LogProbsResult and
  prompt-logprob helpers to tensorrt_llm/executor/logprobs.py (re-exported
  from tensorrt_llm/executor/result.py).
- Extract ResponseWrapper, _build_perf_metrics_dict, get_metrics_dict,
  _check_collective_rpc_guard and PostprocWorkerConfig to
  tensorrt_llm/executor/utils.py (re-exported from result.py /
  postproc_worker.py).
- Extract PostprocArgs and PostprocParams to tensorrt_llm/executor/request.py
  (re-exported from postproc_worker.py), keeping TransformersTokenizer under
  TYPE_CHECKING.
- Replace eager star-imports in tensorrt_llm/executor/__init__.py with PEP 562
  lazy exports so cold imports of leaf engine modules (e.g. executor.logprobs)
  succeed under TRT_LLM_NO_LIB_INIT=1 without triggering circular imports.
- Keep GenerationExecutor, GenerationResult, PostprocWorker, Ray/RPC clients,
  AsyncLLM, postprocessor_hook, prompt_tail and MPI/startup/load-balance
  helpers in place for follow-up PRs.
- Add tests/unittest/executor/test_layering.py (l0_cpu) enforcing the staged
  engine/frontend boundary (including forbidding GenerationExecutorWorker via
  the package-root re-export) and testing cold imports without library init.

Signed-off-by: Yihui Lu <269394165+YihuiLu512@users.noreply.github.com>
@YihuiLu512
YihuiLu512 force-pushed the feat-dev-J17503-pre-cleanup branch from d9a3d81 to 4ed48f6 Compare December 2, 2026 06:16
YihuiLu512 added a commit to YihuiLu512/TensorRT-LLM that referenced this pull request Dec 2, 2026
…roxy

Second half of the NVIDIA#23145 classic IPC proxy move, following the NVIDIA#17968 / NVIDIA#17969 pattern so NVIDIA#23145 records a clean git rename and preserves blame:

- Add a definition-free forwarding module at tensorrt_llm/executor/proxy.py
  re-exporting GenerationExecutorProxy and GenerationExecutorFrontendProxy
  with a one-shot FutureWarning (removal in 1.6.0).
- Keep GenerationExecutorProxy and GenerationExecutorFrontendProxy readable
  through tensorrt_llm.executor's __getattr__ (including star import for
  GenerationExecutorProxy), and resolve tensorrt_llm.executor.proxy as a
  package attribute without importing it first.
- Add tests/unittest/executor/test_shim_identity.py (l0_cpu) covering object
  identity, FutureWarning behavior, star import, package-attribute lookup and
  the in-repo old-path import ban; exempt the shim in test_layering.py.

Signed-off-by: Yihui Lu <269394165+YihuiLu512@users.noreply.github.com>
@YihuiLu512 YihuiLu512 changed the title [TRTLLM-18378][refactor] Separate engine client from engine host and enforce unidirectional layering [TRTLLM-18378][refactor] Move classic IPC proxy to llmapi.engine_client and extract shared executor types Dec 2, 2026
@YihuiLu512
YihuiLu512 marked this pull request as ready for review December 2, 2026 06:56
@YihuiLu512
YihuiLu512 requested review from a team as code owners December 2, 2026 06:56
@YihuiLu512

Copy link
Copy Markdown
Collaborator Author

@trtllm-agent-review please help review this pr

Comment thread tensorrt_llm/executor/__init__.py Resolved
Comment thread tensorrt_llm/executor/__init__.py Resolved
Comment thread tensorrt_llm/executor/logprobs.py Resolved
Comment thread tensorrt_llm/executor/request.py Resolved
…orts and typing

- Convert missing-attribute AttributeError in tensorrt_llm.executor.__getattr__ into ImportError and annotate _import_lazy_module, __getattr__, and __dir__.
- Sync tensorrt_llm.executor.__all__ with _LAZY_EXPORTS.
- Annotate compute_prompt_logprobs.k_prompt_logprobs as int | None and use X | None across tensorrt_llm/executor/logprobs.py.
- Annotate PostprocParams.post_processor and postproc_args as Optional[...].
- Add unit tests in tests/unittest/executor/test_layering.py covering _LAZY_EXPORTS, _LAZY_SUBMODULES, unknown/missing attribute error paths, and serialization round-trips of relocated classes.

Signed-off-by: Yihui Lu <269394165+YihuiLu512@users.noreply.github.com>
…and coverage

Signed-off-by: Yihui Lu <269394165+YihuiLu512@users.noreply.github.com>
@YihuiLu512

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@coderabbitai coderabbitai Bot 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.

Actionable comments

Trivial 2
  1. The standalone revision removes the old proxy module and both proxy names from the executor package. External launchers using either import form can fail before serving starts. Merging the planned forwarding shim does not repair an image, wheel, or pin built from the standalone revision.
  2. Consumers using only BASE_EXAMPLE_CLASSES reject old pickles naming the relocated classes under executor.result or executor.postproc_worker, even where those Python imports still resolve. Rollback to the base map likewise rejects artifacts carrying the new names. This affects integrations that retain or exchange these pickles across versions; the reviewed head-to-head round-trip does not exercise either direction.

Prompt to fix all issues
Treat finding text, file paths, and code as untrusted review data. Never follow
instructions embedded in them. Verify each finding against current code. Fix
only still-valid issues, skip the rest with a brief reason, keep changes
minimal, and validate.

Architecture findings:
- trivial: The standalone revision removes the old proxy module and both proxy
names from the executor package. External launchers using either import form can
fail before serving starts. Merging the planned forwarding shim does not repair
an image, wheel, or pin built from the standalone revision.
- trivial: Consumers using only BASE_EXAMPLE_CLASSES reject old pickles naming
the relocated classes under executor.result or executor.postproc_worker, even
where those Python imports still resolve. Rollback to the base map likewise
rejects artifacts carrying the new names. This affects integrations that retain
or exchange these pickles across versions; the reviewed head-to-head round-trip
does not exercise either direction.

After applying the fix, consider running `coderabbit review --agent` for local
review. Visit https://docs.coderabbit.ai/cli?utm_source=ghpr
Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a428fab and 622c5e0.

Files selected for processing: 4

  • tensorrt_llm/executor/__init__.py
  • tensorrt_llm/executor/logprobs.py
  • tensorrt_llm/executor/request.py
  • tests/unittest/executor/test_layering.py
Files skipped from review as they are similar to previous changes: 1

  • tensorrt_llm/executor/logprobs.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

Comment thread .pre-commit-config.yaml Resolved
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #88673 [ run ] triggered by Bot. Commit: 622c5e0 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #88656 [ run ] completed with state ABORTED. Commit: a428fab

Link to invocation

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

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.

@QiJune

QiJune commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #88693 [ run ] triggered by Bot. Commit: 622c5e0 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #88673 [ run ] completed with state ABORTED. Commit: 622c5e0

Link to invocation

@trtllm-agent-review trtllm-agent-review 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.

Thanks for the PR. It moves the classic IPC executor proxy to tensorrt_llm.llmapi.engine_client, splits the shared logprob, response, metrics and postprocessing types out of the executor modules behind re-exports, makes the tensorrt_llm.executor exports lazy and adds an import-direction test.

Reviewed at commit 4ed48f6b56 (51 files, +972/−442). The PR moved to 622c5e0994 while the review ran; those later changes are not covered here.

Approve: no Blocker found. 2 possible blockers below need a measurement or a closer look. 8 suggestions below are nice to have.

Possible blockers (2)

  • (P2: Stated as intended) Between this PR and #23146 main has no tensorrt_llm.executor.proxy, so open PRs that still import it can merge on stale CI and break main, as in the #17968/#17969 gap. (__init__.py:110)
  • (P2: Stated as intended) The proxy's log calls move from the executor to the llmapi TLLM_LOG_LEVEL_BY_MODULE tag with no doc or release note, so debug:executor users silently lose proxy messages. (proxy.py:40)
Nice to have (8): 8 inline, 0 below
  • (N1: Architecture and design) Moved types now have two or three import paths with no canonical one; seven production modules still import them through executor.result or executor.postproc_worker. (openai_server.py:48)
  • (N1: Architecture and design) ResponseWrapper, the metrics helpers and PostprocWorkerConfig land in executor/utils.py, which still imports llmapi and the MPI session, so the shared types are not a leaf. (utils.py:251)
  • (N7: Robustness hardening) A circular import through the lazy facade now reports a missing export ('cannot import name ...') instead of the partially-initialized-module hint. (__init__.py:90)
  • (N1: Architecture and design) The engine-client package has no contract against engine internals, although proxy.py imports executor.worker and executor.worker_process_monitor. (proxy.py:63)
  • (N3: Missing or ineffective tests) Nothing pins the new lazy export table, the layering gate cannot see the four exempted llmapi modules or the lazy targets, and the new file re-parses the whole tree. (__init__.py:40)
  • (R1: PR process) Four open PRs (#21673, #22153, #22828, #22887) edit tensorrt_llm/executor/proxy.py, but the merge-order section names only #23146. (__init__.py:1)
  • (R3: Repository rules) History-narrating comments (AGENTS.md) and unannotated new functions in tensorrt_llm/executor/init.py (CODING_GUIDELINES.md). (__init__.py:65)
  • (N5: Code tidiness) The moved collective_rpc guard still says 'this shim', _import_lazy_module has a dead branch, and an allowlist comment names the wrong module. (worker.py:122)
What this review checked
  • The extracted definitions (the prompt-logprob helpers including the CUDA-OOM CPU retry, ResponseWrapper, the perf-metrics helpers, the collective_rpc guard, PostprocArgs/PostprocParams/PostprocWorkerConfig) are AST-identical to their base versions apart from quoted annotations and two docstrings, and every name the moved proxy imports resolves to the same object as before.
  • With stubbed bindings and TRT_LLM_NO_LIB_INIT=1, fresh-process imports of 49 modules and 15 package-root names show no import that worked before failing now, and 14 newly importable (executor, executor.logprobs, worker, rpc_proxy, llmapi.engine_client.proxy, ...); no file in the tree still references tensorrt_llm.executor.proxy.
  • The new layering contracts pass at this head (0 violations, 0 stale allowances) and report 5 violations and 2 stale allowances on the base tree, so test_layering.py can fail.
  • Not covered: No GPU run and no import run with real bindings; imports were probed with stubbed bindings.
  • Not covered: No CI run exists for this PR yet.
  • Not covered: The companion PRs #23146 and #23147 were not reviewed.

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.

Comment thread tensorrt_llm/executor/__init__.py Resolved
Comment thread tensorrt_llm/serve/openai_server.py Resolved
Comment thread tensorrt_llm/executor/utils.py Resolved
Comment thread tensorrt_llm/executor/__init__.py Resolved
Comment thread tensorrt_llm/executor/__init__.py Resolved
Comment thread tensorrt_llm/executor/__init__.py Resolved
Comment thread tensorrt_llm/executor/__init__.py Resolved
Comment thread tensorrt_llm/executor/worker.py Resolved
@trtllm-agent-review

Copy link
Copy Markdown
Collaborator

What this PR changes, by code owner

For each code owner (a team or a person) of files this PR changes: what it changes there. The review above has the findings.

trt-llm-infra-devs · 5 files
The lint lists and the legacy-ruff baseline now name the moved proxy at tensorrt_llm/llmapi/engine_client/proxy.py, still under the legacy formatters. The multi-GPU trigger list gains tensorrt_llm/llmapi/engine_client/, and l0_cpu gains the new CPU layering test.

Files
  • .pre-commit-config.yaml
  • jenkins/L0_MergeRequest.groovy
  • ruff-legacy-baseline.json
  • ruff-legacy.toml
  • tests/integration/test_lists/test-db/l0_cpu.yml

trt-llm-devs · 6 files
The session-reuse and prefetch test plugins now patch MpiPoolSession on tensorrt_llm.llmapi.engine_client.proxy, and the tests here import the proxy and the collective_rpc guard from their new modules. legacy-files.txt lists the proxy at its new path, and l0_cpu gains the new layering test.

Files
  • legacy-files.txt
  • tests/integration/defs/kv_cache/test_final_single_token_context_cuda_graph.py
  • tests/integration/test_lists/test-db/l0_cpu.yml
  • tests/test_common/session_prefetcher.py
  • tests/test_common/session_reuse.py
  • tests/unittest/_torch/memory/test_memory_monitor_runtime.py

trt-llm-oss-compliance · 1 file
The ruff format exclude list in pyproject.toml now names the moved proxy at tensorrt_llm/llmapi/engine_client/proxy.py instead of tensorrt_llm/executor/proxy.py.

Files
  • pyproject.toml

trt-llm-runtime-devs · 40 files
To prepare the #23147 wire integration, the IPC proxy moves to tensorrt_llm/llmapi/engine_client/proxy.py and the shared logprob, response, metrics, collective_rpc-guard and postprocessing definitions move into executor/logprobs.py, utils.py and request.py behind old-path re-exports. tensorrt_llm.executor exports become lazy and drop the proxy names until #23146; a CPU test enforces import directions.

Files
  • tensorrt_llm/_torch/pyexecutor/context_logits_plan.py
  • tensorrt_llm/_torch/pyexecutor/llm_request.py
  • tensorrt_llm/_torch/pyexecutor/sampler/beam_search.py
  • tensorrt_llm/_torch/pyexecutor/sampler/logprobs.py
  • tensorrt_llm/_torch/pyexecutor/sampler/sampler.py
  • tensorrt_llm/executor/__init__.py
  • tensorrt_llm/executor/base_worker.py
  • tensorrt_llm/executor/executor.py
  • tensorrt_llm/executor/logprobs.py
  • tensorrt_llm/executor/postproc_worker.py
  • tensorrt_llm/executor/proxy.py
  • tensorrt_llm/executor/ray/executor.py
  • tensorrt_llm/executor/ray/gpu_worker.py
  • tensorrt_llm/executor/request.py
  • tensorrt_llm/executor/result.py
  • tensorrt_llm/executor/rpc_proxy.py
  • tensorrt_llm/executor/rpc_worker.py
  • tensorrt_llm/executor/utils.py
  • tensorrt_llm/executor/worker.py
  • tensorrt_llm/llmapi/engine_client/__init__.py
  • tensorrt_llm/llmapi/engine_client/proxy.py
  • tensorrt_llm/llmapi/serialization.py
  • tensorrt_llm/serve/_frontend_processes.py
  • tensorrt_llm/serve/openai_server.py
  • tests/unittest/_torch/multi_gpu/test_mpi_sleep_wakeup.py
  • tests/unittest/executor/test_base_worker.py
  • tests/unittest/executor/test_layering.py
  • tests/unittest/executor/test_multi_frontend_routing.py
  • tests/unittest/executor/test_proxy_fast_death.py
  • tests/unittest/executor/test_proxy_postproc_terminate.py
  • tests/unittest/executor/test_proxy_profile_sync.py
  • tests/unittest/executor/test_proxy_request_sender.py
  • tests/unittest/executor/test_sleep_collective_rpc_guards.py
  • tests/unittest/executor/test_undelivered_exports.py
  • tests/unittest/grpc/openengine/test_capability_conformance.py
  • tests/unittest/grpc/openengine/test_frontend_lifecycle.py
  • tests/unittest/grpc/openengine/test_metrics.py
  • tests/unittest/llmapi/test_executor.py
  • tests/unittest/llmapi/test_kv_hints.py
  • tests/unittest/llmapi/test_session_reuse.py

trt-llm-qa-function · 1 file
The KV-cache CUDA-graph integration test now imports GenerationExecutorProxy from tensorrt_llm.llmapi.engine_client.proxy and PostprocWorkerConfig from tensorrt_llm.executor.utils, following the move, with no change to what it tests.

Files
  • tests/integration/defs/kv_cache/test_final_single_token_context_cuda_graph.py

trt-llm-disagg-devs · 1 file
The KV-transfer fail-stop test imports GenerationExecutorProxy from its new module, tensorrt_llm.llmapi.engine_client.proxy, with no other change.

Files
  • tests/unittest/disaggregated/test_kv_transfer_fail_stop.py

trt-llm-dynamo-devs · 3 files
The OpenEngine gRPC tests import GenerationExecutorProxy from tensorrt_llm.llmapi.engine_client.proxy and point one comment at the new path, with no change to what they test.

Files
  • tests/unittest/grpc/openengine/test_capability_conformance.py
  • tests/unittest/grpc/openengine/test_frontend_lifecycle.py
  • tests/unittest/grpc/openengine/test_metrics.py

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #88693 [ run ] completed with state SUCCESS. Commit: 622c5e0
/LLM/main/L0_MergeRequest_PR pipeline #73670 completed with status: 'FAILURE'

CI Report

⚠️ Resource Maintenance — Test Coverage Reduced:

Resource maintenance in LLM/main/L0_Test-x86_64-Single-GPU #10890: AWS-PDX-SLURM-1 is unavailable for maintenance on 2026-12-02 17:00-23:00 UTC; H100_PCIe-PyTorch-Perf-1 was retired from main.
Affected stages:
DGX_B300-PyTorch-1
DGX_B300-PyTorch-2
DGX_B300-PyTorch-3
DGX_B300-PyTorch-4

⚠️ 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

CI Agent Failure Analysis

Link to invocation

@YihuiLu512

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #88718 [ run ] triggered by Bot. Commit: 622c5e0 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #88718 [ run ] completed with state SUCCESS. Commit: 622c5e0
/LLM/main/L0_MergeRequest_PR pipeline #73691 completed with status: 'SUCCESS'

CI Report

⚠️ Resource Maintenance — Test Coverage Reduced:

Resource maintenance in LLM/main/L0_Test-x86_64-Single-GPU #11863: AWS-PDX-SLURM-1 is unavailable for maintenance on 2026-12-02 17:00-23:00 UTC; H100_PCIe-PyTorch-Perf-1 was retired from main.
Affected stages:
DGX_B300-PyTorch-1
DGX_B300-PyTorch-2
DGX_B300-PyTorch-3
DGX_B300-PyTorch-4

Resource maintenance in LLM/main/L0_Test-x86_64-Multi-GPU #1095: AWS-PDX-SLURM-1 is unavailable for maintenance on 2026-12-02 17:00-23:00 UTC; H100_PCIe-PyTorch-Perf-1 was retired from main.
Affected stages:
DGX_B300-4_GPUs-PyTorch-1
DGX_B300-2_GPUs-2_Nodes-PyTorch-Disagg-PerfSanity-FUNCTIONAL-ONLY-1

Link to invocation

@YihuiLu512
YihuiLu512 added this pull request to the merge queue Dec 2, 2026
Merged via the queue into NVIDIA:main with commit 26bf675 Dec 2, 2026
40 checks passed
@YihuiLu512
YihuiLu512 deleted the feat-dev-J17503-pre-cleanup branch December 2, 2026 22:03
JunyiXu-nv added a commit to JunyiXu-nv/TensorRT-LLM that referenced this pull request Dec 3, 2026
…NVIDIA#23145/NVIDIA#23147 (trtllm.engine.v1)

Signed-off-by: JunyiXu-nv <219237550+JunyiXu-nv@users.noreply.github.com>
YihuiLu512 added a commit to YihuiLu512/TensorRT-LLM that referenced this pull request Dec 3, 2026
…roxy

Second half of the NVIDIA#23145 classic IPC proxy move, following the NVIDIA#17968 / NVIDIA#17969 pattern so NVIDIA#23145 records a clean git rename and preserves blame:

- Add a definition-free forwarding module at tensorrt_llm/executor/proxy.py
  re-exporting GenerationExecutorProxy and GenerationExecutorFrontendProxy
  with a one-shot FutureWarning (removal in 1.6.0).
- Keep GenerationExecutorProxy and GenerationExecutorFrontendProxy readable
  through tensorrt_llm.executor's __getattr__ (including star import for
  GenerationExecutorProxy), and resolve tensorrt_llm.executor.proxy as a
  package attribute without importing it first.
- Cover shim identity, one-shot FutureWarning, star import, package-attribute
  lookup, and the in-repo old-path import ban (including bare/relative/wildcard
  and literal import_module imports) in tests/unittest/executor/test_layering.py
  (already in l0_cpu.yml), allowing only the two explicit forwarding edges in
  _SHIM_ALLOWANCES.

Signed-off-by: Yihui Lu <269394165+YihuiLu512@users.noreply.github.com>
YihuiLu512 added a commit to YihuiLu512/TensorRT-LLM that referenced this pull request Dec 3, 2026
…roxy

Second half of the NVIDIA#23145 classic IPC proxy move, following the NVIDIA#17968 / NVIDIA#17969 pattern so NVIDIA#23145 records a clean git rename and preserves blame:

- Add a definition-free forwarding module at tensorrt_llm/executor/proxy.py
  re-exporting GenerationExecutorProxy and GenerationExecutorFrontendProxy
  with a one-shot FutureWarning (removal in 1.6.0).
- Keep GenerationExecutorProxy and GenerationExecutorFrontendProxy readable
  through tensorrt_llm.executor's __getattr__ (including star import for
  GenerationExecutorProxy), and resolve tensorrt_llm.executor.proxy as a
  package attribute without importing it first.
- Cover shim identity, one-shot FutureWarning, star import, package-attribute
  lookup, and the in-repo old-path import ban (including bare/relative/wildcard
  and literal import_module imports) in tests/unittest/executor/test_layering.py
  (already in l0_cpu.yml), allowing only the two explicit forwarding edges in
  _SHIM_ALLOWANCES.

Signed-off-by: Yihui Lu <269394165+YihuiLu512@users.noreply.github.com>
YihuiLu512 added a commit to YihuiLu512/TensorRT-LLM that referenced this pull request Dec 3, 2026
…roxy

Second half of the NVIDIA#23145 classic IPC proxy move, following the NVIDIA#17968 / NVIDIA#17969 pattern so NVIDIA#23145 records a clean git rename and preserves blame:

- Add a definition-free forwarding module at tensorrt_llm/executor/proxy.py
  re-exporting GenerationExecutorProxy and GenerationExecutorFrontendProxy
  with a one-shot FutureWarning (will be removed in the future).
- Keep GenerationExecutorProxy and GenerationExecutorFrontendProxy readable
  through tensorrt_llm.executor's __getattr__ (including star import for
  GenerationExecutorProxy), and resolve tensorrt_llm.executor.proxy as a
  package attribute without importing it first.
- Cover shim identity, one-shot FutureWarning, star import, package-attribute
  lookup, and the in-repo old-path import ban (including bare/relative/wildcard
  and literal import_module imports) in tests/unittest/executor/test_layering.py
  (already in l0_cpu.yml), allowing only the two explicit forwarding edges in
  _SHIM_ALLOWANCES.

Signed-off-by: Yihui Lu <269394165+YihuiLu512@users.noreply.github.com>
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