Skip to content

Commit 6b3810f

Browse files
jainapurvafacebook-github-bot
authored andcommitted
Updates to use torchao's updated choose_qparams_affine and quantize/dequantize_affine (#11070)
Summary: Pull Request resolved: #11070 Updates to use torchao's updated choose_qparams_affine and quantize/dequantize_affine without the zero_point_domain arg Differential Revision: D75228037
1 parent 62a2509 commit 6b3810f

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

backends/xnnpack/utils/quant_utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,6 @@ def extract_qdq_affine_op_args_for_decomposed_ops(node: torch.fx.Node):
222222

223223
# add target_dtype_node after quant_min/quant_max
224224
args.append(target_dtype)
225-
# zero_point_domain
226-
if len(node.args) > 7 and node.args[7] != "INT":
227-
return None, None
228225

229226
if is_per_channel_group(node):
230227
block_sizes = cast(list[int], node.args[1])

exir/passes/_quant_patterns_and_replacements.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,6 @@ def embedding_byte_dtype_pattern(
10171017
torch.int8,
10181018
-128,
10191019
127,
1020-
"INT",
10211020
output_dtype,
10221021
)
10231022
return torch.ops.aten.embedding.default(dq, indices)
@@ -1062,7 +1061,6 @@ def embedding_2bit_dtype_pattern(
10621061
torch.int8,
10631062
-2,
10641063
1,
1065-
"INT",
10661064
output_dtype,
10671065
)
10681066
return torch.ops.aten.embedding.default(dq, indices)
@@ -1110,7 +1108,6 @@ def embedding_4bit_dtype_pattern(
11101108
torch.int8,
11111109
-8,
11121110
7,
1113-
"INT",
11141111
output_dtype,
11151112
)
11161113
return torch.ops.aten.embedding.default(dq, indices)

0 commit comments

Comments
 (0)