Installation of CUDA 10.1 in Red Hat 8.6

Hi, I am trying to install cuda 10.1 on redhat 8.6. After installing latest nvidia driver (v515), I have installed the cuda version 10.1 using rpm package. nvidia-smi seems Ok, and nvcc -V command also showing cuda 10.1. But when running the application, it throws error:

tensorflow.python.framework.errors_impl.InvalidArgumentError: No OpKernel was registered to support Op 'CudnnRNNV2' used by {{node functional_1/cu_dnngru/CudnnRNNV2}} with these attrs: [input_mode="linear_input", T=DT_FLOAT, direction="unidirectional", rnn_mode="gru", seed2=0, is_training=true, seed=0, dropout=0]
Registered devices: [CPU, XLA_CPU]
Registered kernels:
  device='GPU'; T in [DT_DOUBLE]
  device='GPU'; T in [DT_FLOAT]
  device='GPU'; T in [DT_HALF]

         [[functional_1/cu_dnngru/CudnnRNNV2]] [Op:__inference_train_function_3030]

Looks like GPU is not registered. What could be the reason?

Thanks for the help.