MCPcopy Create free account
hub / github.com/pytorch/executorch / _pack_buffer

Function _pack_buffer

exir/_serialize/_flatbuffer_program.py:90–99  ·  view source on GitHub ↗
(self: Any, builder: Any)

Source from the content-addressed store, hash-verified

88
89
90def _pack_buffer(self: Any, builder: Any) -> int:
91 storage = 0
92 if self.storage is not None:
93 storage = _create_aligned_byte_vector(
94 builder, _coerce_bytes(self.storage), _BUFFER_ALIGNMENT.get()
95 )
96 _Buffer.BufferStart(builder)
97 if storage:
98 _Buffer.BufferAddStorage(builder, storage)
99 return _Buffer.BufferEnd(builder)
100
101
102def _pack_backend_delegate_inline_data(self: Any, builder: Any) -> int:

Callers

nothing calls this directly

Calls 3

_coerce_bytesFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected