Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CPU][ARM] ACL upgrade to 24.11 #27647

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions src/plugins/intel_cpu/src/nodes/executors/acl/acl_deconv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,23 @@ bool AclDeconvExecutor::init(const DeconvAttrs& deconvAttrs,
return false;
}

lifetime_mgr = std::make_shared<arm_compute::BlobLifetimeManager>();
pool_mgr = std::make_shared<arm_compute::PoolManager>();
aclMemoryManager = std::make_shared<arm_compute::MemoryManagerOnDemand>(lifetime_mgr, pool_mgr);
aclMemoryGroup = std::make_shared<arm_compute::MemoryGroup>(aclMemoryManager);

aclMemoryGroup->manage(&srcTensor);
aclMemoryGroup->manage(&weiTensor);
aclMemoryGroup->manage(&dstTensor);
srcTensor.allocator()->init(srcTensorInfo);
weiTensor.allocator()->init(weiTensorInfo);
dstTensor.allocator()->init(dstTensorInfo);
if (deconvAttrs.withBiasesParam)
if (deconvAttrs.withBiasesParam) {
aclMemoryGroup->manage(&biasTensor);
biasTensor.allocator()->init(biasTensorInfo);
}

deconv = std::make_unique<arm_compute::NEDeconvolutionLayer>();
deconv = std::make_unique<arm_compute::NEDeconvolutionLayer>(aclMemoryManager);
configureThreadSafe([&] {
deconv->configure(&srcTensor, &weiTensor, deconvAttrs.withBiasesParam ? &biasTensor : nullptr, &dstTensor, deconv_info, deconvAttrs.aclFastMath);
});
Expand Down Expand Up @@ -185,13 +195,21 @@ void AclDeconvExecutor::exec(const std::vector<MemoryCPtr>& src, const std::vect
dstTensor.allocator()->import_memory(dst[0]->getData());
if (deconvAttrs.withBiasesParam)
biasTensor.allocator()->import_memory(src[2]->getData());

arm_compute::Allocator allocator{};
aclMemoryManager->populate(allocator, 1);
aclMemoryGroup->acquire();

deconv->run();

srcTensor.allocator()->free();
dstTensor.allocator()->free();
weiTensor.allocator()->free();
if (deconvAttrs.withBiasesParam)
biasTensor.allocator()->free();

aclMemoryGroup->release();
aclMemoryManager->clear();
}

bool AclDeconvExecutorBuilder::customIsSupported(const DeconvAttrs &deconvAttrs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

#include "nodes/executors/deconv.hpp"
#include "arm_compute/runtime/NEON/NEFunctions.h"
#include "arm_compute/runtime/PoolManager.h"
#include "arm_compute/runtime/MemoryManagerOnDemand.h"
#include "arm_compute/runtime/BlobLifetimeManager.h"
#include "arm_compute/runtime/Allocator.h"
#include "utils/debug_capabilities.h"
#include "acl_utils.hpp"
#include "src/cpu/CpuTypes.h"
Expand Down Expand Up @@ -48,6 +52,10 @@ class AclDeconvExecutor : public DeconvExecutor {
arm_compute::Tensor weiTensor;
arm_compute::Tensor biasTensor;
arm_compute::Tensor dstTensor;
std::shared_ptr<arm_compute::BlobLifetimeManager> lifetime_mgr = nullptr;
std::shared_ptr<arm_compute::PoolManager> pool_mgr = nullptr;
std::shared_ptr<arm_compute::MemoryManagerOnDemand> aclMemoryManager = nullptr;
std::shared_ptr<arm_compute::MemoryGroup> aclMemoryGroup = nullptr;
std::unique_ptr<arm_compute::NEDeconvolutionLayer> deconv = nullptr;
};

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/intel_cpu/thirdparty/ComputeLibrary
Submodule ComputeLibrary updated 137 files
Loading