执行中的问题:cudnn-install / 2.4。验证cuDNN在Linux上的安装/ cudnn_samples_v7测试

问题描述 投票:0回答:1

[当文档暗示时在cuDNN上进行验证时:

  1. 编译mnistCUDNN示例。 $make clean && make

我遇到如下错误:

XXX@XXX ~/cudnn_samples_v7-master/mnistCUDNN $ make clean && make
rm -rf *o
rm -rf mnistCUDNN
/usr/local/cuda/bin/nvcc -ccbin g++ -I/usr/local/cuda/include -IFreeImage/include  -m64    -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_53,code=sm_53 -gencode arch=compute_53,code=compute_53 -o fp16_dev.o -c fp16_dev.cu
g++ -I/usr/local/cuda/include -IFreeImage/include   -o fp16_emu.o -c fp16_emu.cpp
In file included from fp16_emu.cpp:50:
fp16_emu.h:55:10: fatal error: driver_types.h: No such file or directory
 #include <driver_types.h>
          ^~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:200: fp16_emu.o] Error 1

我尝试过:

sudo find / -name driver_types.h

我发现driver_types.h实际上在

/ usr / local / cuda / targets / x86_64-linux / include /

而不是

/ usr / local / cuda / include

所以我替换了

CUDNN_INCLUDE_PATH ?= $(CUDA_PATH)/include

with

CUDNN_INCLUDE_PATH ?= $(CUDA_PATH)/targets/x86_64-linux/includecudnn_samples_v7 / mnistCUDNN / Makefile

问题已解决。我希望这会对某人有所帮助。

平台和版本:

  • Ubuntu18.04
  • CUDA版本:10.2
  • cuDNN版本:7.6.5.32
cuda cudnn
1个回答
1
投票

[driver_types.h实际上在/usr/local/cuda/targets/x86_64-linux/include

替换

CUDNN_INCLUDE_PATH ?= $(CUDA_PATH)/include

with

CUDNN_INCLUDE_PATH ?= $(CUDA_PATH)/targets/x86_64-linux/include

cudnn_samples_v7/mnistCUDNN/Makefile

© www.soinside.com 2019 - 2024. All rights reserved.