| 134 | #endif // !TRT_STATIC |
| 135 | |
| 136 | bool 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 | |
| 159 | bool initNvonnxparser() |
| 160 | { |
no test coverage detected