如何解决PyTorch 中的 Cublas 运行时错误?代码在 Jupyter notebook 中有效,但在终端中无效
我是 Python 新手,试图找出错误消息的来源很困难。我写了一个代码来在 Jupyter 笔记本中使用一些现有的(更复杂的)代码,它似乎工作正常。我在 Jupyter 笔记本中收到此 RuntimeError 消息,但一切似乎都运行良好,并且无论如何都会创建我正在编写的文件。我一直在尝试让它在 anaconda3 终端内运行,现在事情正在分崩离析。我创建了 python 文件并将来自 jupyter notebook 的相同“工作代码”放入其中,现在运行时错误阻止了代码运行。我不知道为什么它可以在 jupyter notebook 中运行,而不能在终端中运行。 无论如何,这是运行时错误"
RuntimeError: cublas runtime error : the GPU program failed to execute at C:/w/1/s/tmp_conda_3.7_055306/conda/conda-bld/pytorch_1556690124416/work/aten/src/THC/THCBlas.cu:450
我一直在谷歌搜索,有人建议更新 CUDA。我试过了,我认为它不起作用。我想知道是否有人可以知道此错误的含义以及如何解决它?
以下是我在执行 nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Wed_May__6_19:10:02_Pacific_Daylight_Time_2020
Cuda compilation tools,release 11.0,V11.0.167
Build cuda_11.0_bu.relgpu_drvr445TC445_37.28358933_0
这是我在 RuntimeError 之前得到的回溯:
File "AMASSBody.py",line 42,in <module>
body = bm(pose_body=pose_body,betas=betas,root_orient=root_orient)
File "C:\Users\emmay\anaconda3\lib\site-packages\torch\nn\modules\module.py",line 493,in __call__
result = self.forward(*input,**kwargs)
File "c:\users\emmay\src\human-body-prior\human_body_prior\body_model\body_model.py",line 251,in forward
dtype=self.dtype)
File "C:\Users\emmay\anaconda3\lib\site-packages\smplx\lbs.py",line 179,in lbs
v_shaped = v_template + blend_shapes(betas,shapedirs)
File "C:\Users\emmay\anaconda3\lib\site-packages\smplx\lbs.py",line 265,in blend_shapes
blend_shape = torch.einsum('bl,mkl->bmk',[betas,shape_disps])
File "C:\Users\emmay\anaconda3\lib\site-packages\torch\functional.py",line 211,in einsum
return torch._C._VariableFunctions.einsum(equation,operands)
我在 Windows 10 上运行 python3。如果你们需要更多信息,请告诉我。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。