Skip to content

Commit 93c0fb6

Browse files
committed
Update on "[executorch][core] NamedDataMap interface"
Add NamedDataMap interface to runtime. Differential Revision: [D66834552](https://our.internmc.facebook.com/intern/diff/D66834552/) [ghstack-poisoned]
2 parents 907d9f2 + cec6d0b commit 93c0fb6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

runtime/core/named_data_map.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ class ET_EXPERIMENTAL NamedDataMap {
4242
ET_NODISCARD virtual Result<FreeableBuffer> get_data(
4343
const char* fqn) const = 0;
4444

45+
/**
46+
* Loads data corresponding to the fqn into the provided buffer.
47+
*
48+
* @param fqn Fully qualified name of the tensor.
49+
* @param size The number of bytes to load.
50+
* @param buffer The buffer to load the data into. Must point to at least
51+
* `size` bytes of memory.
52+
* @return An error code on if the load was successful.
53+
*/
54+
ET_NODISCARD virtual Error
55+
load_data_into(const char* fqn, size_t size, void* buffer);
56+
4557
/**
4658
* Get the number of keys in the NamedDataMap.
4759
*

0 commit comments

Comments
 (0)