Skip to content

TensorRT ONNX Plugin、Inference、Compile

Notifications You must be signed in to change notification settings

opentld/tensorRTIntegrate

 
 

Repository files navigation

TensorRT-Integrate

  1. Support pytorch onnx plugin(DCN、HSwish ... etc.)
  2. Simpler inference and plugin APIs

Re-implement

image1


coco.tracking.jpg


selfie.draw.jpg

Use TensorRT-Integrate

install protobuf == 3.11.4 (or >= 3.8.x, But it's more troublesome)

bash getDLADCN.sh
make run -j32

Inference Code

auto engine = TRTInfer::loadEngine("models/efficientnet-b0.fp32.trtmodel");
float mean[3] = {0.485, 0.456, 0.406};
float std[3] = {0.229, 0.224, 0.225};
Mat image = imread("img.jpg");
engine->input()->setNormMat(0, image, mean, std);
engine->forward();
engine->output(0)->print();

Environment


Plugin

  1. Pytorch export ONNX: plugin_onnx_export.py
  2. MReLU.cuHSwish.cuDCNv2.cu

About

TensorRT ONNX Plugin、Inference、Compile

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 74.6%
  • Cuda 9.9%
  • C 9.7%
  • Python 5.5%
  • Other 0.3%