tensorflow-gpu 2.0alpha0的错误

3

我已在Windows 10上安装了tensorflow-gpu 2.0alpha0、cudatoolkit 10.0.130和cudnn 7.5。

TensorFlow 2.0与CPU的兼容性良好,但在使用GPU时会遇到错误。

错误信息如下:

2019-04-02 23:47:38.646661: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2019-04-02 23:47:38.666653: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'nvcuda.dll'; dlerror: nvcuda.dll not found
2019-04-02 23:47:38.666842: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: UNKNOWN ERROR (303)

我认为主要问题是“无法打开库‘nvcuda.dll’”。

然而,我已经安装了最新的NVIDIA驱动程序(版本419.67),并且可以在C:\Windows\System32\nvcuda.dll中找到'nvcuda.dll'。


你设置了路径吗? SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin;%PATH% SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\extras\CUPTI\libx64;%PATH% SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include;%PATH% SET PATH=C:\tools\cuda\bin;%PATH% - Prince Patel
1个回答

0

在Tensorflow中,出现了问题的是这个方法:

    port::StatusOr<void*> GetDsoHandle(const string& name, const string& version) {
        auto filename = port::Env::Default()->FormatLibraryFileName(name, version);
        void* dso_handle;
        port::Status status =
          port::Env::Default()->LoadLibrary(filename.c_str(), &dso_handle);
        if (status.ok()) {
            LOG(INFO) << "Successfully opened dynamic library " << filename;
            return dso_handle;
    }

基本上,这意味着Tensorflow在您的Windows环境变量中无法找到nvcuda。 要添加环境变量,请执行以下操作:

Windows 10 和 Windows 8

  1. 搜索并选择:控制面板中的系统
  2. 单击高级系统设置链接。
  3. 点击环境变量。 在“系统变量”部分中,找到“PATH”环境变量并选择它。 点击编辑。
  4. 如果“PATH”环境变量不存在,请单击“新建”。
  5. 在“编辑系统变量”(或“新建系统变量”)窗口中,添加路径值 C:\Windows\System32\nvcuda.dll。 点击确定。 通过单击“确定”关闭所有剩余的窗口。

PS:确保您已安装cuDNN


谢谢您的回答,我尝试了,但仍然无法正常工作。还是存在相同的错误。 - Wen Qi
1
你安装了cuDNN吗? - IsakBosman

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接