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

Function calculate_aligned_num_bytes

exir/tensor.py:129–130  ·  view source on GitHub ↗
(num: int, alignment: int)

Source from the content-addressed store, hash-verified

127
128
129def calculate_aligned_num_bytes(num: int, alignment: int) -> int:
130 return math.ceil(num / alignment) * alignment
131
132
133def determine_tensor_dynanism(shape: torch.Size) -> TensorShapeDynamism:

Callers 2

allocated_memoryMethod · 0.85

Calls

no outgoing calls

Tested by 1