Skip to content

Commit

Permalink
fix formatting and add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alvoron committed Jan 23, 2025
1 parent 20218d2 commit e3d1155
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/plugins/intel_cpu/src/nodes/executors/acl/acl_pooling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ bool AclPoolingExecutor::isSupported(const TensorInfo& srcTensorInfo,
if (dataLayout == arm_compute::DataLayout::NHWC) {
changeLayoutToNH_C({&indShape});
}
//U32 is specified since this is the only data type supported by ACL
TensorInfo indTensorInfo = TensorInfo(indShape, 1, arm_compute::DataType::U32, dataLayout);
arm_compute::Status s =
arm_compute::NEPoolingLayer::validate(&srcTensorInfo, &dstTensorInfo, *pool_info, &indTensorInfo);
Expand Down Expand Up @@ -184,10 +185,9 @@ bool AclPoolingExecutor::init(const PoolingAttrs& poolingAttrs,
if (dstTensorInfo.data_layout() == arm_compute::DataLayout::NHWC) {
changeLayoutToNH_C({&indShape});
}
TensorInfo indTensorInfo = TensorInfo(indShape,
1,
arm_compute::DataType::U32,
getAclDataLayoutByMemoryDesc(dstDescs[1]));
//U32 is specified since this is the only data type supported by ACL
TensorInfo indTensorInfo =
TensorInfo(indShape, 1, arm_compute::DataType::U32, getAclDataLayoutByMemoryDesc(dstDescs[1]));
indTensor.allocator()->init(indTensorInfo);
exec_func = [this, pool_info]() -> std::unique_ptr<IFunction> {
auto acl_op = std::make_unique<arm_compute::NEPoolingLayer>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ class AclPoolingExecutorBuilder : public PoolingExecutorBuilder {
return false;
}

if (dstDescs.size() == 2u &&
(dstDescs[1]->getPrecision() != ov::element::u32 && dstDescs[1]->getPrecision() != ov::element::i32)) {
if (dstDescs.size() == 2u && !one_of(dstDescs[1]->getPrecision(), ov::element::u32, ov::element::i32)) {
DEBUG_LOG("AclPoolingExecutor supports U32 as indices precisions only. ",
"Passed indices precision: ",
dstDescs[1]->getPrecision());
Expand Down

0 comments on commit e3d1155

Please sign in to comment.