[CPU] Avoid overflow in GatherDecompression builders, enable tests (#24629)
This commit is contained in:
parent
b014776bf4
commit
0eab4efffa
|
|
@ -303,8 +303,6 @@ std::vector<std::string> disabledTestPatterns() {
|
|||
R"(.*(nightly|smoke)_MM_Brgemm_Static/MatMulLayerCPUTest.CompareWithRefs/MatMul_IS=\[\]_\[\]_TS=\(\(55.12\)\)_\(\(12.55\)\)_.*config=\(INFERENCE_PRECISION_HINT=bf16_\)_Fused=Multiply\(PerChannel\)_primitive=brgemm_avx512.*)",
|
||||
R"(.*smoke_MM_Brgemm_Dynamic_Fusing/MatMulLayerCPUTest.CompareWithRefs/MatMul_IS=\[\?.\?\]_\[\?.33\]_TS=\(\(16.12\)_\(33.7\)_\(16.12\)\)_\(\(12.33\)_\(7.33\)_\(12.33\)\)_transpose_a=0_transpose_b=0_secondaryInputType=PARAMETER_netPRC=f32_inPRC=undefined_outPRC=undefined_trgDev=CPUconfig=\(INFERENCE_PRECISION_HINT=bf16_\)_Fused=Multiply\(PerChannel\)_primitive=brgemm_avx512.*)",
|
||||
// Issue: 140389
|
||||
R"(.*smoke_GatherCompressedWeights_basic/GatherWeightsDecompression.CompareWithRefs.*i4.*)",
|
||||
R"(.*smoke_MatmulAndGatherSharedWeightsDecompression.*weights_precision=i4.*decompression_subtract=1.*)",
|
||||
R"(.*FQLayerDQBias.smoke_CompareWithRefs.*)",
|
||||
R"(.*smoke_matmulBrgemmInt8/MatmulBrgemmInt8Test.CompareWithRefs.*MatMul.*InputType=i8_OutputType=i8.*)",
|
||||
R"(.*smoke_Snippets_MHAWOTransposeOnInputs_4D/MHAWOTransposeOnInputs.CompareWithRefImpl.*)",
|
||||
|
|
|
|||
|
|
@ -200,9 +200,11 @@ std::shared_ptr<ov::Node> initGatherDecompressionSubgraph(const ov::Shape& data_
|
|||
original_data_shape[data_idx] = data_shape[1] / group_size;
|
||||
original_data_shape.insert(original_data_shape.begin() + data_idx + 1, group_size);
|
||||
}
|
||||
ov::test::utils::InputGenerateData generate_data;
|
||||
|
||||
const auto up_to = data_precision == ov::element::i4 ? 7 : 15;
|
||||
ov::test::utils::InputGenerateData generate_data(0, up_to);
|
||||
if (data_precision.is_signed())
|
||||
generate_data.start_from = -5;
|
||||
generate_data.start_from = -1;
|
||||
auto weights_tensor = ov::test::utils::create_and_fill_tensor(data_precision, original_data_shape, generate_data);
|
||||
auto weights = std::make_shared<ov::op::v0::Constant>(weights_tensor);
|
||||
weights->set_friendly_name("Compressed_weights");
|
||||
|
|
@ -226,7 +228,7 @@ std::shared_ptr<ov::Node> initGatherDecompressionSubgraph(const ov::Shape& data_
|
|||
scaleshift_const_shape.end());
|
||||
if (add_subtract) {
|
||||
auto shift_tensor_shape = per_tensor_zp ? ov::Shape{1} : scaleshift_const_shape;
|
||||
auto shift_tensor = ov::test::utils::create_and_fill_tensor(data_precision, shift_tensor_shape);
|
||||
auto shift_tensor = ov::test::utils::create_and_fill_tensor(data_precision, shift_tensor_shape, ov::test::utils::InputGenerateData(0, up_to));
|
||||
if (per_tensor_zp && data_precision.bitwidth() == 4) {
|
||||
static_cast<uint8_t*>(shift_tensor.data())[0] = 0x88;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue