Skip to content

Commit fb05e4c

Browse files
committed
Update
[ghstack-poisoned]
1 parent b983807 commit fb05e4c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

exir/backend/test/test_to_backend_multi_method.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,12 @@ def forward(self, x):
434434
self._test(test_set)
435435

436436
def test_multi_method_end_to_end(self):
437+
"""
438+
Tests multi method lowering end-to-end. Lowers the same Sin Module for two methods
439+
"forward" and "forward_copy". Ensures that the lowered program has two delegates
440+
but only one serialized blob. Ensures that the lowered program runs correctly.
441+
"""
442+
437443
class SinModule(torch.nn.Module):
438444
def __init__(self):
439445
super().__init__()
@@ -471,6 +477,7 @@ def forward(self, x):
471477
exec_prog = new_edge_manager.to_executorch()
472478

473479
program = exec_prog.executorch_program
480+
# Since the preprocessed bytes are the same, there should only be on copy
474481
self.assertEqual(len(program.backend_delegate_data), 1)
475482

476483
self.check_backend_delegate(

0 commit comments

Comments
 (0)