From 9f619f6e182b155aa11f71ade71f13508c9c1786 Mon Sep 17 00:00:00 2001 From: Apurba Bose <44209735+apbose@users.noreply.github.com> Date: Tue, 23 Jun 2026 00:44:40 +0200 Subject: [PATCH] MD-TRT changes for release 2.13 (#4358) --- py/torch_tensorrt/_utils.py | 6 +++--- .../dynamo/conversion/_TRTInterpreter.py | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/py/torch_tensorrt/_utils.py b/py/torch_tensorrt/_utils.py index 9b2993b56d..8ff45e20bf 100644 --- a/py/torch_tensorrt/_utils.py +++ b/py/torch_tensorrt/_utils.py @@ -135,7 +135,7 @@ def is_platform_supported_for_trtllm() -> bool: return True except Exception as e: - logger.warning(f"Failed to detect CUDA version: {e}") + logger.info(f"Failed to detect CUDA version: {e}") return False return True @@ -236,7 +236,7 @@ def download_and_get_plugin_lib_path() -> Optional[str]: wheel_path.unlink(missing_ok=True) logger.debug(f"Deleted wheel file: {wheel_path}") except Exception as e: - logger.warning(f"Could not delete wheel file {wheel_path}: {e}") + logger.info(f"Could not delete wheel file {wheel_path}: {e}") if not plugin_lib_path.exists(): logger.error( f"Plugin library not found at expected location: {plugin_lib_path}" @@ -356,7 +356,7 @@ def load_tensorrt_llm_for_nccl() -> bool: "on", ) if not use_trtllm_plugin: - logger.warning( + logger.info( "Neither TRTLLM_PLUGIN_PATH is set nor is it directed to download the shared library. Please set either of the two to use TRT-LLM libraries in torchTRT" ) return False diff --git a/py/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py b/py/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py index 1b7982f074..db14041756 100644 --- a/py/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py +++ b/py/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py @@ -199,6 +199,18 @@ def _populate_trt_builder_config( ) -> trt.IBuilderConfig: builder_config = self.builder.create_builder_config() + # Enable TRT's native multi-device runtime preview feature when the + # Torch-TRT runtime was built with NCCL collectives support. Without + # this, IBuilder::buildEngineWithConfig() rejects networks that contain + # IDistCollectiveLayer with "PreviewFeature::kMULTIDEVICE_RUNTIME_10_16 + # is not enabled in the builder config". + if ENABLED_FEATURES.native_trt_collectives and hasattr( + trt.PreviewFeature, "MULTIDEVICE_RUNTIME_10_16" + ): + builder_config.set_preview_feature( + trt.PreviewFeature.MULTIDEVICE_RUNTIME_10_16, True + ) + if self._debugger_config and self._debugger_config.engine_builder_monitor: builder_config.progress_monitor = TRTBulderMonitor()