Skip to content

Commit 5d7745b

Browse files
committed
Apply suggestions from code review
1 parent 36f0391 commit 5d7745b

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

src/plugins/intel_cpu/src/nodes/topk.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,9 +1988,7 @@ void TopK::initSupportedPrimitiveDescriptors() {
19881988
ov::element::Type dataPrecision = getOriginalOutputPrecisionAtPort(TOPK_DATA);
19891989
bool precisionSupported = std::find(std::begin(supportedPrecision), std::end(supportedPrecision), dataPrecision) !=
19901990
std::end(supportedPrecision);
1991-
// BF16 is not supported for AVX2_VNNI_2 platforms
1992-
precisionSupported =
1993-
(dataPrecision == ov::element::bf16 && mayiuse(cpu::x64::avx2_vnni_2)) ? false : precisionSupported;
1991+
precisionSupported = (dataPrecision == ov::element::bf16 && !mayiuse(avx512_core)) ? false : precisionSupported;
19941992
if (!precisionSupported) {
19951993
if (dataPrecision.is_real()) {
19961994
dataPrecision = ov::element::f32;

src/plugins/intel_cpu/tests/functional/custom/single_layer_tests/classes/conversion.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ void ConvertCPULayerTest::SetUp() {
146146

147147
function = makeNgraphFunction(inPrc, params, conversion, "ConversionCPU");
148148

149+
// issue 161636
149150
if (special_value == ov::test::SpecialValue::none && outPrc == ov::element::f8e4m3) {
150151
abs_threshold = 0.0078125f;
151152
rel_threshold = 1e-2f;

src/plugins/intel_cpu/tests/functional/custom/single_layer_tests/normalize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ class NormalizeL2LayerCPUTest : public testing::WithParamInterface<NormalizeL2La
6464
if (selectedType.empty()) {
6565
selectedType = getPrimitiveType();
6666
}
67-
// BF16 is not supported for NormalizeL2 on AVX2_VNNI_2 platforms
68-
if (with_cpu_x86_avx2_vnni_2() && inType == ElementType::bf16) {
67+
68+
if (!with_cpu_x86_avx512_core() && inType == ElementType::bf16) {
6969
selectedType = makeSelectedTypeStr("unknown", ElementType::f32);
7070
} else {
7171
selectedType = makeSelectedTypeStr("unknown", inType);

src/plugins/intel_cpu/tests/functional/custom/single_layer_tests/roi_pooling.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ class ROIPoolingCPULayerTest : public testing::WithParamInterface<ROIPoolingCPUT
194194
selectedType = getPrimitiveType();
195195
}
196196
selectedType.push_back('_');
197-
// BF16 is not supported for ROIPooling on AVX2_VNNI_2 platforms
198-
if (with_cpu_x86_avx2_vnni_2() && netPrecision == ElementType::bf16) {
197+
198+
if (!with_cpu_x86_avx512_core() && netPrecision == ElementType::bf16) {
199199
selectedType += ov::element::f32.to_string();
200200
} else {
201201
selectedType += netPrecision.to_string();

src/plugins/intel_cpu/tests/functional/custom/single_layer_tests/topk.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ class TopKLayerCPUTest : public testing::WithParamInterface<TopKLayerCPUTestPara
102102
inPrc = outPrc = netPrecision;
103103
configuration.insert(additionalConfig.begin(), additionalConfig.end());
104104

105-
// BF16 is not supported for TopK on AVX2_VNNI_2 platforms
106-
if (with_cpu_x86_avx2_vnni_2() && netPrecision == ElementType::bf16) {
105+
if (!ov::with_cpu_x86_avx512_core() && netPrecision == ElementType::bf16) {
107106
selectedType = makeSelectedTypeStr(getPrimitiveType(), ElementType::f32);
108107
} else {
109108
selectedType = makeSelectedTypeStr(getPrimitiveType(), netPrecision);

0 commit comments

Comments
 (0)