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

Function _pack_header

backends/mediatek/preprocess.py:49–54  ·  view source on GitHub ↗
(num_inputs, num_outputs, model_bytes_size)

Source from the content-addressed store, hash-verified

47
48
49def _pack_header(num_inputs, num_outputs, model_bytes_size):
50 header_bytes = struct.pack(
51 "<BIII", HEADER_VERSION, num_inputs, num_outputs, model_bytes_size
52 )
53 assert len(header_bytes) == HEADER_SIZE
54 return header_bytes
55
56
57def _unpack_header(header_bytes):

Callers 2

preprocessMethod · 0.85

Calls 1

packMethod · 0.80

Tested by

no test coverage detected