You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pull Request resolved: #10528
Take external NDM if it exists, otherwise internal.
Note: by default, xnnpack uses the named_data_map. Constants are not stored with the delegated blob anymore.
ghstack-source-id: 281201577
Differential Revision: [D73679710](https://our.internmc.facebook.com/intern/diff/D73679710/)
Copy file name to clipboardExpand all lines: runtime/executor/method.cpp
+10-1
Original file line number
Diff line number
Diff line change
@@ -805,6 +805,15 @@ Error Method::init(
805
805
pte_data_map = pte_data_map_res.get();
806
806
}
807
807
808
+
ET_CHECK_OR_RETURN_ERROR(
809
+
!(pte_data_map && named_data_map),
810
+
NotSupported,
811
+
"NamedDataMap merge not supported; both pte_data_map and named_data_map are non-empty. If you see this error please file an issue at https://github.com/pytorch/executorch/issues");
812
+
813
+
if (named_data_map && named_data_map->get_num_keys().get() > 0) {
814
+
named_data_map = pte_data_map;
815
+
}
816
+
808
817
// n_delegate_ counts the number of successfully-initialized delegates for
809
818
// ~Method() to clean up, and is incremented at the bottom of the loop. This
810
819
// makes it safe for errors to return without updating any state.
0 commit comments