RuntimeError: CUDA error: initialization error when calling `cusparseCreate(handle)
原代码:
tf_swingbase_arm = torch.matmul(torch.inverse(tf_base_upper), torch.inverse(tf_uppernew_base))
改成:
tf_swingbase_arm = torch.matmul(torch.inverse(tf_base_upper.cpu()).cuda(), torch.inverse(tf_uppernew_base.cpu()).cuda())
原因不明的错误,不知道为什么要进行cpu和gpu的转换。
参考: