开始的含义无法产生子进程:没有此类文件或目录'运行TensorFlow后

发布于 2025-02-04 07:54:28 字数 444 浏览 2 评论 0原文

tensorflow 2.9.1在Ubuntu 20.04上使用CUDA 11.2在我尝试构建几层时,请继续写下以下错误:

2022-06-05 08:32:29.319040: I tensorflow/stream_executor/cuda/cuda_dnn.cc:384] Loaded cuDNN version 8100
2022-06-05 08:32:29.527708: I tensorflow/core/platform/default/subprocess.cc:304] Start cannot spawn child process: No such file or directory

没有追溯或任何东西。但是,该模型似乎正常建立,但是我想知道是否有任何绩效影响。

这个错误的原因是什么?有没有一种方法可以增加输出的冗长,而无需重新构建TensorFlow二进制?

Tensorflow 2.9.1 on Ubuntu 20.04 with CUDA 11.2 keeps writing to the stdout the following error whenever I try to build a few layers:

2022-06-05 08:32:29.319040: I tensorflow/stream_executor/cuda/cuda_dnn.cc:384] Loaded cuDNN version 8100
2022-06-05 08:32:29.527708: I tensorflow/core/platform/default/subprocess.cc:304] Start cannot spawn child process: No such file or directory

No traceback or anything. The model seems to build normally, though, but I wonder if there are any performance implications.

What can be the reason of this error? Is there a way to increase the verbosity of the output without rebuilding the Tensorflow binary?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

々眼睛长脚气 2025-02-11 07:54:28

执行。

$ export PATH="${PATH}:/usr/local/nvidia/bin:/usr/local/cuda/bin"

启动CPYTHON笔记本内核 /解释器之前

Execute

$ export PATH="${PATH}:/usr/local/nvidia/bin:/usr/local/cuda/bin"

before starting your cPython notebook kernel / interpreter.

聆听风音 2025-02-11 07:54:28

对于任何在WSL2上使用TensorFlow遇到此问题的人,以下内容为我修复了:

作为注意,我最初拒绝了错误错误错误,我认为这是由于一个较新的版本我已经安装的CUDA - 卸载后,我得到了相同的没有这样的文件或目录错误。

首先,确保您拥有TensorFlow需要安装的CUDA和CUDNN的正确版本。

其次,请确保更改libcuda.solibcuda.so.1文件为libcuda.so.so.so.1.1(哪个cuda)不适合您,它只是制作文件的副本) - 必须在Windows上完成,并且应该在WSL安装中自动显示。可以找到指南在这里

第三,请确保遵循 nvidia页面有关wsl 的gpu。我发现它们有点怪异且难以阅读,但基本上,它告诉您:

  • 更新Windows上的GPU驱动程序(只是最新的游戏Ready驱动程序)。
  • 更新您的WSL内核(很好地说,让我们使用版本2而不是1运行发行版)。
  • 在WSL上安装正确版本的cuda -toolkit,该版本与您在Windows上安装的版本匹配 - 可以找到

For anyone who runs into this issue with TensorFlow on WSL2, the following fixed it for me:

As a note, I initially had a Permission Denied error, which I think was due to a newer version of CUDA that I had installed - after uninstalling that, I got the same No such file or directory error.

First, ensure you have the correct version of CUDA and cuDNN that TensorFlow requires installed.

Secondly, make sure to change the libcuda.so and libcuda.so.1 files to be symlinks of libcuda.so.1.1 (which CUDA doesn't do for you, it just makes copies of the files) - this has to be done on Windows, and should automatically show up in your WSL installations. A guide can be found here.

Thirdly, make sure to follow the instructions on the NVIDIA page about GPU with WSL. I found them to be a tad weird and hard to read, but basically, it tells you to:

  • Update your GPU drivers on Windows (just the newest Game Ready Driver).
  • Update your WSL kernel (and for good measure let's run the distribution using version 2 and not 1).
  • Install the correct version of cuda-toolkit on WSL, that matches with the version that you have installed on Windows - download instructions can be found here, just be sure to change the version to the one TensorFlow requires that you have installed on Windows.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文