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

Class AlignedData

exir/_serialize/_program.py:67–81  ·  view source on GitHub ↗

Holds data that should be aligned, for serialization. Attributes: data: The data to serialize, as a cord. alignment: The alignment required for the data.

Source from the content-addressed store, hash-verified

65
66@dataclass
67class AlignedData:
68 """
69 Holds data that should be aligned, for serialization.
70
71 Attributes:
72 data: The data to serialize, as a cord.
73 alignment: The alignment required for the data.
74 """
75
76 data: Cord
77 alignment: int
78
79 def __init__(self, data: Cord, alignment: Optional[int] = None) -> None:
80 self.data = data
81 self.alignment = alignment or 1
82
83
84def _program_to_json(program: Program) -> str:

Callers 3

_extract_named_dataFunction · 0.70
serialize_pte_binaryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected