Skip to content

Add multi-GPU (TensorRT Multi-Device) Triton inference example - #2332

Open
pkisfaludi-nv wants to merge 1 commit into
nv-morpheus:branch-25.10from
pkisfaludi-nv:feat/trt-28040-multi-device-triton
Open

Add multi-GPU (TensorRT Multi-Device) Triton inference example#2332
pkisfaludi-nv wants to merge 1 commit into
nv-morpheus:branch-25.10from
pkisfaludi-nv:feat/trt-28040-multi-device-triton

Conversation

@pkisfaludi-nv

Copy link
Copy Markdown

Summary

Adds an example showing a Morpheus pipeline running a single TensorRT engine sharded across multiple GPUs via the TensorRT Multi-Device (MD)–enabled Triton tensorrt backend — with no Morpheus code change.

Because TritonInferenceStage is a transparent gRPC client, MD (a single engine split across ≥2 GPUs by the Triton backend over NCCL, GA in TensorRT 11) is entirely server-side. The only difference between single-GPU and multi-GPU inference is model_name="mlp_sd" vs "mlp_md".

What's added (examples/multi_device_triton/)

  • run.py — a LinearPipeline (InMemorySource → Deserialize → BuildInput → TritonInferenceStage → InMemorySink); --compare asserts the 2-GPU MD model matches the 1-GPU baseline.
  • model_repo/mlp_md + model_repo/mlp_sd — batched Triton configs (the MD model adds only KIND_MODEL + enable_multi_device/multi_device_gpus/multi_device_per_rank_engines).
  • build_tp_engines_batched.cpp — builds the TP-sharded MLP plans (column-parallel W1, row-parallel W2 + AllReduce, dynamic batch).
  • triton_md_compare.py — a raw-gRPC correctness gate (validates the server independently of Morpheus).

Validation

On 8× B200 (NVLink), Morpheus 25.06-runtime, MD tensorrt backend on TensorRT 11.1 + NCCL, tritonserver:25.06-py3:

  • Morpheus end-to-end run.py --compare: mlp_sd (1 GPU) vs mlp_md (2 GPU) → rel_max = 4.78e-3 PASS (pipeline identical except model_name).
  • Raw-gRPC gate: rel_max = 3.56e-3, cos_min = 0.999999. Server logs TensorRT Multi-Device ready: 2 ranks; both GPUs hold the model.

Notes

  • Requires a Triton server whose tensorrt backend is built with -DTRITON_ENABLE_TENSORRT_MULTI_DEVICE=ON (TensorRT ≥ 11, NCCL).
  • run.py includes small, commented workarounds for a numba/cuda-python binding quirk in the 25.06-runtime container (cudf device→host repr; uses DLPack for the device handoff). They are cosmetic to data movement.

🤖 Generated with Claude Code

Morpheus runs inference via TritonInferenceStage, a transparent gRPC client, so
TensorRT Multi-Device (a single engine sharded across >=2 GPUs by the Triton
tensorrt backend, GA in TRT 11) is free server-side with no Morpheus code change:
the only delta between 1-GPU and 2-GPU is model_name. Adds a LinearPipeline
example, MD/SD model configs, a batched TP engine builder, and a raw-gRPC
correctness gate. Validated on 8x B200 (rel_max 4.78e-3, mlp_sd vs mlp_md).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Peter Kisfaludi <pkisfaludi@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Jun 5, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@pkisfaludi-nv
pkisfaludi-nv marked this pull request as ready for review June 10, 2026 03:07
@pkisfaludi-nv
pkisfaludi-nv requested a review from a team as a code owner June 10, 2026 03:07
@morpheus-bot-test morpheus-bot-test Bot moved this to Review - Ready for Review in Morpheus Boards Jun 10, 2026
@pkisfaludi-nv

Copy link
Copy Markdown
Author

@dagardner-nv (cc @nv-morpheus/morpheus-codeowners-eng) — this is now ready for review. It adds an examples/multi_device_triton/ example showing a Morpheus pipeline running multi-GPU TensorRT inference via an MD-enabled Triton backend with no Morpheus code change (only model_name differs); validated end-to-end on 8× B200 (rel_max 4.78e-3, mlp_sd vs mlp_md).

Two things I can't do from a fork and would appreciate help with:

  • Label Checker is failing — it needs a category label (e.g. non-breaking/feature); could a maintainer add the appropriate one?
  • copy-pr-bot notes CI won't run until a PR vetter approves — would appreciate a vet when convenient.

Happy to address any feedback. Thanks!

@willkill07 willkill07 added non-breaking Non-breaking change feature request New feature or request labels Aug 11, 2026
@willkill07

Copy link
Copy Markdown
Member

/ok to test 0aa7534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request New feature or request non-breaking Non-breaking change

Projects

Status: Review - Ready for Review

Development

Successfully merging this pull request may close these issues.

2 participants