MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT-LLM / _node_build_task

Method _node_build_task

tensorrt_llm/llmapi/llm_utils.py:862–875  ·  view source on GitHub ↗
(
        llm_args: LlmArgs,
        workspace: Optional[str | tempfile.TemporaryDirectory] = None,
        llm_build_stats: Optional['LlmBuildStats'] = None,
        engine_dir: Optional[Path] = None,
    )

Source from the content-addressed store, hash-verified

860 @print_traceback_on_error
861 @staticmethod
862 def _node_build_task(
863 llm_args: LlmArgs,
864 workspace: Optional[str | tempfile.TemporaryDirectory] = None,
865 llm_build_stats: Optional['LlmBuildStats'] = None,
866 engine_dir: Optional[Path] = None,
867 ):
868 if MPINodeState.is_initialized():
869 raise RuntimeError("The MPI node is already initialized.")
870
871 with ModelLoader(llm_args,
872 workspace=workspace,
873 llm_build_stats=llm_build_stats) as model_loader:
874 model_loader(engine_dir=engine_dir)
875 return model_loader.llm_build_stats.build_steps_info
876
877 def save(self, engine_dir: Path):
878 # copy the engine directory to the target directory

Callers

nothing calls this directly

Calls 2

is_initializedMethod · 0.80
ModelLoaderClass · 0.70

Tested by

no test coverage detected