gpt4 book ai didi

python - tensorflow (不是 tensorflow -GPU): failed call to cuInit: UNKNOWN ERROR (303)

转载 作者:行者123 更新时间:2023-12-04 11:18:31 28 4
gpt4 key购买 nike

我的测试

import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()

我的错误
2019-12-27 10:51:17.887009: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/openmpi/lib:
2019-12-27 10:51:17.888489: E tensorflow/stream_executor/cuda/cuda_driver.cc:318] failed call to cuInit: UNKNOWN ERROR (303)
2019-12-27 10:51:17.888992: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (3e7d899714a9): /proc/driver/nvidia/version does not exist
2019-12-27 10:51:17.890608: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-12-27 10:51:17.915554: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2904000000 Hz
2019-12-27 10:51:17.918061: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x56101fca67e0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2019-12-27 10:51:17.918228: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version

我的环境

乌布努图 18

tensorflow 1.15.0/1.14.0

我的问题

我已经查看过类似的问题,例如 TensorFlow : failed call to cuInit: CUDA_ERROR_NO_DEVICE

关键的区别是我没有 tensorflow-gpu安装包。普通的 TensorFlow 怎么会出现这个错误?

最佳答案

您可以尝试使用 tensorflow-cpu 在仅使用 CPU 的机器上解决此问题。包而不是 tensorflow .

pip uninstall tensorflow
pip install tensorflow-cpu

关于python - tensorflow (不是 tensorflow -GPU): failed call to cuInit: UNKNOWN ERROR (303),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59499764/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com