I didn’t install cudaToolkit in my /usr/local. I just installed pytorch in conda virtualenv, and when I looked the “~/anaconda3/envs/myenv/lib” There are all the cuda library (eg libcudart.so*). I think activating my virtualenv is enough rather than setting ld_library_path. And when I inspect my gpu memory by nvidia-smi, I can see the gpu memory is allocated every time I run the “a.to(device)” code (and not be free, and raise out of memory when I run this code  about15times.) So I think cuda library successfully loaded but some error (that caused by permission) occur. I don’t know why…this error occur
p.s
I’ve reinstalled nvidia driver after posting this post, but It didn’t help…