Skip to content

Commit 42ef3ab

Browse files
committed
fix the issue from dnnlConvTypeMapping
1 parent b88cade commit 42ef3ab

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/plugins/intel_cpu/src/nodes/conv.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,6 @@ std::tuple<VecMemoryDescs, MemoryDescPtr> Convolution::initMemoryDescriptors(ov:
400400
srcDescs.push_back(MemoryDescUtils::makeEmptyDesc());
401401
continue;
402402
}
403-
// int8 convolution with f16 bias is not supported in oneDNN
404-
if (i == BIAS && m_attrs.withBias && canBeExecutedInInt8() && srcTypes[i] == ov::element::f16) {
405-
auto srcDesc = creatorsMap.at(LayoutType::ncsp)->createSharedDesc(ov::element::f32, getInputShapeAtPort(i));
406-
srcDescs.push_back(srcDesc);
407-
continue;
408-
}
409403
auto srcDesc = creatorsMap.at(LayoutType::ncsp)->createSharedDesc(srcTypes[i], getInputShapeAtPort(i));
410404
srcDescs.push_back(srcDesc);
411405
}

src/plugins/intel_cpu/src/nodes/executors/convolution_implementations.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ static const TypeMapping dnnlConvTypeMapping {
4949
{{_bf16, _f16, _any, _any}, pt(bypass(), bypass(), use<0>(), use<0>())},
5050
{{_f16, _bf16, _any, _any}, pt(bypass(), bypass(), use<0>(), use<0>())},
5151
// quantization configuration
52-
{{_u8 | _i8, _i8, _quant | _hw_float | _i32 | _dynamic, _quant | _hw_float | _i32 | _dynamic}, pt(bypass(), bypass(), bypass(), bypass())},
52+
// int8 conv does not support f16 output and bias
53+
{{_u8 | _i8, _i8, _quant |_bf16 | _f32 | _i32 | _dynamic, _quant | _bf16 | _f32 | _i32 | _dynamic}, pt(bypass(), bypass(), bypass(), bypass())},
54+
{{_u8 | _i8, _i8, _f16, _u8 | _i8 | _i32 | _bf16 | _f32}, pt(bypass(), bypass(), just<f32>(), bypass())},
55+
{{_u8 | _i8, _i8, _any, _any}, pt(bypass(), bypass(), just<f32>(), just<f32>())},
5356
// @todo should we fallback to FPXX instead of _f32?
5457
{{_any, _any, _any, _any}, pt(just<f32>(), just<f32>(), just<f32>(), just<f32>())},
5558
// @todo explicitly cover configuration limitations for oneDNN on ARM

0 commit comments

Comments
 (0)