Jetson cuda pytorch

I have installed pytorch 1.12 on jetson nano from scratch. It is working fine.

I have also added nvcc path to PATH variable (there are 3 different cuda folders in usr/local)
the usr/local/cuda has nvcc 11.0 the 10.2 has nvcc 10.2

when I try torch.cuda.is_available() I am getting False.

Can you help me about diagnosing what have I done wrong? Or what do I need to check?