Move constants to constant_segment (#1343)
Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/1343 * Add `extract_constant_segment` field, defaults to `False`, add `_extract_constant_segment(..)` to move constants to segment * Segments are extracted twice (delegates, constants), so we create a copy of the program inside `serialize_pte_binary` to use for modification. Potential future refactor: rename extract_segments -> extract_delegate_segments Reviewed By: dbort Differential Revision: D51596390 fbshipit-source-id: 63a9e4843379851097d262e3fc1b21f8e88d17d5
L
Lucy Qiu committed
61fcf400acbec20e42be8091d8a748bf878cf8c4
Parent: 303e9d2
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 12/4/2023, 10:00:16 PM