fix eltwise autob issue
powerstatic don't get the autob attibute from origin op Signed-off-by: HU Yuan2 <yuan2.hu@intel.com>
This commit is contained in:
parent
9387d3a7d4
commit
1139296411
@ -63,9 +63,10 @@ Result NoBroadCastEltwiseShapeInfer::infer(
|
||||
if (input_shape.size() != output_shape.size()) {
|
||||
OPENVINO_THROW("Eltwise shape infer input and output shapes rank mismatch");
|
||||
}
|
||||
for (size_t j = 0; j < input_shapes.size(); ++j) {
|
||||
for (size_t j = 0; j < input_shape.size(); ++j) {
|
||||
if (input_shape[j] != output_shape[j]) {
|
||||
OPENVINO_THROW("Eltwise shape infer input shapes dim index: ", j, " mismatch");
|
||||
OPENVINO_THROW("Eltwise shape infer input shapes dim index: ", j, " mismatch", " first input:", ov::intel_cpu::vec2str(input_shape)
|
||||
, " second input:", ov::intel_cpu::vec2str(output_shape));
|
||||
}
|
||||
}
|
||||
return { { std::move(output_shape) }, ShapeInferStatus::success };
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include <node.h>
|
||||
#include "shape_inference/shape_inference_cpu.hpp"
|
||||
#include "transformations/cpu_opset/common/op/power_static.hpp"
|
||||
|
||||
#pragma once
|
||||
namespace ov {
|
||||
@ -41,7 +42,8 @@ public:
|
||||
EltwiseShapeInferFactory(std::shared_ptr<ov::Node> op) : m_op(op) {}
|
||||
ShapeInferPtr makeShapeInfer() const override {
|
||||
const auto& autob = m_op->get_autob();
|
||||
if (autob.m_type == ov::op::AutoBroadcastType::NONE) {
|
||||
if (autob.m_type == ov::op::AutoBroadcastType::NONE
|
||||
&& (!ov::is_type<const ov::intel_cpu::PowerStaticNode>(m_op))) {
|
||||
return std::make_shared<NoBroadCastEltwiseShapeInfer>();
|
||||
} else {
|
||||
return std::make_shared<EltwiseShapeInfer>();
|
||||
|
Loading…
Reference in New Issue
Block a user