Add multi-GPU (TensorRT Multi-Device) Triton inference example - #2332
Open
pkisfaludi-nv wants to merge 1 commit into
Open
Add multi-GPU (TensorRT Multi-Device) Triton inference example#2332pkisfaludi-nv wants to merge 1 commit into
pkisfaludi-nv wants to merge 1 commit into
Conversation
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>
Author
|
@dagardner-nv (cc @nv-morpheus/morpheus-codeowners-eng) — this is now ready for review. It adds an Two things I can't do from a fork and would appreciate help with:
Happy to address any feedback. Thanks! |
Member
|
/ok to test 0aa7534 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
tensorrtbackend — with no Morpheus code change.Because
TritonInferenceStageis 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 ismodel_name="mlp_sd"vs"mlp_md".What's added (
examples/multi_device_triton/)run.py— aLinearPipeline(InMemorySource → Deserialize → BuildInput → TritonInferenceStage → InMemorySink);--compareasserts 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 onlyKIND_MODEL+enable_multi_device/multi_device_gpus/multi_device_per_rank_engines).build_tp_engines_batched.cpp— builds the TP-sharded MLP plans (column-parallelW1, row-parallelW2+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, MDtensorrtbackend on TensorRT 11.1 + NCCL,tritonserver:25.06-py3:run.py --compare:mlp_sd(1 GPU) vsmlp_md(2 GPU) →rel_max = 4.78e-3PASS (pipeline identical exceptmodel_name).rel_max = 3.56e-3,cos_min = 0.999999. Server logsTensorRT Multi-Device ready: 2 ranks; both GPUs hold the model.Notes
tensorrtbackend is built with-DTRITON_ENABLE_TENSORRT_MULTI_DEVICE=ON(TensorRT ≥ 11, NCCL).run.pyincludes small, commented workarounds for a numba/cuda-python binding quirk in the25.06-runtimecontainer (cudf device→host repr; uses DLPack for the device handoff). They are cosmetic to data movement.🤖 Generated with Claude Code