mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Revert to ANVTM in jni_lite due to Oculus failure.
Test Plan: FanW123 verified on her Oculus device Reviewed By: FanW123 Differential Revision: D27943428 fbshipit-source-id: ac1c1ca6b47937f8839ba23c9e3af0843ea086a3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
614dce54a6
commit
0c544ebd24
@ -17,8 +17,14 @@ namespace pytorch_jni {
|
||||
namespace {
|
||||
|
||||
struct LiteJITCallGuard {
|
||||
// Inference only workload.
|
||||
c10::InferenceMode guard;
|
||||
// VariableType dispatch is not included in default mobile build. We need set
|
||||
// this guard globally to avoid dispatch error (only for dynamic dispatch).
|
||||
// Thanks to the unification of Variable class and Tensor class it's no longer
|
||||
// required to toggle the NonVariableTypeMode per op - so it doesn't hurt to
|
||||
// always set NonVariableTypeMode for inference only use case.
|
||||
// TODO: avoid having to set this guard for custom mobile build with mobile
|
||||
// interpreter.
|
||||
torch::AutoNonVariableTypeMode non_var_guard;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
Reference in New Issue
Block a user