Skip to content

Commit

Permalink
executorch (#8190)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #8190

Reviewed By: avikchaudhuri

Differential Revision: D69068797
  • Loading branch information
gmagogsfm authored and facebook-github-bot committed Feb 5, 2025
1 parent 62e49ce commit b57ae5b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
3 changes: 1 addition & 2 deletions backends/qualcomm/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,6 @@ def generate_multi_graph_program(
backend_config: ExecutorchBackendConfig = None,
constant_methods: Optional[Dict[str, Any]] = None,
) -> ExecutorchProgramManager:

# compile multiple graphs in qcir into single context binary
(
graph_inputs,
Expand Down Expand Up @@ -1060,7 +1059,7 @@ def forward(
outputs_dict[graph_name],
embedding_quantize,
)
prog = torch.export.export(composite_llama_module, sample_inputs)
prog = torch.export.export(composite_llama_module, sample_inputs, strict=True)
progs_dict[graph_name] = prog
# leverage ExecutorchProgramManager for generating pte with multi-methods
edge_prog_mgr = to_edge(
Expand Down
4 changes: 2 additions & 2 deletions devtools/visualization/visualization_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
def test_visualize_manual_export(server):
with server():
model = Linear(20, 30)
exported_program = torch.export.export(model, model.get_inputs())
exported_program = torch.export.export(model, model.get_inputs(), strict=True)
visualize(exported_program)
time.sleep(3.0)

Expand Down Expand Up @@ -150,7 +150,7 @@ def test_visualize_to_executorch(server):
def test_visualize_graph(server):
with server():
model = Linear(20, 30)
exported_program = torch.export.export(model, model.get_inputs())
exported_program = torch.export.export(model, model.get_inputs(), strict=True)
exported_program = to_edge_transform_and_lower(
exported_program
).exported_program()
Expand Down
2 changes: 1 addition & 1 deletion exir/emit/test/test_emit.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def forward(self, x):

m = TestModule()
example_inputs = (torch.ones(10),)
ep = torch.export.export(m, example_inputs)
ep = torch.export.export(m, example_inputs, strict=True)
edge = to_edge(
ep,
compile_config=EdgeCompileConfig(
Expand Down
2 changes: 1 addition & 1 deletion exir/program/test/test_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def forward(self, a, b, c):

inp = (torch.randn(10), torch.randn(10), torch.tensor(3))

ep = export(M(), inp)
ep = export(M(), inp, strict=True)
edge = to_edge(ep)
self.assertTrue(
torch.allclose(
Expand Down
1 change: 1 addition & 0 deletions extension/llm/modules/test/test_kv_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def forward(self, k_val: torch.Tensor, v_val: torch.Tensor):
3: torch.export.Dim.STATIC,
},
},
strict=True,
)
return exported_kv_cache

Expand Down

0 comments on commit b57ae5b

Please sign in to comment.