【问题标题】:cuDNN code sample compile errorcuDNN 代码示例编译错误
【发布时间】:2016-03-10 18:12:21
【问题描述】:

我正在尝试安装 NVIDIA 的 cuDNN 库并运行他们的代码示例,但它给了我这些错误,我不知道出了什么问题。

make all 
Building target: cuDNNtest
Invoking: NVCC Linker
/usr/local/cuda-7.5/bin/nvcc --cudart static -L/usr/local/cuda-7.5/lib64 -L/usr/local/cuda-7.5/targets/x86_64-linux/lib/ -L".../cuda-workspace/cuDNNtest/FreeImage/lib/linux/x86_64" -L/usr/lib -L/usr/local/cuda/lib64 --relocatable-device-code=true -gencode arch=compute_52,code=compute_52 -gencode arch=compute_52,code=sm_52 -link -o  "cuDNNtest"  ./fp16_dev.o ./fp16_emu.o ./mnistCUDNN.o  ./UtilNPP/StopWatchLinux.o   -lcudnn -lFreeImage -lcublas
./mnistCUDNN.o: In function `npp::ImageAllocator<unsigned char, 1ul>::Malloc2D(unsigned int, unsigned int, unsigned int*, bool)':
.../cuda-workspace/cuDNNtest/UtilNPP/ImageAllocatorsNPP.h:76: undefined reference to `nppiMalloc_8u_C1'
./mnistCUDNN.o: In function `npp::ImageAllocator<unsigned char, 1ul>::Free2D(unsigned char*)':
.../cuda-workspace/cuDNNtest/UtilNPP/ImageAllocatorsNPP.h:87: undefined reference to `nppiFree'
collect2: ld returned 1 exit status
make: *** [cuDNNtest] Error 1

我在 Linux centOS、cuda 工具包 7.5 和 Titan X 上使用 Nsight Eclipse Edition(我认为计算能力为 5.2)。

提前谢谢你。

【问题讨论】:

  • 你需要在你的命令中再添加一个库-lnppi
  • 非常感谢!现在可以了!我之前试过-lnpp,但不是那个。
  • @DanielaG:您介意添加一个简短的答案,解释您是如何为下一个有相同问题的人解决问题的吗?

标签: eclipse compiler-errors cuda nvidia cudnn


【解决方案1】:

我解决了这个问题,将-lnppi 添加到项目属性中的库列表中。

【讨论】:

    猜你喜欢
    • 2012-04-14
    • 2015-07-19
    • 1970-01-01
    • 1970-01-01
    • 2017-06-25
    • 1970-01-01
    • 1970-01-01
    • 2020-07-05
    • 2017-01-30
    相关资源
    最近更新 更多