Error in using cuda

I can detect cuda but cannot use it .so weird

my configuration: 1080ti driver:390.77 cuda9.0 cudnn 7.0.5 py3.5
I am sure i correctily installed cuda cause “nvidia-smi” and “nvcc -V” presents normally ,and tensorflow-gpu works well

who can help me!

I usually use instead of .cuda() where the device is set like this:
device = torch.device(“cuda” if args.cuda else “cpu”)

yeah i also tried this and still the same error