【问题标题】:Trying to use Tensorflow with RTX 3090 Errors尝试使用带有 RTX 3090 错误的 Tensorflow
【发布时间】:2021-12-22 12:33:26
【问题描述】:

我正在尝试将 Tensorflow 与 Rtx 3090 GPU 一起使用,但是我这几天遇到了各种各样的问题。我尝试了这里和其他地方建议的补救措施,但没有奏效。要么发生内核错误,要么程序在没有看到 GPU 的情况下继续 CPU。你能帮帮我吗?

2021???????? 13:21:07.654550: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll
2021???????? 13:21:09.144192: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance‑critical operations: AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021???????? 13:21:09.149726: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library nvcuda.dll
2021???????? 13:21:09.172491: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1733] Found device 0 with properties: 
pciBusID: 0000:08:00.0 name: NVIDIA GeForce RTX 3090 computeCapability: 8.6
coreClock: 1.74GHz coreCount: 82 deviceMemorySize: 24.00GiB deviceMemoryBandwidth: 871.81GiB/s
2021???????? 13:21:09.173145: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudart64_110.dll
2021???????? 13:21:09.201143: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublas64_11.dll
2021???????? 13:21:09.201496: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cublasLt64_11.dll
2021???????? 13:21:09.218490: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cufft64_10.dll
2021???????? 13:21:09.222724: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library curand64_10.dll
2021???????? 13:21:09.253841: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cusolver64_11.dll
2021???????? 13:21:09.272022: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cusparse64_11.dll
2021???????? 13:21:09.272867: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudnn64_8.dll
2021???????? 13:21:09.273229: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1871] Adding visible gpu devices: 0
2021???????? 13:21:09.715332: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1258] Device interconnect StreamExecutor with strength 1 edge matrix:
2021???????? 13:21:09.715688: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1264] 0 
2021???????? 13:21:09.715891: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1277] 0: N 
2021???????? 13:21:09.716223: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1418] Created TensorFlow device (/device:GPU:0 with 18786 MB memory) ‑> physical GPU (device: 0, name: NVIDIA GeForce RTX 3090, pci bus id: 0000:08:00.0, compute capability: 8.6)
2021???????? 13:21:10.046619: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1733] Found device 0 with properties: 
pciBusID: 0000:08:00.0 name: NVIDIA GeForce RTX 3090 computeCapability: 8.6
coreClock: 1.74GHz coreCount: 82 deviceMemorySize: 24.00GiB deviceMemoryBandwidth: 871.81GiB/s
2021???????? 13:21:10.047281: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1871] Adding visible gpu devices: 0
2021???????? 13:21:10.047754: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1733] Found device 0 with properties: 
pciBusID: 0000:08:00.0 name: NVIDIA GeForce RTX 3090 computeCapability: 8.6
coreClock: 1.74GHz coreCount: 82 deviceMemorySize: 24.00GiB deviceMemoryBandwidth: 871.81GiB/s
2021???????? 13:21:10.048414: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1871] Adding visible gpu devices: 0
2021???????? 13:21:10.048707: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1258] Device interconnect StreamExecutor with strength 1 edge matrix:
2021???????? 13:21:10.049027: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1264] 0 
2021???????? 13:21:10.049227: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1277] 0: N 
2021???????? 13:21:10.049491: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1418] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 18786 MB memory) ‑> physical GPU (device: 0, name: NVIDIA GeForce RTX 3090, pci bus id: 0000:08:00.0, compute capability: 8.6)
2021???????? 13:21:10.928282: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:176] None of the MLIR Optimization Passes are enabled (registered 2)
2021???????? 13:21:25.315947: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library cudnn64_8.dll

【问题讨论】:

  • 你可能想看看这个答案。你做了所有这些步骤吗? stackoverflow.com/a/51307381/3961841
  • 是的,我遵循了所有的指示以及其他问题。但是,我无法在带有 GPU 的 Tensorflow 上运行它,因为它不断消耗 CPU。我不知道问题是什么。

标签: tensorflow kernel gpu spyder


【解决方案1】:

这些只是信息性消息,因为它们以I为前缀,如果是错误消息,它们将以EW作为警告前缀,如下所示:

2020-12-30 21:30:27.549172: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cupti64_101.dll

2020-12-30 21:30:27.599977: W tensorflow/core/framework/allocator.cc:101] Allocation of 37171200 exceeds 10% of system memory.

2021-12-30 21:30:27.704083: E tensorflow/core/profiler/internal/gpu/cupti_tracer.cc:1307] function cupti_interface_->Subscribe( &subscriber_, (CUpti_CallbackFunc)ApiCallback, this)failed with error CUPTI_ERROR_INSUFFICIENT_PRIVILEGES

您可以使用以下代码超越这些警告:

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'

您还可以检查执行此代码:

import tensorflow as tf
print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))

【讨论】:

    猜你喜欢
    • 2021-02-04
    • 2021-04-20
    • 2019-06-17
    • 2021-08-06
    • 1970-01-01
    • 2018-06-06
    • 1970-01-01
    • 2022-08-12
    • 2017-12-21
    相关资源
    最近更新 更多