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

Method test_disable

exir/tests/test_remove_view_copy.py:45–58  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

43
44class TestRemoveViewCopy(unittest.TestCase):
45 def test_disable(self) -> None:
46 model = TestModel1()
47 model.eval()
48 example_inputs = model.get_example_inputs()
49 ep = torch.export.export(model, example_inputs, strict=True)
50 etpm = to_edge(ep).to_executorch(
51 config=ExecutorchBackendConfig(
52 remove_view_copy=False,
53 memory_planning_pass=MemoryPlanningPass(alloc_graph_input=False),
54 ),
55 )
56
57 for node in etpm.exported_program().graph_module.graph.nodes:
58 assert node.target != memory.view
59
60 def test_output_matches(self) -> None:
61 model = TestModel1()

Callers

nothing calls this directly

Calls 8

get_example_inputsMethod · 0.95
to_edgeFunction · 0.90
MemoryPlanningPassClass · 0.90
TestModel1Class · 0.85
exportMethod · 0.45
to_executorchMethod · 0.45
exported_programMethod · 0.45

Tested by

no test coverage detected