关于torchnvjpeg import时报错DLL 未发现

Windows下torchnvjpeg导入DLL报错解决

torcnnvjpeg库地址

https://github.com/itsliupeng/torchnvjpeg

今天在windows10下部署cuda+TensorRT+torchnvjpeg+torch2trt环境。

我开始用的cuda 是12.0版本,在全部编译接结束后测试imnport torchnvjpeg是提示DLL没有发现的错误。

开始就怀疑是CUDA版本差异问题,导致没有找到合适的DLL文件。

因此,全部卸载了一遍。

然后全套安装 cuda 11.8版本。

通过最后安装后,问题解决。

省略部分...


设置为国内源
pip3 install pip -U
pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

4、安装torch CUDA 11.8
下载地址:https://pytorch.org/get-started/locally/
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

5、安装其他依赖库
执行命令
pip3 install -r pip.txt

gitpython
ipython  # interactive notebook
matplotlib>=3.2.2
numpy>=1.18.5
opencv-python>=4.1.1
Pillow>=7.1.2
psutil  # system resources
PyYAML>=5.3.1
requests>=2.23.0
scipy>=1.4.1
thop>=0.1.1  # FLOPs computation
tqdm>=4.64.0
tensorboard>=2.4.1
pandas>=1.1.4
seaborn>=0.11.0
easydict
gdown
lap
filterpy
onnx>=1.9.0
export
tensorrt
pycuda
jwt
python-multipart
uvicorn

【安装驱动、CUDA、CUDNN、Tensort】

安装cuda_11.8.0_522.06_windows
下载地址:https://developer.nvidia.com/cuda-toolkit-archive

安装cudnn-windows-x86_64-8.9.7.29_cuda11-archive
下载地址:https://developer.nvidia.com/rdp/cudnn-archive#a-collapse51b

安装TensorRT-8.6.1.6.Windows10.x86_64.cuda-11.8
下载地址:https://developer.nvidia.com/nvidia-tensorrt-8x-download
 

【安装torchnvjpeg、torch2trt】
安装torchnvjpeg
下载地址:https://github.com/itsliupeng/torchnvjpeg
python3 setup.py install
 

安装torch2trt
下载地址:https://github.com/NVIDIA-AI-IOT/torch2trt
python3 setup.py install

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值