源码编译安装paddle时,cmake 检测到的CUDA 版本与实际版本不符合
GPU 是cuda v 100,安装的cuda 是9.0 版本,cudnn 7.0 版本。 使用http://paddlepaddle.org/documentation/docs/zh/1.2/beginners_guide/install/compile/compile_CentOS.html 下docker 编译的方式,可以编译成功,但是cmake 检测到的cuda 版本是8.0。
运行模型报告如下错误:
W0125 19:29:06.251294 83370 device_context.cc:262] Please NOTE: device: 0, CUDA Capability: 70, Driver API Version: 9.2, Runtime API Version: 8.0
W0125 19:29:06.251364 83370 device_context.cc:270] device: 0, cuDNN Version: 7.0.
Traceback (most recent call last):
File "ref/train.py", line 196, in
发现启动docker 之后,/usr/local/cuda 这个目录无论在进入docker 前指向哪里,最后都链接回/usr/local/cuda-8.0 下(8.0 这个目录在进入docker 前不存在)。只需要在进入docker 后,将软连接指向设置正确,cmake 就能检测到正确的CUDA 版本。