From 2b147ee857eb237613670460c52efedd43601955 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Thu, 8 Jul 2021 18:14:45 +0100 Subject: Avoid multiple Rhs matrix transformation on ClGemm ClWinogradConv2d was performing Rhs transformation on every step impacting the performance. Adds scope logging support through ARM_COMPUTE_LOG_MSG_WITH_FUNCNAME Resolves: COMPMID-4596 Signed-off-by: Georgios Pinitas Change-Id: Ib329d3bc8d8aa21abae9fabfe61de35cc84d4819 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5925 Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins --- src/runtime/NEON/functions/NEGEMM.cpp | 4 ++-- src/runtime/NEON/functions/NEGEMMConv2d.cpp | 4 ++-- src/runtime/NEON/functions/NEGEMMConvolutionLayer.cpp | 4 ++-- src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp | 4 ++-- src/runtime/NEON/functions/NEWinogradConvolutionLayer.cpp | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/runtime/NEON/functions') diff --git a/src/runtime/NEON/functions/NEGEMM.cpp b/src/runtime/NEON/functions/NEGEMM.cpp index 168d93022f..4bf330fa1e 100644 --- a/src/runtime/NEON/functions/NEGEMM.cpp +++ b/src/runtime/NEON/functions/NEGEMM.cpp @@ -114,12 +114,12 @@ void NEGEMM::prepare() // Release temporary tensors that are only used in prepare stage for(auto &ws : _impl->workspace) { - const int slot = ws.first; + const int slot = ws.slot; for(auto &m : _impl->aux_mem_req) { if(m.slot == slot && m.lifetime == MemoryLifetime::Prepare) { - auto tensor = ws.second.get(); + auto tensor = ws.tensor.get(); tensor->allocator()->free(); break; } diff --git a/src/runtime/NEON/functions/NEGEMMConv2d.cpp b/src/runtime/NEON/functions/NEGEMMConv2d.cpp index 3ca5239ae3..7e2ce70444 100644 --- a/src/runtime/NEON/functions/NEGEMMConv2d.cpp +++ b/src/runtime/NEON/functions/NEGEMMConv2d.cpp @@ -104,12 +104,12 @@ void NEGEMMConv2d::prepare() // Release temporary tensors that are only used in prepare stage for(auto &ws : _impl->workspace) { - const int slot = ws.first; + const int slot = ws.slot; for(auto &m : _impl->aux_mem_req) { if(m.slot == slot && m.lifetime == MemoryLifetime::Prepare) { - auto tensor = ws.second.get(); + auto tensor = ws.tensor.get(); tensor->allocator()->free(); break; } diff --git a/src/runtime/NEON/functions/NEGEMMConvolutionLayer.cpp b/src/runtime/NEON/functions/NEGEMMConvolutionLayer.cpp index 6386a678db..23ffbce954 100644 --- a/src/runtime/NEON/functions/NEGEMMConvolutionLayer.cpp +++ b/src/runtime/NEON/functions/NEGEMMConvolutionLayer.cpp @@ -107,12 +107,12 @@ void NEGEMMConvolutionLayer::prepare() } for(auto &ws : _impl->workspace_tensors) { - const int slot = ws.first; + const int slot = ws.slot; for(auto &m : _impl->aux_mem_req) { if(m.slot == slot && m.lifetime == MemoryLifetime::Prepare) { - auto tensor = ws.second.get(); + auto tensor = ws.tensor.get(); tensor->allocator()->free(); break; } diff --git a/src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp b/src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp index 641a2c2b5f..64507495ca 100644 --- a/src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp +++ b/src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp @@ -110,12 +110,12 @@ void NEGEMMLowpMatrixMultiplyCore::prepare() // Release temporary tensors that are only used in prepare stage for(auto &ws : _impl->workspace_tensors) { - const int slot = ws.first; + const int slot = ws.slot; for(auto &m : _impl->aux_mem_req) { if(m.slot == slot && m.lifetime == MemoryLifetime::Prepare) { - auto tensor = ws.second.get(); + auto tensor = ws.tensor.get(); tensor->allocator()->free(); break; } diff --git a/src/runtime/NEON/functions/NEWinogradConvolutionLayer.cpp b/src/runtime/NEON/functions/NEWinogradConvolutionLayer.cpp index 745179c050..b91048a426 100644 --- a/src/runtime/NEON/functions/NEWinogradConvolutionLayer.cpp +++ b/src/runtime/NEON/functions/NEWinogradConvolutionLayer.cpp @@ -99,12 +99,12 @@ void NEWinogradConvolutionLayer::prepare() // Release temporary tensors that are only used in prepare stage for(auto &ws : _impl->workspace) { - const int slot = ws.first; + const int slot = ws.slot; for(auto &m : _impl->aux_mem_req) { if(m.slot == slot && m.lifetime == MemoryLifetime::Prepare) { - auto tensor = ws.second.get(); + auto tensor = ws.tensor.get(); tensor->allocator()->free(); break; } -- cgit v1.2.1