I was able to solve this. I had to install raw CUDA ad cudnn from NVIDIA and follow the step. One extra step I did was to add cudnn_version.h to /usr/local/cuda/include/. Then run the cmake and it’ll work