Skip to content

Commit d42f4ef

Browse files
committed
Update on "Pass one NDM to backend init"
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. Differential Revision: [D73679710](https://our.internmc.facebook.com/intern/diff/D73679710/) [ghstack-poisoned]
2 parents 4400818 + b58bca8 commit d42f4ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/executor/method.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ Error Method::init(
810810
NotSupported,
811811
"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");
812812

813-
if (named_data_map && named_data_map->get_num_keys().get() > 0) {
813+
if (!named_data_map || named_data_map->get_num_keys().get() == 0) {
814814
named_data_map = pte_data_map;
815815
}
816816

0 commit comments

Comments
 (0)