mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[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:
parent
496bbf38be
commit
d67c1a027e
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user