Error when calling tensorflow-gpu
The error message is as follows:
2023-06-21 15:36:14.007389: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2023-06-21 15:36:14.012266: E tensorflow/stream_executor/cuda/cuda_driver.cc:300] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
2023-06-21 15:36:14.012286: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:163] retrieving CUDA diagnostic information for host: fbfef9203a7c
2023-06-21 15:36:14.012289: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:170] hostname: fbfef9203a7c
2023-06-21 15:36:14.012309: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:194] libcuda reported version is: 525.116.4
2023-06-21 15:36:14.012318: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:198] kernel reported version is: 525.116.4
2023-06-21 15:36:14.012320: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:305] kernel version seems to match DSO: 525.116.4
InvalidArgumentError (see above for traceback): No OpKernel was registered to support Op 'FusedConvRandomK' with these attrs. Registered devices: [CPU,XLA_CPU,XLA_GPU], Registered kernels:
device='GPU'
First check whether the graphics card in tf is available
import tensorflow as tf
print('GPU',tf.test.is_gpu_available())
If normal, relevant information will be printed
Secondly, check whether the number of the graphics card in the code is correct. The default number of a graphics card should be 0! ! ! !
os.environ['CUDA_VISIBLE_DEVICES'] = str(0)
similar code! Is it consistent with reality!