mirror of
https://github.com/pytorch/pytorch.git
synced 2026-11-20 09:04:25 +08:00
Better error for torch::jit::loading a eager file (#31709)
Summary: This adds a check to catch the case where someone `torch.save`s something then `torch::jit::load`s it in C++. Relevant for #31620 ](https://our.intern.facebook.com/intern/diff/19252172/) Pull Request resolved: https://github.com/pytorch/pytorch/pull/31709 Pulled By: driazati Differential Revision: D19252172 fbshipit-source-id: f2a9b4442647285418b2778306629b4ff77c15e5
This commit is contained in:
committed by
Facebook Github Bot
parent
a730920a3d
commit
3c07eb33bb
@@ -21,6 +21,7 @@ TORCH_API void runJITCPPTests(bool runCuda) {
|
||||
// and python test runners), but is instead invoked manually by the
|
||||
// torch_python_test.cpp
|
||||
testEvalModeForLoadedModule();
|
||||
testTorchSaveError();
|
||||
}
|
||||
#undef JIT_TEST
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user