本文共 1048 字,大约阅读时间需要 3 分钟。
…/Makefile.config:10: CUDA_INSTALL_DIR variable is not specified, using /usr/local/cuda by default, use CUDA_INSTALL_DIR=<cuda_directory> to change.
…/Makefile.config:15: CUDNN_INSTALL_DIR variable is not specified, using /usr/local/cuda by default, use CUDNN_INSTALL_DIR=<cudnn_directory> to change. …/Makefile.config:28: TRT_LIB_DIR is not specified, searching …/…/lib, …/…/lib, …/lib by default, use TRT_LIB_DIR=<trt_lib_directory> to change. if [ ! -d …/…/bin/chobj/…/common ]; then mkdir -p …/…/bin/dchobj/…/common; fi; : Compiling: sampleMNIST.cpp In file included from …/common/buffers.h:20:0, from sampleMNIST.cpp:26: …/common/common.h:38:30: fatal error: cuda_runtime_api.h: No such file or directory compilation terminated. make: *** […/Makefile.config:324: …/…/bin/dchobj/sampleMNIST.o] Error 1 是cuda版本的问题。因为环境中有多个cuda版本或者cuda的没有添加cuda的环境。make CUDA_INSTALL_DIR=/usr/local/cuda-veision(指定cuda来编译)
eg:make CUDA_INSTALL_DIR=/usr/local/cuda-10.0/10.2等。转载地址:http://mgegf.baihongyu.com/