GPU 版 TensorFlow failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED
来源:互联网 发布:java 开发棋牌类游戏 编辑:程序博客网 时间:2024/06/08 14:16
如果你是使用 GPU 版 TensorFlow 的话,并且你想在显卡高占用率的情况下(比如玩游戏)训练模型,那你要注意在初始化 Session 的时候为其分配固定数量的显存,否则可能会在开始训练的时候直接报错退出:
2017-06-27 20:39:21.955486: E c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\stream_executor\cuda\cuda_blas.cc:365] failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED
Traceback (most recent call last):
File "C:\Users\DYZ\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1139, in _do_call
return fn(*args)
File "C:\Users\DYZ\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1121, in _run_fn
status, run_metadata)
File "C:\Users\DYZ\Anaconda3\envs\tensorflow\lib\contextlib.py", line 66, in __exit__
next(self.gen)
File "C:\Users\DYZ\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.InternalError: Blas GEMV launch failed: m=2, n=100
[[Node: MatMul = MatMul[T=DT_FLOAT, transpose_a=false, transpose_b=false, _device="/job:localhost/replica:0/task:0/gpu:0"](_arg_Placeholder_0_0/_3, Reshape)]]
这时你需要用下面的方法创建 Session:
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.333)
2017-06-27 20:39:21.955486: E c:\tf_jenkins\home\workspace\release-win\m\windows-gpu\py\35\tensorflow\stream_executor\cuda\cuda_blas.cc:365] failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED
Traceback (most recent call last):
File "C:\Users\DYZ\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1139, in _do_call
return fn(*args)
File "C:\Users\DYZ\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1121, in _run_fn
status, run_metadata)
File "C:\Users\DYZ\Anaconda3\envs\tensorflow\lib\contextlib.py", line 66, in __exit__
next(self.gen)
File "C:\Users\DYZ\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 466, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.InternalError: Blas GEMV launch failed: m=2, n=100
[[Node: MatMul = MatMul[T=DT_FLOAT, transpose_a=false, transpose_b=false, _device="/job:localhost/replica:0/task:0/gpu:0"](_arg_Placeholder_0_0/_3, Reshape)]]
这时你需要用下面的方法创建 Session:
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.333)
sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))
原文来自
阅读全文
0 0
- GPU 版 TensorFlow failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED
- caffe mnist训练报错:Cannot create Cublas handle
- 运行caffe时遇到cannot create Cublas handle. Cublas won't be available.错误
- ubuntu16.04的caffe测试mnist出现cannot create cublas handle.cublas won't be available
- Tensorflow 报错 CUBLAS_STATUS_ALLOC_FAILED
- win10配置TensorFlow GPU出现Failed to load the native TensorFlow runtime."
- failed to create process
- TensorFlow GPU版安装
- Failed to create virtual machine
- netty failed to create selector
- Failed to create BuildConfig class
- Failed to create BuildConfig class
- Failed to create BuildConfig class
- failed to create buildconfig class:
- Eclipse failed to create jvm
- failed to create framebuffer image
- failed to create process.[python]
- failed to create anaconda menus
- 孤儿进程与僵尸进程[总结]
- Trinty Tool 编码反思
- c语言扫雷游戏
- kotlin学习笔记——集合及集合操作符
- pThread ,NSThread的深入理解
- GPU 版 TensorFlow failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED
- spring boot caffeine cache 缓存学习
- 使用javascript获取父级元素
- 第五章 标准I/O库 课后练习题
- [数位DP + AC自动机] Codeforces #434C. Tachibana Kanade's Tofu
- javascript断点调试
- 复用类
- POJ2369
- Android高级的总结