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

Method __prepare_execution_contexts

tensorrt_llm/runtime/session.py:104–108  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

102 return self
103
104 def __prepare_execution_contexts(self):
105 self._context = self.engine.create_execution_context()
106 assert self._context is not None, "Failed to create an execution context!"
107 with _scoped_stream() as stream:
108 self._context.set_optimization_profile_async(0, stream)
109
110 @staticmethod
111 def from_serialized_engine(engine) -> Session:

Callers 2

_initMethod · 0.95
_set_weight_streamingMethod · 0.95

Calls 1

_scoped_streamFunction · 0.85

Tested by

no test coverage detected