Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion exir/_serialize/_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def serialize_pte_binary(
mutable_data: Optional[List[Buffer]] = None,
extract_delegate_segments: bool = False,
extract_constant_segment: bool = False,
segment_alignment: int = 4096,
segment_alignment: int = 128,
constant_tensor_alignment: Optional[int] = None,
delegate_alignment: Optional[int] = None,
) -> Cord:
Expand Down
4 changes: 3 additions & 1 deletion exir/_serialize/test/test_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

# pyre-unsafe

import copy
import difflib
import json
Expand Down Expand Up @@ -36,7 +38,7 @@
)
from executorch.exir.tests.common import get_test_program

SEGMENT_ALIGNMENT: int = 4096
SEGMENT_ALIGNMENT: int = 128

CONSTANT_TENSOR_ALIGNMENT: int = 16

Expand Down
2 changes: 1 addition & 1 deletion exir/capture/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ExecutorchBackendConfig:

# When extracting segments, the starting offset of each segment will be
# aligned to this value (in bytes). Must be a power of two.
segment_alignment: int = 4096
segment_alignment: int = 128

# If provided, the minimum alignment of tensor buffers in the program. Must
# be a power of 2. If not provided, uses the value in the schema file.
Expand Down
2 changes: 1 addition & 1 deletion exir/lowered_backend_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def original_module(self) -> ExportedProgram:
def buffer(
self,
extract_delegate_segments: bool = False,
segment_alignment: int = 4096,
segment_alignment: int = 128,
constant_tensor_alignment: Optional[int] = None,
delegate_alignment: Optional[int] = None,
memory_planning: MemoryPlanningPass = None, # pyre-fixme[9]
Expand Down
Loading