[LPT] Transpose, MatMul: Klocwork fixes (#3192)
This commit is contained in:
committed by
GitHub
parent
322bc3498b
commit
6959f6671f
@@ -151,6 +151,9 @@ bool MatMulTransformation::canBeTransformed(const TransformationContext& context
|
||||
}
|
||||
|
||||
std::shared_ptr<opset1::MatMul> matMul = as_type_ptr<opset1::MatMul>(layer);
|
||||
if (matMul == nullptr) {
|
||||
return false;
|
||||
}
|
||||
const size_t channelIndex1 = matMul->get_transpose_a() ? 0 : 1;
|
||||
const size_t channelIndex2 = matMul->get_transpose_b() ? 1 : 0;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ void transposeDequantizationConstant(std::shared_ptr<Node>& transpose) {
|
||||
}
|
||||
|
||||
if (dequantization.multiply->get_input_node_ptr(1)->get_output_shape(0).size() > 1ul) {
|
||||
auto transposeConstant = [](
|
||||
auto transposeDeqConstant = [](
|
||||
std::shared_ptr<Node> dequantizationConstant,
|
||||
const Shape& transposeOutputShape,
|
||||
const std::shared_ptr<Node>& transposeConstant) -> std::shared_ptr<Node> {
|
||||
@@ -49,7 +49,7 @@ void transposeDequantizationConstant(std::shared_ptr<Node>& transpose) {
|
||||
};
|
||||
|
||||
if (dequantization.subtract != nullptr) {
|
||||
auto constant = transposeConstant(
|
||||
auto constant = transposeDeqConstant(
|
||||
dequantization.subtract->get_input_node_shared_ptr(1),
|
||||
transpose->get_output_shape(0),
|
||||
transpose->get_input_node_shared_ptr(1));
|
||||
@@ -61,7 +61,7 @@ void transposeDequantizationConstant(std::shared_ptr<Node>& transpose) {
|
||||
}
|
||||
|
||||
if (dequantization.multiply != nullptr) {
|
||||
auto constant = transposeConstant(
|
||||
auto constant = transposeDeqConstant(
|
||||
dequantization.multiply->get_input_node_shared_ptr(1),
|
||||
transpose->get_output_shape(0),
|
||||
transpose->get_input_node_shared_ptr(1));
|
||||
|
||||
Reference in New Issue
Block a user