Hi nkla,
Thanks for  your reply,  mine  kernel  is  5.4.0-52-generic;
And  i  according to  userWarning:
this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero
So,  i  adding the   " export CUDA_VISIBLE_DEVICES=0   "   via the  source gedit ~/.bashrc;
Now ,   it 's  works  fine;



import torch
torch.cuda.is_available()
True






Thanks again