Skip to content

Commit

Permalink
Revert "[Quant][PT2E] enable qlinear post op fusion for dynamic quant…
Browse files Browse the repository at this point in the history
… & qat (#122667)"

This reverts commit 3642e51.

Reverted #122667 on behalf of https://github.com/DanilBaibak due to Break internal build ([comment](#122667 (comment)))
  • Loading branch information
pytorchmergebot committed May 21, 2024
1 parent b36e018 commit 980f5ac
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 274 deletions.
8 changes: 2 additions & 6 deletions test/inductor/test_mkldnn_pattern_matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -1688,21 +1688,17 @@ def matcher_check_fn():
to_bf16_after_binary = 2 * (add_fn == add_fn_list[2] and fq_x2)
self.assertEqual(
counters["inductor"]["qlinear_binary_matcher_nodes"],
(4 if is_dynamic else 5) + 2 * use_relu + to_bf16_after_binary,
5 + 2 * use_relu + to_bf16_after_binary,
)

is_qat_list = [False, True]
is_dynamic_list = [False, True]
cases = itertools.product(is_qat_list, is_dynamic_list)
for is_qat, is_dynamic in cases:
for is_qat in [False, True]:
self._test_common(
mod,
(v,),
check_quantization=True,
check_autocast=torch.bfloat16 if int8_mixed_bf16 else torch.float,
matcher_check_fn=matcher_check_fn,
is_qat=is_qat,
is_dynamic=is_dynamic,
)

@skipIfNoDynamoSupport
Expand Down

0 comments on commit 980f5ac

Please sign in to comment.