🐰TensorRT的C++接口解析
#include “NvInfer.h”
using namespace nvinfer1;The Build Phase
class Logger : public ILogger
{
void log(Severity severity, const char* msg) noexcept override
{
// suppress info-level messages
if (severity <= Severity::kWARNING)
std::cout << msg << std::endl;
}
} logger;Creating a Network Definition
Importing a Model using the ONNX Parser
Building an Engine
Deserializing a Plan
Performing Inference
Last updated