failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED problem causes and solutions
when running a program using tensorflow’s gpu, this error is reported because the gpu has been occupied by another python script or because the gpu is repeatedly called by your own program. There are three types of situations in which individuals find this problem occurring, two of which are common, and one of which may be difficult to reach.
case 1: you already have a python program running on the gpu. If you run your own program, you will report this error.
solution: you can only turn off python programs that already use the gpu, and then run your own.
case 2: if the program is written by yourself, you may have the problem of repeatedly defining sessions, which is equivalent to calling the gpu again, so the error is reported.
solution: think about where another session has been defined, look for it yourself, and remove it.
case 3: the emergence of this situation, difficult to see, because we usually use a framework to deal with problems, such as tensorflow, but I also use the pytorch, problems arise in pytorch build datasets can’t occupy gpu calls when the gpu cause tensorflow
the solution: the problem in another framework will call the gpu, don’t let it use p>
Read More:
- [Solved] RuntimeError: CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling `cublasCreate(handle)`
- RuntimeError: CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling `cublasCreate(handle)`
- CUBLAS_STATUS_ALLOC_FAILED
- PyTorch Error: RuntimeError: CUDA error: CUBLAS_STATUS_INVALID_VALUE when calling cublasSgemm()
- Error Code 2: Internal Error (Assertion cublasStatus == CUBLAS_STATUS_SUCCES
- Tensorflow training could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR error
- tensorflow2.1 Error:Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
- TSV_TNEW_PAGE_ALLOC_FAILED
- CONDA failed to create environment (collecting package metadata(repodata.json): failed)
- tensorflow.python.framework.errors_impl.InternalError: Failed to create session.
- Module parse failed:Unexpectedtoken (1:0)You may need an appropriate loader to handle this file type
- Vue failed to log in. F12 reported an error: request failed with status code 404
- InternalError: Failed to create session. Error and solution
- cl.exe Error resolution of ‘failed with exit status 2
- undefined reference to `pthread_create’ collect2: ld returned 1 exit status
- PIP report failed to create process
- filezilla Failed to create listen socket on port 21 for IPv4 solution
- [Solved] error: link.exe‘ failed with exit status 1158
- “Failed to create interpreter” appears when pychar creates a new project
- The Python PIP installation module prompts the error failed to create process