cuda-driver-api-1.1-cuinit
cuda-driver-api-1.2-check1
cuda-driver-api-1.3-check2
cuda-driver-api-1.4-context
cuda-driver-api-1.5-memory-alloc
cuda-runtime-api-1.1-hello-runtime
cuda-runtime-api-1.10-warpaffine
cuda-runtime-api-1.11-cublas-gemm
cuda-runtime-api-1.12-yolov5-postprocess
cuda-runtime-api-1.13-thrust
cuda-runtime-api-1.14-error
cuda-runtime-api-1.15-bank-conflict
cuda-runtime-api-1.2-memory
cuda-runtime-api-1.3-stream
cuda-runtime-api-1.4-kernel-function
cuda-runtime-api-1.5-thread-layout
cuda-runtime-api-1.5.2-parallel
cuda-runtime-api-1.6-vector-add
cuda-runtime-api-1.7-shared-memory
cuda-runtime-api-1.8-reduce-sum
cuda-runtime-api-1.9-atomic
tensorrt-basic-1.1-hello-tensorrt
tensorrt-basic-1.10-3rd-plugin
tensorrt-basic-1.2-hello-inference
tensorrt-basic-1.3-cnn-and-dynamic-shape
tensorrt-basic-1.4-onnx-editor
tensorrt-basic-1.5-onnx-parser
tensorrt-basic-1.6-onnx-parser-source-code
tensorrt-basic-1.7-hello-plugin
tensorrt-basic-1.8-integrate-easyplugin
tensorrt-integrate-1.1-full-cnn-classifier
tensorrt-integrate-1.10-yolov5-obb
tensorrt-integrate-1.11-onnxruntime
tensorrt-integrate-1.12-multithread
tensorrt-integrate-1.13-builder
tensorrt-integrate-1.14-memory
tensorrt-integrate-1.15-tensor
tensorrt-integrate-1.16-infer
tensorrt-integrate-1.17-multi-thread-yolov5
tensorrt-integrate-1.18-integrate-full-yolov5
tensorrt-integrate-1.19-insightface
tensorrt-integrate-1.2-yolov5-detect
tensorrt-integrate-1.20-self-driving
tensorrt-integrate-1.21-multi-camera-decoder
tensorrt-integrate-1.22-resful-http
tensorrt-integrate-1.23-openvino-yolov5
tensorrt-integrate-1.24-rknn
tensorrt-integrate-1.25-pybind11
tensorrt-integrate-1.26-openvino-integrate
tensorrt-integrate-1.27-lua
tensorrt-integrate-1.3-yolox-detect
tensorrt-integrate-1.4-retinaface-detect
tensorrt-integrate-1.5-unet
tensorrt-integrate-1.6-chinese-classifer-bert
tensorrt-integrate-1.7-huggingface-ner
tensorrt-integrate-1.8-alphapose
tensorrt-integrate-1.9-mmdetection-yolox
Latest commit dujw
Jul 24, 2022 This branch is up to date with jinmin527/learning-cuda-trt:main .
Folders and files Name Name Last commit message
Last commit date
parent directory Jul 24, 2022
Jul 24, 2022
Jul 24, 2022
Jul 24, 2022
Jul 24, 2022
Jul 24, 2022
Jul 24, 2022
Jul 24, 2022
View all files
使用智能指针,对tensorrt返回值做封装,使得内存安全不会泄露
template <typename _T>
shared_ptr<_T> make_nvshared (_T* ptr){
return shared_ptr<_T>(ptr, [](_T* p){p->destroy ();});
}
// [](_T* p){p->destroy();} 这里用lambda 表达式的形式来表示 destroy 的方式
使用cudaMallocHost对输入的host进行分配,使得主机内存复制到设备效率更高
注意推理时的预处理,指定了rgb与bgr对调
如果需要多个图像推理,需要:
在编译时,指定maxbatchsize为多个图
在推理时,指定输入的bindings shape的batch维度为使用的图像数,要求小于等于maxbatchsize
在收取结果的时候,tensor的shape是input指定的batch大小,按照batch处理即可
You can’t perform that action at this time.