Closed hihunjin closed 1 year ago
Please have a try with:
import torch
torch.tensor([1,2,3]).cuda()
See the outputs.
$ python
Python 3.8.12 (default, Nov 17 2021, 16:58:51)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.rand(10).cuda()
tensor([0.9758, 0.9910, 0.7123, 0.6851, 0.2408, 0.6267, 0.3766, 0.4412, 0.6818,
0.7391], device='cuda:0')
It is a little wired.
The error means that there may be something wrong with CUDA. However, in the test case, you actually could use CUDA successfully.
How did you run the shell (.sh) scripts?