使用Pytorch从源代码构建运行Pytorch示例

brgchamk  于 2023-05-22  发布在  其他
关注(0)|答案(1)|浏览(213)

我从源代码构建了pytorch 2.0.1。使用cuda 11.7,cudnn v8,nvidia GPU的驱动程序是515.43.04(CUDA版本11.7)。虽然Pytorch似乎构建成功,但当我试图运行从github下载的示例时,我看到以下与cuDNN相关的错误:

CUDA available! Training on GPU.
terminate called after throwing an instance of 'c10::Error'
  what():  GET was unable to find an engine to execute this computation
Exception raised from run_single_conv at ../aten/src/ATen/native/cudnn/Conv_v8.cpp:671 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::string) + 0x57 (0x7f7edfcb24d7 in /tmp/manospavl/anaconda/envs/pytorch-dev/lib/python3.9/site-packages/torch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, char const*) + 0x68 (0x7f7edfc7c434 in /tmp/manospavl/anaconda/envs/pytorch-dev/lib/python3.9/site-packages/torch/lib/libc10.so)
frame #2: <unknown function> + 0xe4314c (0x7f7e9cc3d14c in /tmp/manospavl/anaconda/envs/pytorch-dev/lib/python3.9/site-packages/torch/lib/libtorch_cuda.so)
frame #3: <unknown function> + 0xe433eb (0x7f7e9cc3d3eb in /tmp/manospavl/anaconda/envs/pytorch-dev/lib/python3.9/site-packages/torch/lib/libtorch_cuda.so)
frame #4: <unknown function> + 0xe27dba (0x7f7e9cc21dba in /tmp/manospavl/anaconda/envs/pytorch-dev/lib/python3.9/site-packages/torch/lib/libtorch_cuda.so)
frame #5: at::native::cudnn_convolution(at::Tensor const&, at::Tensor const&, c10::ArrayRef<long>, c10::ArrayRef<long>, c10::ArrayRef<long>, long, bool, bool, bool) + 0x96 (0x7f7e9cc22406 in /tmp/manospavl/anaconda/envs/pytorch-dev/lib/python3.9/site-packages/torch/lib/libtorch_cuda.so)
frame #6: <unknown function> + 0x2b16b97 (0x7f7e9e910b97 in /tmp/manospavl/anaconda/envs/pytorch-dev/lib/python3.9/site-packages/torch/lib/libtorch_cuda.so)
frame #7: <unknown function> + 0x2b16c50 (0x7f7e9e910c50 in /tmp/manospavl/anaconda/envs/pytorch-dev/lib/python3.9/site-packages/torch/lib/libtorch_cuda.so)
frame #8: at::_ops::cudnn_convolution::call(at::Tensor const&, at::Tensor const&, c10::ArrayRef<long>, c10::ArrayRef<long>, c10::ArrayRef<long>, long, bool, bool, bool) + 0x23d (0x7f7ec4780ecd in /tmp/manospavl/anaconda/envs/pytorch-dev/lib/python3.9/site-packages/torch/lib/libtorch_cpu.so)
frame #9: at::native::_convolution(at::Tensor const&, at::Tensor const&, c10::optional<at::Tensor> const&, c10::ArrayRef<long>, c10::ArrayRef<long>, c10::ArrayRef<long>, bool, c10::ArrayRef<long>, long, bool, bool, bool, bool) + 0x1515 (0x7f7ec3adec45 in /tmp/manospavl/anaconda/envs/pytorch-dev/lib/python        3.9/site-packages/torch/lib/libtorch_cpu.so)
frame #10: <unknown function> + 0x2c434c6 (0x7f7ec4b004c6 in /tmp/manospavl/anaconda/envs/pytorch-dev/lib/python3.9/site-packages/torch/lib/libtorch_cpu.so)
frame #11: <unknown function> + 0x2c43547 (0x7f7ec4b00547 in /tmp/manospavl/anaconda/envs/pytorch-dev

我已经尝试了最新版本的pytorch 2.1.0和其他示例,但似乎都产生了相同的错误。另外,我还写了两个简单的例子。我也检查了cudnn和存在于我的设置。

xu3bshqb

xu3bshqb1#

问题是有一个本地安装的PyTorch。

相关问题