gpt4 book ai didi

tensorflow - 为什么尝试额外运行一段时间后我的GPU Tensorflow崩溃?

转载 作者:行者123 更新时间:2023-12-03 08:10:20 26 4
gpt4 key购买 nike

我是Tensorflow的新手,并且在Anaconda中使用Spyder安装GPU。我的程序中反复出现问题,在尝试多次运行文件后,该错误将崩溃,并显示“您的CPU支持该TensorFlow二进制文件未编译为使用的指令:AVX AVX2”。

关闭原始控制台并打开一个新控制台有时可以使我再次运行该文件而不会崩溃,但有时却不能。关闭并再次打开整个程序也是一样。

通常,在我尝试运行任何 tensorflow 操作之前,程序都可以正常运行,例如,

with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
sess.run(predict_op,...)

之后,程序将暂停直到出现此错误:
2019󈚨󈚧 20:45:10.359441: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
2019󈚨󈚧 20:45:10.612655: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1405] Found device 0 with properties:
name: GeForce GTX 970 major: 5 minor: 2 memoryClockRate(GHz): 1.253
pciBusID: 0000:01:00.0
totalMemory: 4.00GiB freeMemory: 3.22GiB
2019󈚨󈚧 20:45:10.684151: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1405] Found device 1 with properties:
name: GeForce GTX 970 major: 5 minor: 2 memoryClockRate(GHz): 1.253
pciBusID: 0000:02:00.0
totalMemory: 4.00GiB freeMemory: 3.22GiB
2019󈚨󈚧 20:45:10.687572: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1484] Adding visible gpu devices: 0, 1
2019󈚨󈚧 20:45:11.509725: I tensorflow/core/common_runtime/gpu/gpu_device.cc:965] Device interconnect StreamExecutor with strength 1 edge matrix:
2019󈚨󈚧 20:45:11.510626: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0 1
2019󈚨󈚧 20:45:11.511179: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] 0: N Y
2019󈚨󈚧 20:45:11.511725: I tensorflow/core/common_runtime/gpu/gpu_device.cc:984] 1: Y N
2019󈚨󈚧 20:45:11.512401: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1097] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 2928 MB memory) ‑> physical GPU (device: 0, name: GeForce GTX 970, pci bus id: 0000:01:00.0, compute capability: 5.2)
2019󈚨󈚧 20:45:11.901678: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1097] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:1 with 2928 MB memory) ‑> physical GPU (device: 1, name: GeForce GTX 970, pci bus id: 0000:02:00.0, compute capability: 5.2)
2019󈚨󈚧 20:45:12.543674: E tensorflow/stream_executor/cuda/cuda_blas.cc:459] failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED
2019󈚨󈚧 20:45:13.105336: E tensorflow/stream_executor/cuda/cuda_dnn.cc:352] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR

最佳答案

我可能会崩溃,因为Tensorflow在分配VRAM方面很贪心。请查看答案here

关于tensorflow - 为什么尝试额外运行一段时间后我的GPU Tensorflow崩溃?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55506447/

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