tensorflow 在 ubuntu 22.04 上的 conda 环境中未检测到 GPU

问题描述 投票:0回答:1

Ubuntu:22.04 RTX 3070ti 笔记本 + i7 12700 康达24.1.2 张量流2.16.1 驱动程序版本:535.161.07 CUDA 版本:12.2 构建cuda_11.5.r11.5/compiler.30672275_0

我尝试了

pip install tensorflow[and cuda]
,就像网站上所说的那样,有多个问题

my-user@my-comp:~$ python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
2024-04-09 17:06:49.632664: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-04-09 17:06:49.916292: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-04-09 17:06:50.566675: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2024-04-09 17:06:51.314772: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:998] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
2024-04-09 17:06:51.327971: W tensorflow/core/common_runtime/gpu/gpu_device.cc:2251] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
[]

在anaconda中重做

pip install tensorflow[and cuda]
同样的问题,然后
conda install tensorflow[and-cuda]
在环境TF中,它只是不返回gpu

(TF) my-user@my-comp:~$ python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
2024-04-09 16:53:36.841997: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE4.1 SSE4.2 AVX AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
[]

tensorflow ubuntu anaconda cuda rtx
1个回答
0
投票

我的问题也是,希望有人帮助我们

© www.soinside.com 2019 - 2024. All rights reserved.