编译mnistCUDNN时出错:fatal error: FreeImage.h: No such file or directory

论坛 期权论坛 编程之家     
选择匿名的用户   2021-5-17 04:09   134   0

编译mnistCUDNN时出错:fatal error: FreeImage.h: No such file or directory

在测试CUDNN是否正常使用时候报错

测试CUDNN8.1是否正常使用

1. 在https://developer.nvidia.com/rdp/cudnn-archive下载以下三个文件:

2. 运行以下命令

sudo dpkg -i libcudnn8_8.1.1.33-1+cuda11.2_amd64.deb
sudo dpkg -i libcudnn8-dev_8.1.1.33-1+cuda11.2_amd64.deb
sudo dpkg -i libcudnn8-samples_8.1.1.33-1+cuda11.2_amd64.deb

3. 进入/usr/src/cudnn_samples_v8/mnistCUDNN/ 中

sudo make clean
sudo make

4. 直行“sudo make”时候若报以下编译错误 fatal error: FreeImage.h


mnistCUDNN  sudo make
CUDA_VERSION is 11010
Linking agains cublasLt = true
CUDA VERSION: 11010
TARGET ARCH: x86_64
HOST_ARCH: x86_64
TARGET OS: linux
SMS: 35 50 53 60 61 62 70 72 75 80 86
test.c:1:10: fatal error: FreeImage.h: No such file or directory
    1 | #include "FreeImage.h"
      |          ^~~~~~~~~~~~~
compilation terminated.

5. 执行

sudo apt-get install libfreeimage3 libfreeimage-dev

6. 重新编译后,运行

./mnistCUDNN

7.出现 Test passed! 代表 cudnn 正常使用

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP