Skip to content

Commit 10c74ec

Browse files
committed
fix mix sse/avx in fakequant
1 parent c572732 commit 10c74ec

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/cpu/x64/injectors/jit_uni_quantization_injector.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ void jit_uni_quantization_injector_f32<isa, Vmm>::compute_input_scale_shift_impl
129129

130130
if (is_scalar) {
131131
if (!post_op_.quantization.per_channel[post_op_.quantization.inp_scale])
132-
h->movss(xmm_d_weights_, h->ptr[reg_d_weights_ + weights_off]);
132+
h->uni_vmovss(xmm_d_weights_, h->ptr[reg_d_weights_ + weights_off]);
133133
else
134-
h->movss(xmm_d_weights_, h->ptr[reg_d_weights_ + offset + weights_off]);
134+
h->uni_vmovss(xmm_d_weights_, h->ptr[reg_d_weights_ + offset + weights_off]);
135135
} else {
136136
if (!post_op_.quantization.per_channel[post_op_.quantization.inp_scale])
137137
h->uni_vbroadcastss(vmm_d_weights_, h->ptr[reg_d_weights_ + weights_off]);
@@ -151,11 +151,11 @@ void jit_uni_quantization_injector_f32<isa, Vmm>::compute_input_scale_shift_impl
151151

152152
if (is_scalar) {
153153
if (!post_op_.quantization.per_channel[post_op_.quantization.inp_shift])
154-
h->movss(xmm_d_bias_, h->ptr[reg_d_bias_ + bias_off]);
154+
h->uni_vmovss(xmm_d_bias_, h->ptr[reg_d_bias_ + bias_off]);
155155
else if (post_op_.quantization.all_default[post_op_.quantization.inp_shift])
156156
h->uni_vpxor(vmm_d_bias_, vmm_d_bias_, vmm_d_bias_);
157157
else
158-
h->movss(xmm_d_bias_, h->ptr[reg_d_bias_ + offset + bias_off]);
158+
h->uni_vmovss(xmm_d_bias_, h->ptr[reg_d_bias_ + offset + bias_off]);
159159
} else {
160160
if (!post_op_.quantization.per_channel[post_op_.quantization.inp_shift])
161161
h->uni_vbroadcastss(vmm_d_bias_, h->ptr[reg_d_bias_ + bias_off]);
@@ -219,9 +219,9 @@ void jit_uni_quantization_injector_f32<isa, Vmm>::compute_output_scale_shift_imp
219219

220220
if (is_scalar) {
221221
if (!post_op_.quantization.per_channel[post_op_.quantization.output_scale])
222-
h->movss(xmm_d_weights_, h->ptr[reg_d_weights_ + weights_off]);
222+
h->uni_vmovss(xmm_d_weights_, h->ptr[reg_d_weights_ + weights_off]);
223223
else
224-
h->movss(xmm_d_weights_, h->ptr[reg_d_weights_ + offset + weights_off]);
224+
h->uni_vmovss(xmm_d_weights_, h->ptr[reg_d_weights_ + offset + weights_off]);
225225
} else {
226226
if (!post_op_.quantization.per_channel[post_op_.quantization.output_scale])
227227
h->uni_vbroadcastss(vmm_d_weights_, h->ptr[reg_d_weights_ + weights_off]);
@@ -241,11 +241,11 @@ void jit_uni_quantization_injector_f32<isa, Vmm>::compute_output_scale_shift_imp
241241

242242
if (is_scalar) {
243243
if (!post_op_.quantization.per_channel[post_op_.quantization.output_shift])
244-
h->movss(xmm_d_bias_, h->ptr[reg_d_bias_ + bias_off]);
244+
h->uni_vmovss(xmm_d_bias_, h->ptr[reg_d_bias_ + bias_off]);
245245
else if (post_op_.quantization.all_default[post_op_.quantization.output_shift])
246246
h->uni_vpxor(vmm_d_bias_, vmm_d_bias_, vmm_d_bias_);
247247
else
248-
h->movss(xmm_d_bias_, h->ptr[reg_d_bias_ + offset + bias_off]);
248+
h->uni_vmovss(xmm_d_bias_, h->ptr[reg_d_bias_ + offset + bias_off]);
249249
} else {
250250
if (!post_op_.quantization.per_channel[post_op_.quantization.output_shift])
251251
h->uni_vbroadcastss(vmm_d_bias_, h->ptr[reg_d_bias_ + bias_off]);

0 commit comments

Comments
 (0)