Google colab笔记本随附PyTorch和GPU支持-请参见this related SO answer,然后您应该将笔记本的运行时从CPU更改为GPU(从顶部Colab菜单栏)。
但是尝试从GPyTorch训练模型始终失败
/usr/local/lib/python3.6/dist-packages/gpytorch/utils/cholesky.py in psd_safe_cholesky(A, upper, out, jitter)
19 """
20 try:
---> 21 L = torch.cholesky(A, upper=upper, out=out)
22 # TODO: Remove once fixed in pytorch (#16780)
23 if A.dim() > 2 and A.is_cuda:
RuntimeError: CUDA error: invalid device function
为什么?
相关信息:
import torch
torch.cuda.is_available()
True
print(torch.__version__)
print(gpytorch.__version__)
print(torch.backends.cudnn.version())
1.3.0+cu100
0.3.6
7603