Add GlowLoadAOTModel flag (#45189)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/45189
Pull Request resolved: https://github.com/pytorch/glow/pull/4902
Test Plan: Test locally
Reviewed By: yinghai
Differential Revision: D23810445
fbshipit-source-id: 56e717d80abbfe76b15d0f4249e1e399a9722753
diff --git a/caffe2/opt/onnxifi_op.h b/caffe2/opt/onnxifi_op.h
index 6a211a6..f19403a 100644
--- a/caffe2/opt/onnxifi_op.h
+++ b/caffe2/opt/onnxifi_op.h
@@ -263,10 +263,13 @@
defered_blob_reader = ws->GetBlob("__DEFERRED_BLOB_READER__");
}
onnxGraph graph{nullptr};
+
+ static const uint64_t auxPropertiesListAOT[] = {
+ ONNXIFI_OPTIMIZATION_AOT, ONNXIFI_GRAPH_PROPERTY_NONE};
CAFFE_ENFORCE_EQ(
lib_->onnxInitGraph(
backend,
- nullptr,
+ use_glow_aot_ ? auxPropertiesListAOT : nullptr,
onnx_model_str.size(),
(const void*)(onnx_model_str.c_str()),
weight_descs.size(),
diff --git a/third_party/foxi b/third_party/foxi
index 9ca418d..4aba696 160000
--- a/third_party/foxi
+++ b/third_party/foxi
@@ -1 +1 @@
-Subproject commit 9ca418d2f4bc8e022d843388afa0fd0a14bd57dc
+Subproject commit 4aba696ec8f31794fd42880346dc586486205e0a