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

Function createSafeInferRuntime

samples/common/sampleEngines.cpp:1652–1668  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1650}
1651
1652nvinfer1::safe::IRuntime* createSafeInferRuntime(nvinfer1::ILogger& logger) noexcept
1653{
1654 nvinfer1::safe::IRuntime* runtime{nullptr};
1655#if !defined(_WIN32)
1656 constexpr char symbolName[] = "_ZN8nvinfer14safe18createInferRuntimeERNS_7ILoggerE";
1657 typedef nvinfer1::safe::IRuntime* (*CreateInferRuntimeFn)(nvinfer1::ILogger & logger);
1658 if (hasSafeRuntime())
1659 {
1660 auto createFn = reinterpret_cast<CreateInferRuntimeFn>(dlsym(safeRuntimeLibrary.get(), symbolName));
1661 if (createFn != nullptr)
1662 {
1663 runtime = createFn(logger);
1664 }
1665 }
1666#endif
1667 return runtime;
1668}
1669
1670bool hasConsistencyChecker()
1671{

Callers 2

getSafeMethod · 0.85
timeDeserializeFunction · 0.85

Calls 2

hasSafeRuntimeFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected