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

Method from_engine

tensorrt_llm/runtime/session.py:121–129  ·  view source on GitHub ↗

@brief: Create a session from an existing ICudaEngine engine @param engine: an ICudaEngine @return: a Session object

(engine)

Source from the content-addressed store, hash-verified

119
120 @staticmethod
121 def from_engine(engine) -> Session:
122 '''
123 @brief: Create a session from an existing ICudaEngine engine
124 @param engine: an ICudaEngine
125 @return: a Session object
126 '''
127 session = Session()
128 session.engine = engine
129 return session._init()
130
131 @property
132 def runtime(self) -> trt.Runtime:

Callers 6

test_dora_scalingMethod · 0.45
test_fairseq_modelsFunction · 0.45
run.pyFile · 0.45
init_llmMethod · 0.45

Calls 2

_initMethod · 0.95
SessionClass · 0.85

Tested by 4

test_dora_scalingMethod · 0.36
test_fairseq_modelsFunction · 0.36