Skip to content

Commit 974373e

Browse files
committed
Update on "[executorch][runtime] Add NamedDataMap to method load"
Add NamedDataMap as an arg to: - Method - load_method - parseTensor Use NamedDataMap to resolve external tensors in parseTensor. Test that the PTE + PTD file run well inside method_test. Differential Revision: [D67127327](https://our.internmc.facebook.com/intern/diff/D67127327/) [ghstack-poisoned]
2 parents 4674508 + fa0faee commit 974373e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

runtime/executor/tensor_parser.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
*/
88

99
#pragma once
10+
// Disable -Wdeprecated-declarations, as some builds use 'Werror'.
11+
#pragma GCC diagnostic push
12+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1013

1114
#include <executorch/runtime/core/evalue.h>
1215
#include <executorch/runtime/core/exec_aten/exec_aten.h>
@@ -130,3 +133,4 @@ using ::executorch::runtime::deserialization::parseTensorList;
130133
} // namespace deserialization
131134
} // namespace executor
132135
} // namespace torch
136+
#pragma GCC diagnostic pop

runtime/executor/tensor_parser_exec_aten.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ ET_NODISCARD Result<void*> getTensorDataPtr(
224224
InvalidExternalData,
225225
"Expected to load %zu bytes, actually loaded %u bytes",
226226
nbytes,
227-
static_cast<uint>(size.get()));
227+
static_cast<unsigned int>(size.get()));
228228
return planned_ptr;
229229
}
230230
}

0 commit comments

Comments
 (0)