MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / initNvinfer

Function initNvinfer

samples/trtexec/trtexec.cpp:136–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134#endif // !TRT_STATIC
135
136bool initNvinfer()
137{
138#if !TRT_STATIC
139 static LibraryPtr libnvinferPtr{};
140 auto fetchPtrs = [](DynamicLibrary* l) {
141 pCreateInferRuntimeInternal = l->symbolAddress<void*(void*, int32_t)>("createInferRuntime_INTERNAL");
142
143 if (gUseRuntime == RuntimeMode::kFULL)
144 {
145 pCreateInferRefitterInternal
146 = l->symbolAddress<void*(void*, void*, int32_t)>("createInferRefitter_INTERNAL");
147 pCreateInferBuilderInternal = l->symbolAddress<void*(void*, int32_t)>("createInferBuilder_INTERNAL");
148 }
149 };
150 return initLibrary(libnvinferPtr, getRuntimeLibraryName(gUseRuntime), fetchPtrs);
151#else
152 pCreateInferRuntimeInternal = createInferRuntime_INTERNAL;
153 pCreateInferRefitterInternal = createInferRefitter_INTERNAL;
154 pCreateInferBuilderInternal = createInferBuilder_INTERNAL;
155 return true;
156#endif // !TRT_STATIC
157}
158
159bool initNvonnxparser()
160{

Callers 3

createRuntimeFunction · 0.85
createBuilderFunction · 0.85
createRefitterFunction · 0.85

Calls 1

initLibraryFunction · 0.85

Tested by

no test coverage detected