Skip to content

Commit 00a874a

Browse files
gmagogsfmfacebook-github-bot
authored andcommitted
executorch/backends/qualcomm/tests
Reviewed By: avikchaudhuri Differential Revision: D67381442
1 parent b0bf9aa commit 00a874a

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

backends/qualcomm/tests/test_qnn_delegate.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,7 @@ def test_qnn_backend_multi_contexts_composite(self):
16171617
)
16181618
sample_input = module.get_random_input()
16191619
edge_prog = to_edge(
1620-
torch.export.export(module, sample_input),
1620+
torch.export.export(module, sample_input, strict=True),
16211621
)
16221622
update_spill_fill_size(edge_prog.exported_program())
16231623
exec_prog = edge_prog.to_executorch()
@@ -1957,7 +1957,7 @@ def calibrator(gm):
19571957
self.assertEqual(len(exported_progs), 1)
19581958
# lower all graph again, the skipped operators will be left in CPU
19591959
exec_prog = to_edge(
1960-
torch.export.export(graph_module, sample_input),
1960+
torch.export.export(graph_module, sample_input, strict=True),
19611961
).to_executorch()
19621962
self.verify_output(module, sample_input, exec_prog)
19631963

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

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

@@ -2086,7 +2086,7 @@ def test_qnn_backend_multi_contexts_composite(self):
20862086
)
20872087
sample_input = module.get_random_input()
20882088
edge_prog = to_edge(
2089-
torch.export.export(module, sample_input),
2089+
torch.export.export(module, sample_input, strict=True),
20902090
)
20912091
update_spill_fill_size(edge_prog.exported_program())
20922092
exec_prog = edge_prog.to_executorch()
@@ -2721,7 +2721,6 @@ def test_ssd300_vgg16(self):
27212721

27222722

27232723
class TestExampleQaihubScript(TestQNN):
2724-
27252724
def required_envs(self, conditions=None) -> bool:
27262725
conditions = [] if conditions is None else conditions
27272726
return all(

backends/qualcomm/tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def get_qdq_module(
385385
custom_quant_annotations: Tuple[Callable] = (),
386386
quant_dtype: QuantDtype = QuantDtype.use_8a8w,
387387
) -> torch.fx.GraphModule:
388-
m = torch.export.export(module, inputs).module()
388+
m = torch.export.export(module, inputs, strict=True).module()
389389

390390
quantizer = QnnQuantizer()
391391
quantizer.add_custom_quant_annotations(custom_quant_annotations)

0 commit comments

Comments
 (0)