Problem Description:
InternalError: Blas SGEMM launch failed : a.shape=(100, 784), b.shape=(784, 10), m=100, n=10, k=784
[[Node: MatMul = MatMul[T=DT_FLOAT, transpose_a=false, transpose_b=false, _device="/job:localhost/replica:0/task:0/gpu:0"](_recv_Placeholder_0/_4, Variable/read)]]
Caused by op u'MatMul', defined at:
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/dist-packages/ipykernel/__main__.py", line 3, in <module>
app.launch_new_instance()
File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 596, in launch_instance
app.start()
File "/usr/local/lib/python2.7/dist-packages/ipykernel/kernelapp.py", line 442, in start
ioloop.IOLoop.instance().start()
File "/usr/local/lib/python2.7/dist-packages/zmq/eventloop/ioloop.py", line 162, in start
super(ZMQIOLoop, self).start()
File "/usr/local/lib/python2.7/dist-packages/tornado/ioloop.py", line 883, in start
handler_func(fd_obj, events)
File "/usr/local/lib/python2.7/dist-packages/tornado/stack_context.py", line 275, in null_wrapper
return fn(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/zmq/eventloop/zmqstream.py", line 440, in _handle_events
self._handle_recv()
File "/usr/local/lib/python2.7/dist-packages/zmq/eventloop/zmqstream.py", line 472, in _handle_recv
self._run_callback(callback, msg)
Causes:
(1) due to other pythonx programs occupying GPU resources, existing programs can not allocate enough resources to execute the current program.
(2) if you are using tensorflow of GPU version, and you want to train the model in the case of high occupancy rate of graphics card (such as playing games), you should pay attention to allocate a fixed amount of video memory for the session when initializing it, otherwise you may report an error and exit directly at the beginning of training:
Solution
(1): judge the current session ()
if 'session' in locals() and session is not None:
print('Close interactive session')
session.close()
(2) : allocate video memory
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.333)
sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))
Reference:
[1] http://rylan.iteye.com/blog/2386155
Read More:
- tensorflow.python.framework.errors_impl.InternalError: Blas xGEMM launch failed
- Internalerror: blas GEMM launch failed: A. shape = (100, 784), B. shape = (784, 10), M = 100, n = 10… Problem solving
- tensorflow.python.framework.errors_impl.InternalError: Failed to create session.
- InternalError: Failed to create session. Error and solution
- HYDU_ create_ Process (. /utils/launch/launch.c:69): execvp error on file.. Error handling
- InternalError: GPU sync failed
- Undefined symbol: cblas appears after installing pytorch1.0.0_ sgemm_ Alloc error
- Record a problem of no module named ‘tensorflow. Examples’ and’ tensorflow. Examples. Tutorials’ in tensorflow 2.0
- To solve the problem of importerror when installing tensorflow: libcublas.so . 10.0, failed to load the native tensorflow runtime error
- Resolve – keyerror encountered while installing tensorflow GPU: ‘tensorflow’ error
- Yarn: runtime.ContainerExecutionException : launch container failed
- launch failed.Binary Not found in Linux / Ubuntu solution
- Tensorflow UnknownError (see above for traceback): Failed to get convolution algorithm. This is pro
- Tensorflow error: attributeerror: module ‘tensorflow’ has no attribute ‘unpack’ (‘pack ‘)
- Tensorflow error: module ‘tensorflow’ has no attribute ‘xxx’
- Blas loading error in MATLAB, unable to find the specified module
- Using pip to install tensorflow: tensorflow — is not a supported wheel on this platform
- Tensorflow operation report error modulenotfounderror: no module named ‘tensorflow. Python. Types’ solution
- “Launch” appears when eclipse C + + CDT runs the program failed.binary not found”
- Importerror using tensorflow: DLL load failed: the specified program cannot be found