简体   繁体   English

libtorch 在 Windows 10 (VS2019) 上构建后抛出 c10::error

[英]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.

相关问题 C2337 'importidl': 将解决方案升级到 VS2019 ( 16.9.2 ) 后找不到属性错误 - C2337 'importidl': attribute not found error after upgrading solution to VS2019 ( 16.9.2 ) Windows 10上的Tensorflow构建错误 - Tensorflow Build Error on Windows 10 Trying to compile libpng VS2019 options.awk: bad line (10): com CMake Error at scripts/gensrc.cmake:68 (message): Failed to generate pnglibconf.tf5 - Trying to compile libpng VS2019 options.awk: bad line (10): com CMake Error at scripts/gensrc.cmake:68 (message): Failed to generate pnglibconf.tf5 在 Visual Studio 2019 中构建与 Windows XP、7 和 10 兼容的项目 - Build project compatible with Windows XP, 7 and 10 in Visual Studio 2019 如何使用 VS 2019 Preview 在 Windows 10 中安装 boost - How can I Install boost in Windows 10 with VS 2019 Preview Windows + VS2019 + CMake + CLion + Conan:如何启用 C++20? - Windows + VS2019 + CMake + CLion + Conan: How to enable C++20? 错误 MSB6006:“link.exe”以代码 1 退出运行 SDV(Static 驱动程序验证程序)时,Visual Studio 2019、SDK 10 build 19041、windows 10 build 19041 - error MSB6006: "link.exe" exited with code 1 When run SDV ( Static Driver Verifier) , Visual studio 2019 , SDK 10 build 19041, windows 10 build 19041 gRPC C++ 如何在 Windows 10 上构建? - gRPC C++ build on Windows 10 how? 无法在 Windows 10 上构建 mod_wsgi - “无法打开包含文件:'ws2tcpip.h'” - 有 VS 2019 构建工具 - Can't build mod_wsgi on Windows 10 - “Cannot open include file: 'ws2tcpip.h'” - Have VS 2019 Build tools 使用 VS2015 在 Windows 10 上构建 Fortran .lib x64 位并将其链接到 C++ - build Fortran .lib x64 bit on windows 10 using VS2015 and link it to C++
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM