[英]libtorch throws c10::error after build on Windows 10 (VS2019)
I've tried to build libtorch on Windows 10 using VS 2019 without CUDA and Python.我尝试在没有 CUDA 和 Python 的情况下使用 VS 2019 在 Windows 10 上构建 libtorch。 Independent if I compile it with or without MKL, a simple test program crashes directly after start.
独立如果我使用或不使用 MKL 编译它,一个简单的测试程序在启动后直接崩溃。 After building the debug version, libtorch throws a
c10:error
in a function called torchCheckFail
.构建调试版本后,libtorch 在名为
torchCheckFail
的函数中抛出c10:error
。
The function seems to complain about ATen/core/jit_type.h
.该函数似乎抱怨
ATen/core/jit_type.h
。
The problem is part of torch_cpu.dll.问题是torch_cpu.dll 的一部分。 The problem disappears when I'm using the precompiled binaries for Windows.
当我使用 Windows 的预编译二进制文件时,问题就消失了。
Here's the function:这是功能:
void torchCheckFail(
const char* func,
const char* file,
uint32_t line,
const std::string& msg) {
throw ::c10::Error({func, file, line}, msg);
}
And here's the call stack:这是调用堆栈:
I encountered the same exact error with the same environment.我在相同的环境中遇到了同样的错误。
A solution that worked for me was to take a release version of pytorch and not a non-release one (ie a release version + some commits).一个对我有用的解决方案是采用 pytorch 的发布版本而不是非发布版本(即发布版本 + 一些提交)。
Hope it helps.希望能帮助到你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.