Skip to content

Commit

Permalink
dynamism limitation removal
Browse files Browse the repository at this point in the history
  • Loading branch information
eshoguli committed Sep 25, 2023
1 parent 3e62804 commit 24f028b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 30 deletions.
10 changes: 0 additions & 10 deletions src/plugins/intel_cpu/src/nodes/executors/aarch64/jit_eltwise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ bool JitEltwiseExecutor::isSupported(
[](const InferenceEngine::Precision& precision) { return precision != InferenceEngine::Precision::FP32; })) {
return false;
}
for (size_t i = 0; i < input_precisions.size(); ++i) {
if (node->getInputShapeAtPort(i).isDynamic()) {
return false;
}
}
}

{
Expand All @@ -47,11 +42,6 @@ bool JitEltwiseExecutor::isSupported(
[](const InferenceEngine::Precision& precision) { return precision != InferenceEngine::Precision::FP32; })) {
return false;
}
for (size_t i = 0; i < output_precisions.size(); ++i) {
if (node->getOutputShapeAtPort(i).isDynamic()) {
return false;
}
}
}

if ((algorithm == Algorithm::EltwiseRelu) && ((alpha != 0.f) || (beta != 0.f) || (gamma != 0.f))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,36 +259,24 @@ CPUTestsBase::CPUInfo CPUTestsBase::getCPUInfo() const {
}

#if defined(OPENVINO_ARCH_ARM64)
namespace {
bool is_static(const std::vector<std::pair<ov::PartialShape, std::vector<ov::Shape>>>& input_shapes) {
return std::all_of(input_shapes.begin(),
input_shapes.end(),
[](const std::pair<ov::PartialShape, std::vector<ov::Shape>>& shape) { return shape.first.is_static(); });
}
} // namespace

std::string CPUTestsBase::getPrimitiveType(const ngraph::helpers::EltwiseTypes& eltwise_type,
const ov::element::Type_t& element_type,
const std::vector<std::pair<ov::PartialShape, std::vector<ov::Shape>>>& input_shapes) const {
if (element_type == ov::element::f32) {
if (is_static(input_shapes) &&
((eltwise_type == ngraph::helpers::EltwiseTypes::ADD) ||
(eltwise_type == ngraph::helpers::EltwiseTypes::MULTIPLY) ||
(eltwise_type == ngraph::helpers::EltwiseTypes::SUBTRACT) ||
(eltwise_type == ngraph::helpers::EltwiseTypes::DIVIDE))) {
return "jit";
}
if ((element_type == ov::element::f32) &&
((eltwise_type == ngraph::helpers::EltwiseTypes::ADD) ||
(eltwise_type == ngraph::helpers::EltwiseTypes::MULTIPLY) ||
(eltwise_type == ngraph::helpers::EltwiseTypes::SUBTRACT) ||
(eltwise_type == ngraph::helpers::EltwiseTypes::DIVIDE))) {
return "jit";
}
return "acl";
}

std::string CPUTestsBase::getPrimitiveType(const ngraph::helpers::ActivationTypes& activation_type,
const ov::element::Type_t& element_type,
const std::vector<std::pair<ov::PartialShape, std::vector<ov::Shape>>>& input_shapes) const {
if (element_type == ov::element::f32) {
if (is_static(input_shapes) && (activation_type == ngraph::helpers::ActivationTypes::Relu)) {
return "jit";
}
if ((element_type == ov::element::f32) && (activation_type == ngraph::helpers::ActivationTypes::Relu)) {
return "jit";
}

if (activation_type == ngraph::helpers::ActivationTypes::Mish) {
Expand Down

0 comments on commit 24f028b

Please sign in to comment.