Skip to content

Commit

Permalink
[CPU] Fix Interpolate impl bug and add related test case (#19783)
Browse files Browse the repository at this point in the history
  • Loading branch information
meiyang-intel authored Sep 18, 2023
1 parent 09aece6 commit e9aaf9a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/plugins/intel_cpu/src/nodes/bin_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ struct jit_uni_bin_conv_kernel_f32 : public jit_uni_bin_conv_kernel, public jit_
add(reg_d_weights, jcp_.oc_block * sizeof(float));
}

depthwise_inj_idx++;
post_ops_data_offset += depthwise_injectors[depthwise_inj_idx]->memoryStep();
depthwise_inj_idx++;

push(reg_oc_off);
} else if (post_op.is_sum(false)) {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/intel_cpu/src/nodes/interpolate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1519,8 +1519,8 @@ struct jit_uni_interpolate_kernel_f32 : public jit_uni_interpolate_kernel, publi
depthwise_injectors[depthwise_inj_idx]->compute_vector_range(
vmm_val.getIdx(), vmm_val.getIdx() + 1, reg_d_weights, reg_d_weights, is_broadcast);

depthwise_inj_idx++;
post_ops_data_offset += depthwise_injectors[depthwise_inj_idx]->memoryStep();
depthwise_inj_idx++;
} else if (post_op.is_quantization()) {
bool do_dequantization = post_op.quantization.alg == alg_kind::quantization_quantize_dequantize;
bool do_rounding = do_dequantization || dst_prc == Precision::FP32 || i != p.len() - 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,13 +462,18 @@ const std::vector<ShapeParams> shapeParams4D_fixed_C = {
};

#if defined(OPENVINO_ARCH_X86) || defined(OPENVINO_ARCH_X86_64)
const std::vector<fusingSpecificParams> interpolateFusingParamsSet_fixed_C{
fusingFakeQuantizePerChannelRelu,
fusingMultiplyPerChannel,
};

INSTANTIATE_TEST_SUITE_P(smoke_InterpolateNN_Layout_PerChannelFuse_Test, InterpolateLayerCPUTest,
::testing::Combine(
interpolateCasesNN_Smoke,
::testing::ValuesIn(shapeParams4D_fixed_C),
::testing::Values(ElementType::f32),
::testing::ValuesIn(filterCPUInfoForDevice()),
::testing::Values(fusingFakeQuantizePerChannelRelu),
::testing::ValuesIn(interpolateFusingParamsSet_fixed_C),
::testing::ValuesIn(filterAdditionalConfig())),
InterpolateLayerCPUTest::getTestCaseName);

Expand All @@ -478,7 +483,7 @@ INSTANTIATE_TEST_SUITE_P(InterpolateNN_Layout_PerChannelFuse_Test, InterpolateLa
::testing::ValuesIn(shapeParams4D_fixed_C),
::testing::Values(ElementType::f32),
::testing::ValuesIn(filterCPUInfoForDevice()),
::testing::Values(fusingFakeQuantizePerChannelRelu),
::testing::ValuesIn(interpolateFusingParamsSet_fixed_C),
::testing::ValuesIn(filterAdditionalConfig())),
InterpolateLayerCPUTest::getTestCaseName);
#endif
Expand Down Expand Up @@ -1015,5 +1020,4 @@ INSTANTIATE_TEST_SUITE_P(smoke_InterpolateBicubicPillow_LayoutAlign_Test, Interp
InterpolateLayerCPUTest::getTestCaseName);

} // namespace

} // namespace CPULayerTestsDefinitions

0 comments on commit e9aaf9a

Please sign in to comment.