Skip to content

Commit

Permalink
- fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jczaja committed Mar 14, 2023
1 parent b5084d0 commit a86c93f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions paddle/fluid/operators/mkldnn/requantize_mkldnn_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ class ReQuantOpKernel : public framework::OpKernel<T> {
dev_ctx.GetEngine(),
phi::funcs::to_void_cast<float>(&reorder_scale));

uint8_t reorder_shift =
with_shift ? clip_to_uint8(shift_out - 1.0f / reorder_scale * shift_in)
: 0;
uint32_t reorder_shift =
with_shift
? clip_to_uint8(shift_out - (1.0f / reorder_scale) * shift_in)
: 0;

if (with_shift) {
attrs.set_zero_points_mask(DNNL_ARG_DST, mask);
Expand Down

0 comments on commit a86c93f

Please sign in to comment.