Skip to content

Commit 3032398

Browse files
authored
Make test_no_replace_quant_permute_dequant_with_requantize use GraphBuilder.
Differential Revision: D74842294 Pull Request resolved: #10927
1 parent 78227f0 commit 3032398

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

backends/cadence/aot/tests/test_fusion_ops_passes.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,12 @@ def test_no_replace_quant_permute_dequant_with_requantize(self):
295295
args=(permute, 4.5, 6, 0, 127, torch.int8),
296296
)
297297
builder.output(dequant)
298-
graph_module = FuseQuantDequantToRequantizePass(
298+
original_graph = builder.get_graph_module()
299+
converted_graph = FuseQuantDequantToRequantizePass(
299300
force_quant_dequant_fusion=False
300-
)(builder.get_graph_module()).graph_module
301+
)(original_graph).graph_module
301302
self.check_op_counts(
302-
graph_module,
303+
converted_graph,
303304
expected_op_counts={
304305
# Verify that no dequant/quant pair was replaced with requantize.
305306
# quantize -> permute -> dequantize should not be replaced with requantize.

0 commit comments

Comments
 (0)