Skip to content

Commit

Permalink
[CPU][RV64] Fixed isSupportedOp
Browse files Browse the repository at this point in the history
  • Loading branch information
a-sidorova committed Feb 5, 2025
1 parent e62e415 commit a631ae7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/plugins/intel_cpu/src/nodes/eltwise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -748,18 +748,14 @@ class EltwiseJitExecutor : public Eltwise::IEltwiseExecutor {
return _batchDimIdx;
}

static bool IsSupportedOp(const Node* node,
static bool isSupportedOp(const Node* node,
const float alpha,
const float beta,
const float gamma,
const std::vector<ov::element::Type>& input_precisions = {}) {
const auto algorithm = node->getAlgorithm();
if (one_of(algorithm,
Algorithm::EltwiseLog,
Algorithm::EltwiseBitwiseAnd,
Algorithm::EltwiseBitwiseNot,
Algorithm::EltwiseBitwiseOr,
Algorithm::EltwiseBitwiseXor,
Algorithm::EltwiseBitwiseLeftShift,
Algorithm::EltwiseBitwiseRightShift)) {
return false;
Expand All @@ -774,7 +770,11 @@ class EltwiseJitExecutor : public Eltwise::IEltwiseExecutor {
Algorithm::EltwisePowerDynamic,
Algorithm::EltwiseSoftRelu,
Algorithm::EltwiseHsigmoid,
Algorithm::EltwiseErf)) {
Algorithm::EltwiseErf,
Algorithm::EltwiseBitwiseAnd,
Algorithm::EltwiseBitwiseNot,
Algorithm::EltwiseBitwiseOr,
Algorithm::EltwiseBitwiseXor)) {
return false;
}

Expand Down Expand Up @@ -1441,7 +1441,7 @@ void Eltwise::initSupportedPrimitiveDescriptors() {
#endif

// if dim rank is greater than the maximum possible, we should use the reference execution
bool canUseOptimizedImpl = EltwiseJitExecutor::IsSupportedOp(this, getAlpha(), getBeta(), getGamma()) &&
bool canUseOptimizedImpl = EltwiseJitExecutor::isSupportedOp(this, getAlpha(), getBeta(), getGamma()) &&
isISASupportedByJIT && (getInputShapeAtPort(0).getRank() <= MAX_ELTWISE_DIM_RANK);
bool canUseOptimizedShapeAgnosticImpl = isDynamicNode() && canUseOptimizedImpl;

Expand Down Expand Up @@ -2358,7 +2358,7 @@ bool Eltwise::canFuseParent(const NodePtr& parentNode) const {
return false;
}
const auto& input_precisions = parentNode->getOriginalInputPrecisions();
if (!EltwiseJitExecutor::IsSupportedOp(this, getAlpha(), getBeta(), getGamma(), input_precisions)) {
if (!EltwiseJitExecutor::isSupportedOp(this, getAlpha(), getBeta(), getGamma(), input_precisions)) {
return false;
}
#else
Expand Down Expand Up @@ -2406,12 +2406,12 @@ bool Eltwise::canFuse(const NodePtr& node) const {
if (!mayiuse(dnnl::impl::cpu::aarch64::asimd) || (getInputShapeAtPort(0).getRank() > MAX_ELTWISE_DIM_RANK))
return false;

if (!EltwiseJitExecutor::IsSupportedOp(this, getAlpha(), getBeta(), getGamma())) {
if (!EltwiseJitExecutor::isSupportedOp(this, getAlpha(), getBeta(), getGamma())) {
return false;
}
const auto eltwise = dynamic_cast<const Eltwise*>(node.get());
if ((eltwise == nullptr) ||
(!EltwiseJitExecutor::IsSupportedOp(eltwise, eltwise->getAlpha(), eltwise->getBeta(), eltwise->getGamma()))) {
(!EltwiseJitExecutor::isSupportedOp(eltwise, eltwise->getAlpha(), eltwise->getBeta(), eltwise->getGamma()))) {
return false;
}
#elif defined(OPENVINO_ARCH_X86_64)
Expand Down

0 comments on commit a631ae7

Please sign in to comment.