英偉達官方TensorRT8.x下載下傳位址
https://developer.nvidia.com/nvidia-tensorrt-8x-download
一 Pip安裝TensorRT檔案夾中的.whl檔案
1.python檔案夾
pip install tensorrt-8.4.1.5-cp36-none-win_amd64.whl
2.graphsurgeon檔案夾
pip install graphsurgeon-0.4.6-py2.py3-none-any.whl
3.onnx_graphsurgeon檔案夾
pip install onnx_graphsurgeon-0.3.12-py2.py3-none-any.whl -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
4.uff檔案夾
pip install uff-0.6.9-py2.py3-none-any.whl
二 驗證Python版本的TensorRT是否安裝成功
1.複制庫檔案到cuda
2.驗證
import tensorrt as trt
print(trt.__version__)
三 驗證C++版本是否可用
1.進去samples\sampleMNIST
2.點選運作
3.檢視是否在bin中生成對應exe
4.從data\mnist中拿一張圖檔進行測試
輸入測試指令
sample_mnist.exe 0.pgm
測試成功