(self)
| 43 | |
| 44 | class 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() |
nothing calls this directly
no test coverage detected