diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_roll_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_roll_node.cpp index f2970d8145a753..9bfa0842980992 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_roll_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_roll_node.cpp @@ -126,30 +126,23 @@ void MKLDNNRollNode::execute(mkldnn::stream strm) { auto shifts = getParentEdgeAt(SHIFT_INDEX)->getBlob(); auto axes = getParentEdgeAt(AXES_INDEX)->getBlob(); auto output = getChildEdgeAt(0)->getBlob(); - const auto& dataPrecision = getInputPrecisions()[0]; - switch (dataPrecision) { - case Precision::I8: { - rollImpl(input, shifts, axes, output); + const auto dataPrecision = getInputPrecisions()[0]; + const auto& dataTypeSize = dataPrecision.size(); + switch (dataTypeSize) { + case sizeof(PrecisionTrait::value_type): { + rollImpl::value_type>(input, shifts, axes, output); break; } - case Precision::U8: { - rollImpl(input, shifts, axes, output); + case sizeof(PrecisionTrait::value_type): { + rollImpl::value_type>(input, shifts, axes, output); break; } - case Precision::I16: { - rollImpl(input, shifts, axes, output); + case sizeof(PrecisionTrait::value_type): { + rollImpl::value_type>(input, shifts, axes, output); break; } - case Precision::I32: { - rollImpl(input, shifts, axes, output); - break; - } - case Precision::FP32: { - rollImpl(input, shifts, axes, output); - break; - } - case Precision::I64: { - rollImpl(input, shifts, axes, output); + case sizeof(PrecisionTrait::value_type): { + rollImpl::value_type>(input, shifts, axes, output); break; } default: