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
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def test_decompose_cosine_similarity_tosa_BI(module):
"executorch_exir_dialects_edge__ops_aten_mul_Tensor": 5,
"executorch_exir_dialects_edge__ops_aten_sum_dim_IntList": 3,
"executorch_exir_dialects_edge__ops_aten_pow_Tensor_Scalar": 2,
"executorch_exir_dialects_edge__ops_aten_full_like_default": 1,
# TODO(masnesral): uncomment after https://github.com/pytorch/pytorch/pull/144765
# "executorch_exir_dialects_edge__ops_aten_full_default": 1,
"executorch_exir_dialects_edge__ops_aten_maximum_default": 2,
"executorch_exir_dialects_edge__ops_aten_reciprocal_default": 1,
}
Expand Down
28 changes: 15 additions & 13 deletions exir/tests/test_memory_planning.py
Original file line number Diff line number Diff line change
Expand Up @@ -868,21 +868,23 @@ def forward(self, input, label):

ep.dump_executorch_program(True)

# 147 just so happens to be the index of the user_grad output arg of
# 149 just so happens to be the index of the user_grad output arg of
# convolution_backward.out. This is fairly fragile.
# Check that the None output is not memory planned.
self.assertEqual(
ep.executorch_program.execution_plan[0]
.values[147]
.val.data_buffer_idx, # pyright: ignore
0,
)
self.assertEqual(
ep.executorch_program.execution_plan[0]
.values[147]
.val.allocation_info, # pyright: ignore
None,
)
# TODO(masnesral): restore after https://github.com/pytorch/pytorch/pull/144765
# self.assertEqual(len(ep.executorch_program.execution_plan[0].values), 151)
# self.assertEqual(
# ep.executorch_program.execution_plan[0]
# .values[149]
# .val.data_buffer_idx, # pyright: ignore
# 0,
# )
# self.assertEqual(
# ep.executorch_program.execution_plan[0]
# .values[149]
# .val.allocation_info, # pyright: ignore
# None,
# )


def _get_specs(gm: torch.fx.GraphModule) -> set[TensorSpec]:
Expand Down
Loading