1. Confirm whether tensorflow corresponds to CUDA and cudnn. Check here. 2. Modify settings
os.environ['CUDA_VISIBLE_DEVICES']='0,1'
# tf 1.13
config = tf.ConfigProto()
config.gpu_options.allow_growth=True
sess = tf.Session(config=config)
sess.run(tf.global_variables_initializer())
# tf 2.0
# gpu = tf.config.experimental.list_physical_devices('GPU')
# tf.config.experimental.set_memory_growth(gpu[0], True)
# gpu = tf.config.experimental.list_physical_devices('GPU')
# tf.config.experimental.set_memory_growth(gpu[1], True)
Read More:
- Error using tensorflow GPU: could not create cudnn handle: cudnn_STATUS_NOT_INITIALIZED
- [Solved] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
- Tensorflow Run Error or the interface is stuck or report error: Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
- [Solved] RuntimeError: cuDNN error: CUDNN_STATUS_INTERNAL_ERROR
- [Solved] Tensorflow Error: failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED
- RuntimeError: CUDNN_STATUS_EXECUTION_FAILED [How to Solve]
- Failed to get convolution algorithm. This is probably because cuDNN failed to initialize,
- [Solved] Failed to get convolution algorithm. This is probably because cuDNN failed to initialize
- [Solved] TF2.4 Error: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize
- [Solved] Could not load library cudnn_cnn_infer64_8.dll. Error code 126
- CUDA error: CUBLAS_STATUS_NOT_INITIALIZED when calling `cublasCreate(handle)`
- Tensorflow Error polling for event status: failed to query event: CUDA_ERROR_ILLEGAL_ADDRESS
- [Solved] RuntimeError: CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling `cublasCreate(handle)`
- [How to Solve] Internal: blas sgemm launch failed
- [Solved] Tensorflow error or keras error and tf.keras error: oom video memory is insufficient
- [Solved] Tensorflow2.0 Error: Function call stack:distributed_function
- [Solved] Tensorflow-gpu 2.0.0 Run Error: ModuleNotFoundError: No module named ‘tensorflow_core.estimator‘
- [Solved] Tensorflow-gpu Error: self._traceback = tf_stack.extract_stack()
- TensorFlow-gpu Error: failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
- [Solved] Tensorflow Error: Failed to load the native TensorFlow runtime.