Abort message: 'terminating with uncaught exception of type c10::Error: _ivalue_ INTERNAL ASSERT FAILED at ../torch/csrc/jit/api/object.cpp:19, please report a bug to PyTorch. (_ivalue at ../torch/csrc/jit/api/object.cpp:19)

When i’m loading a pt file in c++:

Abort message: 'terminating with uncaught exception of type c10::Error: _ivalue_ INTERNAL ASSERT FAILED at ../torch/csrc/jit/api/object.cpp:19, please report a bug to PyTorch.  (_ivalue at ../torch/csrc/jit/api/object.cpp:19)

NDK version:20.0.5594570

Someone can help,thank you.

Could you explain your use case and, if possible, create a code snippet to reproduce this issue?

I just write a new jni to load my serialized model on android, a code snippet just like

            std::istringstream pt(s);
            module_ = torch::jit::load(pt);
            module_.eval();

This error doesn’t appear every time,and it just occurs on Pixel 2 so far.

Could you please create a GitHub issue, so that it’ll be tracked?

A new Github issue #43388 just be created.