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

Function aligned_size

exir/_serialize/padding.py:37–39  ·  view source on GitHub ↗

Returns input_size padded up to the next whole multiple of alignment.

(input_size: int, alignment: int)

Source from the content-addressed store, hash-verified

35
36
37def aligned_size(input_size: int, alignment: int) -> int:
38 """Returns input_size padded up to the next whole multiple of alignment."""
39 return input_size + padding_required(input_size, alignment)

Calls 1

padding_requiredFunction · 0.70