Skip to content

[None][refactor] Organize SMG gRPC adapter by protocol - #17179

Open
QiJune wants to merge 12 commits into
NVIDIA:mainfrom
QiJune:grpc
Open

[None][refactor] Organize SMG gRPC adapter by protocol#17179
QiJune wants to merge 12 commits into
NVIDIA:mainfrom
QiJune:grpc

Conversation

@QiJune

@QiJune QiJune commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Dev Engineer Review

  • Refactored the SMG gRPC adapter into tensorrt_llm.grpc.smg.
  • Added bindings.py, server.py, and package metadata.
  • Updated protobuf imports to use the new bindings path.
  • Updated serve.py to launch launch_smg_server.
  • Added optional dependency handling and actionable installation errors.
  • Added server cleanup for binding and startup failures.
  • Added protobuf>=5.27.2 to runtime requirements.
  • Added smg-grpc-proto>=0.4.2 to development requirements.
  • Compatibility aliases for removed gRPC exports and module paths remain a follow-up.
  • The CLI help and error text use tensorrt_llm[devel]. The required package name is tensorrt_llm[grpc-smg]. Align the documentation and error text.
  • Document that trtllm-serve --grpc requires pip install tensorrt_llm[grpc-smg].
  • Confirm that ImportError handling only catches missing smg_grpc_proto and does not mask unrelated import failures.
  • Confirm that binding and startup failure paths always stop the gRPC server and shut down the loaded engine.
  • Confirm that tests/unittest/grpc/smg/test_smg.py is registered in the required CI test list.
  • Review the reported CI failures, including the test-list failure involving synthetic cache-transceiver entries and failures after the optional packaging change.

QA Engineer Review

  • Added:
    • test_smg_bindings_missing_gives_actionable_error
    • test_smg_bindings_preserves_unrelated_import_error
    • test_smg_bindings_present_smoke
    • test_smg_server_startup_failure_cleans_up
  • Updated tests/unittest/grpc/smg/test_smg.py for the new package path and optional dependency behavior.
  • Added unittest/grpc/test_grpc_optional.py and unittest/grpc/smg/test_smg.py to tests/integration/test_lists/test-db/l0_a10.yml.
  • Test coverage is registered for the A10 PyTorch pre-merge list.
  • Verdict: needs follow-up until CI execution and the optional package-name documentation are confirmed.

Description

Test Coverage

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.

@QiJune

QiJune commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The gRPC serve command now uses the SMG gRPC server launcher. The change adds optional SMG bindings, backend initialization, graceful shutdown, dependency validation, adapter import updates, and focused tests.

Changes

SMG gRPC integration

Layer / File(s) Summary
SMG adapter bindings and imports
tensorrt_llm/grpc/..., tests/unittest/grpc/smg/test_smg.py
Adds optional protobuf bindings and updates the SMG request manager, servicer, package documentation, and adapter tests.
SMG server lifecycle
tensorrt_llm/grpc/smg/server.py
Adds launch_smg_server with backend initialization, gRPC configuration, signal handling, graceful shutdown, and LLM engine cleanup.
Serve command wiring and dependency validation
tensorrt_llm/commands/serve.py, requirements*.txt, tests/unittest/grpc/test_grpc_optional.py, tests/integration/test_lists/test-db/l0_a10.yml
Routes --grpc serving through the SMG launcher, validates the optional dependency, updates requirements, and adds dependency and cleanup tests.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ServeCommand
  participant launch_smg_server
  participant LLMEngine
  participant RequestManager
  participant SMGServicer
  participant grpcServer
  ServeCommand->>launch_smg_server: host, port, LLM arguments, served model name
  launch_smg_server->>LLMEngine: initialize selected backend
  launch_smg_server->>RequestManager: create request manager
  launch_smg_server->>SMGServicer: register SMG servicer
  launch_smg_server->>grpcServer: configure, bind, and start
  grpcServer-->>launch_smg_server: termination signal
  launch_smg_server->>grpcServer: stop with grace period
  launch_smg_server->>LLMEngine: shut down engine
Loading

Suggested reviewers: niukuo, schetlur-nv

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description retains the template but provides no issue, solution, or test coverage details, and it does not complete the checklist. Add a concise Description, list relevant tests and results, and complete applicable checklist items, including dependency and API-change reviews.
Docstring Coverage ⚠️ Warning Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: reorganizing the SMG gRPC adapter by protocol.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@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 posted: 1

🧹 Nitpick comments (1)
tensorrt_llm/grpc/smg/server.py (1)

117-120: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Dead except KeyboardInterrupt branch.

loop.add_signal_handler(signal.SIGINT, signal_handler) at Line 115 replaces the default SIGINT handling for this event loop. Once registered, SIGINT no longer raises KeyboardInterrupt inside the coroutine; it invokes signal_handler, which sets stop_event. The except KeyboardInterrupt at Line 119 therefore does not trigger during normal operation after Line 115 runs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tensorrt_llm/grpc/smg/server.py` around lines 117 - 120, Remove the
unreachable KeyboardInterrupt handler around stop_event.wait in the server
startup flow. Keep loop.add_signal_handler(signal.SIGINT, signal_handler) and
the existing stop_event-based shutdown behavior unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tensorrt_llm/grpc/smg/server.py`:
- Around line 62-129: Widen the cleanup scope in the server lifecycle so the
existing shutdown logic covering llm.shutdown() also handles failures from
server.add_insecure_port(), server.start(), and subsequent startup or serving
operations after LLM construction. Ensure cleanup runs exactly once for any
post-construction exception while preserving the current graceful server.stop()
behavior.

---

Nitpick comments:
In `@tensorrt_llm/grpc/smg/server.py`:
- Around line 117-120: Remove the unreachable KeyboardInterrupt handler around
stop_event.wait in the server startup flow. Keep
loop.add_signal_handler(signal.SIGINT, signal_handler) and the existing
stop_event-based shutdown behavior unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 822a751f-5f58-42a0-9edd-1f2f2d73f128

📥 Commits

Reviewing files that changed from the base of the PR and between bf1ddb7 and fd9c25e.

📒 Files selected for processing (8)
  • tensorrt_llm/commands/serve.py
  • tensorrt_llm/grpc/__init__.py
  • tensorrt_llm/grpc/smg/__init__.py
  • tensorrt_llm/grpc/smg/bindings.py
  • tensorrt_llm/grpc/smg/request_manager.py
  • tensorrt_llm/grpc/smg/server.py
  • tensorrt_llm/grpc/smg/servicer.py
  • tests/unittest/grpc/smg/test_smg.py

Comment thread tensorrt_llm/grpc/smg/server.py Outdated
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63353 [ run ] triggered by Bot. Commit: fd9c25e Link to invocation

@BowenFu

BowenFu commented Aug 3, 2026

Copy link
Copy Markdown

The server move appears behavior-preserving: message limits, keepalive settings, signal handling, and shutdown ordering are unchanged. Could you address three follow-ups before merge?

  • Register tests/unittest/grpc/smg/test_smg.py in CI.
  • Consider one-release aliases for the old gRPC exports/module paths if router-side code may use them.
  • Extend cleanup around binding/startup so failures after loading the LLM still stop the server and engine.

I’d wait for a clean pipeline before approval.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63353 [ run ] completed with state FAILURE. Commit: fd9c25e
/LLM/main/L0_MergeRequest_PR pipeline #51341 completed with status: 'FAILURE'

CI Report

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

@QiJune

QiJune commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63365 [ run ] triggered by Bot. Commit: fd9c25e Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63365 [ run ] completed with state FAILURE. Commit: fd9c25e
/LLM/main/L0_MergeRequest_PR pipeline #51350 completed with status: 'FAILURE'

CI Report

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

@BowenFu

BowenFu commented Aug 3, 2026

Copy link
Copy Markdown

The current red runs look unrelated: build 51350 reports 27,211 passing tests and only stage-level failures. Several PRs on the same base also fail Check Test List on synthetic cache-transceiver precheck names in waives.txt.

Could you rerun once the base validator issue is fixed? My remaining code concerns are CI registration for test_smg.py and compatibility aliases for the removed gRPC paths.

@QiJune

QiJune commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@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 posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tensorrt_llm/grpc/smg/bindings.py`:
- Around line 18-25: Update the import guard around trtllm_service_pb2 and
trtllm_service_pb2_grpc to catch ModuleNotFoundError only when e.name equals
"smg_grpc_proto"; preserve the existing optional-package error for that case,
and re-raise all other import failures unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: bf8b014c-c62a-42f9-a3ed-9c392a0a2ff1

📥 Commits

Reviewing files that changed from the base of the PR and between fd9c25e and 86924e4.

📒 Files selected for processing (8)
  • requirements-dev.txt
  • requirements.txt
  • setup.py
  • tensorrt_llm/commands/serve.py
  • tensorrt_llm/grpc/smg/bindings.py
  • tests/integration/test_lists/test-db/l0_a10.yml
  • tests/unittest/grpc/smg/test_smg.py
  • tests/unittest/grpc/test_grpc_optional.py
💤 Files with no reviewable changes (1)
  • requirements.txt
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/unittest/grpc/smg/test_smg.py
  • tensorrt_llm/commands/serve.py

Comment thread tensorrt_llm/grpc/smg/bindings.py
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63659 [ run ] triggered by Bot. Commit: fbcf044 Link to invocation

@BowenFu

BowenFu commented Aug 4, 2026

Copy link
Copy Markdown

smg-grpc-proto becoming optional looks reasonable. Could you tighten two edges before merge?

  • Document that trtllm-serve --grpc now requires pip install tensorrt_llm[grpc-smg].
  • Narrow both ImportError handlers to the missing top-level smg_grpc_proto package. Currently, unrelated gRPC/protobuf or sibling-import failures are rewritten as an installation hint, which could hide real breakage. Matching e.name or checking find_spec would preserve the helpful message without masking other errors.

The title could also mention optional packaging, since this is more than a directory refactor. I’d hold until the import boundary is narrowed and CI completes.

@QiJune

QiJune commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64556 [ run ] triggered by Bot. Commit: f7c03dc Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64556 [ run ] completed with state FAILURE. Commit: f7c03dc
/LLM/main/L0_MergeRequest_PR pipeline #52429 completed with status: 'FAILURE'

CI Report

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

@QiJune

QiJune commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64840 [ run ] triggered by Bot. Commit: 90bb852 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #64840 [ run ] completed with state SUCCESS. Commit: 90bb852
/LLM/main/L0_MergeRequest_PR pipeline #52681 completed with status: 'FAILURE'

CI Report

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

QiJune added 2 commits August 10, 2026 09:50
Move the smg-grpc-proto pin from requirements-dev.txt into setup.py as
the single source of truth. Add a user-facing grpc-smg extra for SMG
gateway deployments; the devel extra aggregates it so developers and CI
still get the adapter. Update install hints and tests accordingly.

Signed-off-by: junq <22017000+QiJune@users.noreply.github.com>
The CI test environment is provisioned at image granularity: the release
image installs the wheel, and test stages only add requirements-dev.txt,
which no longer carries smg-grpc-proto. Bake the grpc-smg extra into the
wheel install (alongside mx) so unittest/grpc/smg keeps running in CI
instead of being silently skipped by importorskip once images rebuild.

Signed-off-by: junq <22017000+QiJune@users.noreply.github.com>
@QiJune

QiJune commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "A10-PyTorch-1"

@QiJune

QiJune commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "A10-PyTorch-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65008 [ run ] triggered by Bot. Commit: 9b54438 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65008 [ run ] completed with state FAILURE. Commit: 9b54438
/LLM/main/L0_MergeRequest_PR pipeline #52819 (Partly Tested) completed with status: 'FAILURE'

CI Report

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

…nts file

Give each gRPC gateway a dedicated requirements-<gateway>.txt as the
single source of truth for its dependency pins, starting with
requirements-grpc-smg.txt; setup.py parses it into the grpc-smg extra,
and the file is owned by OSS compliance like the other requirements
files. A requirements file may carry gateway-specific options such as
an --extra-index-url without touching the default dependency graph,
which a setup.py literal cannot express, so the OpenEngine adapter can
declare its BSR-resolved pins the same way.

CI test environments install exactly zero or one gateway file per
stage, routed by whether the gateway's pins co-resolve with the default
environment. SMG co-resolves, so the shared K8s and SLURM provisioning
paths install its file next to requirements-dev.txt; this restores the
package that unittest/grpc/smg needs after its move out of
requirements.txt (without it the module is skipped at collection and
pytest exit code 5 fails the stage, pipeline 52819). A gateway whose
pins conflict with the default environment installs its file behind a
dedicated stage guard instead, as documented at the provisioning site.

Signed-off-by: junq <22017000+QiJune@users.noreply.github.com>
@QiJune

QiJune commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --stage-list "A10-PyTorch-1"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65041 [ run ] triggered by Bot. Commit: f7adfde Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65041 [ run ] completed with state SUCCESS. Commit: f7adfde
/LLM/main/L0_MergeRequest_PR pipeline #52850 (Partly Tested) completed with status: 'SUCCESS'

CI Report

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.

The reorganization is clean: no stale references to the old module or test paths remain (checked test-db, waives, and imports), the optional-dependency guards correctly match on ModuleNotFoundError.name, and the pin-file plumbing is consistent across setup.py, Docker, Jenkins, and slurm.

Two notes on the PR description:

  • It's pasted CodeRabbit output, and several of its action items are stale against the actual diff — e.g. it claims the CLI text says tensorrt_llm[devel], but the diff consistently uses tensorrt_llm[grpc-smg], and the test-list registration it asks to confirm is already in l0_a10.yml. Please replace it with a short description of what the PR actually does.
  • The PR is titled [refactor] but bundles two behavior changes worth naming: the vocab_size read-through to the inner HF tokenizer in [request_manager.py:219](https://github.com/NVIDIA/TensorRT-LLM/pull/17179/files#diff-44ca1c6095111b3cd2ce91762e77269ceb1bf665339a241cfc7065350a84c285R219) (the wrapper's property raises NotImplementedError, so GetModelInfo previously failed to report vocab size), and the module→class fixture scoping in test_smg.py to keep the two test LLMs from coexisting on an A10. Both look correct; they just shouldn't be invisible in a refactor PR.

There's also a functional gap carried over from the old code, detailed inline: add_insecure_port failures are still silent, and the new bind-failure test mocks a failure mode gRPC doesn't actually have. Not a regression from this PR, so it's fine to handle in a follow-up rather than here.

logger.info("gRPC reflection enabled")

address = f"{host}:{port}"
server.add_insecure_port(address)

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.

Non-blocking, and pre-existing rather than introduced here — fine as a follow-up PR.

add_insecure_port never raises on failure — it returns the bound port, or 0 when binding fails (port already in use, bad address). The return value is ignored here, so on a real bind failure the server "starts" cleanly, logs Server is ready to accept requests, and blocks on stop_event while listening on nothing. Since this PR already adds the failure-cleanup path, checking the return is a natural next step:

if server.add_insecure_port(address) == 0:
    raise RuntimeError(f"Failed to bind gRPC server to {address}")

The finally block then handles teardown correctly.

grpc_server.stop = AsyncMock()

if failure_point == "bind":
grpc_server.add_insecure_port.side_effect = RuntimeError("bind failed")

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.

Follow-up along with the server.py bind check — no need to block this PR.

This simulates a bind failure with a raising mock, but real grpc.aio add_insecure_port doesn't raise — it returns 0 on failure. As written, the "bind" case validates cleanup for a failure mode that can't occur, while the actual bind-failure behavior (silent unbound server) goes untested. Once server.py checks the return value, change this case to grpc_server.add_insecure_port.return_value = 0 and assert on the resulting error, so the test exercises the real contract.

# PreTrainedTokenizerBase's abstract property (raises
# NotImplementedError). Read from the inner tokenizer.
tokenizer = self.llm.tokenizer
inner_tokenizer = getattr(tokenizer, "tokenizer", tokenizer)

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.

This is a behavior fix (GetModelInfo previously hit PreTrainedTokenizerBase's NotImplementedError through the wrapper and reported no vocab_size), not part of the package reorganization — worth a line in the PR description so it's findable later. Also, none of the tests in test_smg.py cover get_model_config() with a TransformersTokenizer-wrapped LLM; a small unit test asserting vocab_size comes from the inner tokenizer would keep this from regressing.

@QiJune

QiJune commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65249 [ run ] triggered by Bot. Commit: f7adfde Link to invocation

…image

Install the release image with [mx] only; gateway users add
pip install "tensorrt_llm[grpc-smg]" on top, same as wheel users.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: junq <22017000+QiJune@users.noreply.github.com>
@QiJune

QiJune commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run

@QiJune

QiJune commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

@CatherineSue Heads-up on a packaging change to the SMG gRPC adapter, since you've been the main contributor on the SMG side.

What changes. This PR moves smg-grpc-proto out of TensorRT-LLM's default install: it is no longer in requirements.txt, and the adapter code now lives under tensorrt_llm/grpc/smg/. Installation becomes opt-in:

pip install "tensorrt_llm[grpc-smg]"

This applies to the NGC release container as well — the image no longer preinstalls the SMG dependency, so existing containerized trtllm-serve --grpc deployments need to add the one-line pip install above on top of the image. Running --grpc without the extra fails fast with an error message pointing at that exact command.

Why. A second community gateway adapter (OpenEngine, #17084, from the Dynamo team) is being contributed alongside SMG, and the two bindings pin protobuf incompatibly (5.x vs 6.x). The principle we've aligned on is that gateway adapters are peer, community-maintained, opt-in extras: no gateway sits in the default install or the release image, and each owns a requirements-<gateway>.txt as the single source of truth for its pins. SMG is simply the first adapter moved onto this model, and OpenEngine will be held to the same bar.

What stays the same. Runtime behavior of the adapter is unchanged — this PR is a relocation plus the packaging split. The SMG unit tests remain in pre-merge CI (tests/unittest/grpc/smg/), with the dependency provisioned explicitly in the test environments.

If SMG-side docs reference the old install assumption ("gRPC works out of the box with pip install tensorrt_llm") or the old module paths (tensorrt_llm.grpc.grpc_servicer etc.), they'll want an update — module-path compatibility aliases are tracked as a follow-up.

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65257 [ run ] triggered by Bot. Commit: 64cb830 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65249 [ run ] completed with state ABORTED. Commit: f7adfde

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #65257 [ run ] completed with state FAILURE. Commit: 64cb830
/LLM/main/L0_MergeRequest_PR pipeline #53035 completed with status: 'FAILURE'

CI Report

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

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.

6 participants