pytorch:1.7.1
python:3.7
cuda:10.2
cudnn:8.2.0
将 TensorRT-8.2.5.1\include中头文件 copy 到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include
将TensorRT-8.2.5.1\lib 中所有lib文件 copy 到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\lib\x64
将TensorRT-8.2.5.1\lib 中所有dll文件copy 到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin
用VS2019 打开 TensorRT-8.2.5.1\samples\sampleMNIST\sample_mnist.sln工程,选择release版本重新生成解决方案,编译成功之后开始运行,若出现类似下图的数字,表示配置成功
conda activate ddaction
cd E:\TensorRT-8.2.5.1
pip install python/tensorrt-8.2.5.1-cp37-none-win_amd64.whl
pip install uff/uff-0.6.9-py2.py3-none-any.whl
pip install graphsurgeon/graphsurgeon-0.4.5-py2.py3-none-any.whl
pip install onnx_graphsurgeon/onnx_graphsurgeon-0.3.12-py2.py3-none-any.whl
测试:
>>>python
>>>import tensorrt
>>>print(tensorrt.__version__)