Skip to content
Closed
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
11 changes: 5 additions & 6 deletions backends/qualcomm/tests/test_qnn_delegate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1617,7 +1617,7 @@ def test_qnn_backend_multi_contexts_composite(self):
)
sample_input = module.get_random_input()
edge_prog = to_edge(
torch.export.export(module, sample_input),
torch.export.export(module, sample_input, strict=True),
)
update_spill_fill_size(edge_prog.exported_program())
exec_prog = edge_prog.to_executorch()
Expand Down Expand Up @@ -1957,7 +1957,7 @@ def calibrator(gm):
self.assertEqual(len(exported_progs), 1)
# lower all graph again, the skipped operators will be left in CPU
exec_prog = to_edge(
torch.export.export(graph_module, sample_input),
torch.export.export(graph_module, sample_input, strict=True),
).to_executorch()
self.verify_output(module, sample_input, exec_prog)

Expand Down Expand Up @@ -2004,7 +2004,7 @@ def calibrator(gm):
self.assertEqual(len(exported_progs), 2)
# lower all graph again, the skipped operators will be left in CPU
exec_prog = exec_prog = to_edge(
torch.export.export(graph_module, sample_input),
torch.export.export(graph_module, sample_input, strict=True),
).to_executorch()
self.verify_output(module, sample_input, exec_prog)

Expand Down Expand Up @@ -2041,7 +2041,7 @@ def calibrator(gm):
self.assertEqual(len(exported_progs), 5)
# lower all graph again, the skipped operators will be delegated with fp16
exec_prog = to_edge(
torch.export.export(graph_module, sample_input),
torch.export.export(graph_module, sample_input, strict=True),
).to_executorch()
self.verify_output(module, sample_input, exec_prog)

Expand Down Expand Up @@ -2086,7 +2086,7 @@ def test_qnn_backend_multi_contexts_composite(self):
)
sample_input = module.get_random_input()
edge_prog = to_edge(
torch.export.export(module, sample_input),
torch.export.export(module, sample_input, strict=True),
)
update_spill_fill_size(edge_prog.exported_program())
exec_prog = edge_prog.to_executorch()
Expand Down Expand Up @@ -2721,7 +2721,6 @@ def test_ssd300_vgg16(self):


class TestExampleQaihubScript(TestQNN):

def required_envs(self, conditions=None) -> bool:
conditions = [] if conditions is None else conditions
return all(
Expand Down
2 changes: 1 addition & 1 deletion backends/qualcomm/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def get_qdq_module(
custom_quant_annotations: Tuple[Callable] = (),
quant_dtype: QuantDtype = QuantDtype.use_8a8w,
) -> torch.fx.GraphModule:
m = torch.export.export(module, inputs).module()
m = torch.export.export(module, inputs, strict=True).module()

quantizer = QnnQuantizer()
quantizer.add_custom_quant_annotations(custom_quant_annotations)
Expand Down
Loading