MCPcopy Index your code
hub / github.com/NVIDIA/TensorRT-LLM / create_network

Method create_network

tensorrt_llm/builder.py:109–125  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

107 return self._trt_builder
108
109 def create_network(self) -> Network:
110 explicit_batch_flag = 0
111 # Explicit batch flag will be deprecated in TRT 10
112 if "EXPLICIT_BATCH" in trt.NetworkDefinitionCreationFlag.__members__.keys(
113 ):
114 explicit_batch_flag = 1 << int(
115 trt.NetworkDefinitionCreationFlag.EXPLICIT_BATCH)
116
117 if self.strongly_typed:
118 return Network()._init(
119 self.trt_builder.create_network(
120 explicit_batch_flag
121 | (1 << int(
122 trt.NetworkDefinitionCreationFlag.STRONGLY_TYPED))))
123 else:
124 return Network()._init(
125 self.trt_builder.create_network(explicit_batch_flag))
126
127 def create_builder_config(self,
128 precision: Union[str, trt.DataType],

Callers 15

build_bertFunction · 0.95
_construct_executionMethod · 0.95
_construct_executionMethod · 0.95
_construct_executionMethod · 0.95
build_engineMethod · 0.95
_construct_executionMethod · 0.95
_sq_gemmMethod · 0.95
_fp8_rowwise_gemmMethod · 0.95
test_mlp_smooth_quantMethod · 0.95

Calls 3

NetworkClass · 0.85
keysMethod · 0.45
_initMethod · 0.45

Tested by 15

_construct_executionMethod · 0.76
_construct_executionMethod · 0.76
_construct_executionMethod · 0.76
build_engineMethod · 0.76
_construct_executionMethod · 0.76
_sq_gemmMethod · 0.76
_fp8_rowwise_gemmMethod · 0.76
test_mlp_smooth_quantMethod · 0.76