[Intel GPU][PT2E] bugfix: use zero-point to decide conv src zp mask (#149473)

# Motivation
The PR fix a bug that wrongly decides the zero-point mask setting. Specifically, it deems zero-point is always not zeros due to scale is used for judgement. Fortunately, the bug only affects the performance. The accuracy is not affected.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/149473
Approved by: https://github.com/EikanWang, https://github.com/guangyey
This commit is contained in:
ZhiweiYan-96 2025-03-19 02:22:00 +00:00 committed by PyTorch MergeBot
parent 496bbf38be
commit d67c1a027e

View File

@ -135,7 +135,7 @@ at::Tensor quantized_convolution(
mask_weight = (2 ^ 0) | (2 ^ 1); // 2^0 (group) | 2^1 (output channel)
dnnl::primitive_attr pattr;
bool src_need_zp = (act_scale != 0);
bool src_need_zp = (act_zero_point != 0);
bool dst_need_zp = (output_zero_point != 0);
// create usr_md for tensors, and md for conv primitive