【err】Check failed: err == CUBLAS_STATUS_SUCCESS (1 vs. 0) : Create cublas handle failed

时间:2019-08-29
本文章向大家介绍【err】Check failed: err == CUBLAS_STATUS_SUCCESS (1 vs. 0) : Create cublas handle failed,主要包括【err】Check failed: err == CUBLAS_STATUS_SUCCESS (1 vs. 0) : Create cublas handle failed使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

前言

  安装好CUDA、CUDNN、NVIDIA driver之后,使用mxnet框架的时候出现该错误,本文记录该问题的解决方法。

环境

ubuntu 16.04

MxNet

Cuda9.0

Nvidia driver 384

error

terminate called after throwing an instance of 'dmlc::Error'
  what():  [16:42:29] /home/travis/build/dmlc/mxnet-distro/mxnet-build/3rdparty/mshadow/mshadow/./stream_gpu-inl.h:115: Check failed: err == CUBLAS_STATUS_SUCCESS (1 vs. 0) : Create cublas handle failed
Stack trace:
  *************
  [bt] (6) ~/miniconda3/bin/../lib/libstdc++.so.6(+0xb8678) [0x7f8622101678]
  [bt] (7) /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7f86731206ba]
  [bt] (8) /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f8672e5641d]
Aborted (core dumped)

解决方法

  开始的时候以为是driver没有安装好,但是使用nvidia-smi之后可以显示GPU信息,只是疑惑Persistence-M为什么是off呢。。。然后就将其状态改为ON试试,就可以了。

nvidia-smi -pm 1

或者

sudo nvidia-persistenced --persistence-mode

博主使用的是第一个命令行,可以试试第二种。

其实,最重要的是要明白nvidia-smi的命令。

哈哈哈,终于解决这个遗留问题啦。。。开心O(∩_∩)O~~

参考

1. GPU状态监控nvidia-smi命令详解

2. 解决方法

原文地址:https://www.cnblogs.com/happyamyhope/p/11430925.html