aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2020-06-23 17:28:38 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2020-06-25 13:04:57 +0000
commit0f954eb6c8bf2f6c8600c56f21fec6aa9ebf082e (patch)
tree2b01d006548db93d8870f638789a41127496f000
parent0b5af9f2751ad6cb7ce76c577a6e67abe6dc8aa1 (diff)
downloadComputeLibrary-0f954eb6c8bf2f6c8600c56f21fec6aa9ebf082e.tar.gz
COMPMID-3324: Remove pretranspose_B support from NEGEMM
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: Idc60402bebdeeba7a998f69b63f302d75500763e Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3449 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--examples/graph_vgg16.cpp10
-rw-r--r--examples/graph_vgg19.cpp10
-rw-r--r--src/runtime/NEON/functions/NEGEMM.cpp11
-rw-r--r--src/runtime/NEON/functions/NEGEMMAssemblyDispatch.cpp4
4 files changed, 4 insertions, 31 deletions
diff --git a/examples/graph_vgg16.cpp b/examples/graph_vgg16.cpp
index f6996dadd5..b17e47d544 100644
--- a/examples/graph_vgg16.cpp
+++ b/examples/graph_vgg16.cpp
@@ -41,16 +41,6 @@ public:
}
bool do_setup(int argc, char **argv) override
{
- // Check if the system has enough RAM to run the example, systems with less than 2GB have
- // to hint the API to minimize memory consumption otherwise it'll run out of memory and
- // fail throwing the bad_alloc exception
- arm_compute::MEMInfo meminfo;
- const size_t mem_total = meminfo.get_total_in_kb();
- if(mem_total <= arm_compute::MEMInfo::TWO_GB_IN_KB)
- {
- arm_compute::MEMInfo::set_policy(arm_compute::MemoryPolicy::MINIMIZE);
- }
-
// Parse arguments
cmd_parser.parse(argc, argv);
cmd_parser.validate();
diff --git a/examples/graph_vgg19.cpp b/examples/graph_vgg19.cpp
index f9f5c213d5..6d38a936c3 100644
--- a/examples/graph_vgg19.cpp
+++ b/examples/graph_vgg19.cpp
@@ -40,16 +40,6 @@ public:
}
bool do_setup(int argc, char **argv) override
{
- // Check if the system has enough RAM to run the example, systems with less than 2GB have
- // to hint the API to minimize memory consumption otherwise it'll run out of memory and
- // fail throwing the bad_alloc exception
- arm_compute::MEMInfo meminfo;
- const size_t mem_total = meminfo.get_total_in_kb();
- if(mem_total <= arm_compute::MEMInfo::TWO_GB_IN_KB)
- {
- arm_compute::MEMInfo::set_policy(arm_compute::MemoryPolicy::MINIMIZE);
- }
-
// Parse arguments
cmd_parser.parse(argc, argv);
cmd_parser.validate();
diff --git a/src/runtime/NEON/functions/NEGEMM.cpp b/src/runtime/NEON/functions/NEGEMM.cpp
index 2bd459a389..89dd4a15d0 100644
--- a/src/runtime/NEON/functions/NEGEMM.cpp
+++ b/src/runtime/NEON/functions/NEGEMM.cpp
@@ -68,16 +68,7 @@ void NEGEMM::configure(const ITensor *a, const ITensor *b, const ITensor *c, ITe
if(run_optimised)
{
const ITensor *c_to_use = is_c_bias ? c : nullptr;
- if(MEMInfo::get_policy() == MemoryPolicy::MINIMIZE)
- {
- GEMMInfo gemm_info_ntb = gemm_info;
- gemm_info_ntb.set_pretranpose_B(false);
- _asm_glue.configure(a, b, c_to_use, d, gemm_info_ntb);
- }
- else
- {
- _asm_glue.configure(a, b, c_to_use, d, gemm_info);
- }
+ _asm_glue.configure(a, b, c_to_use, d, gemm_info);
ARM_COMPUTE_ERROR_ON(!_asm_glue.is_configured());
// Scale product by alpha
diff --git a/src/runtime/NEON/functions/NEGEMMAssemblyDispatch.cpp b/src/runtime/NEON/functions/NEGEMMAssemblyDispatch.cpp
index 7a1f0850b2..1fcac58e10 100644
--- a/src/runtime/NEON/functions/NEGEMMAssemblyDispatch.cpp
+++ b/src/runtime/NEON/functions/NEGEMMAssemblyDispatch.cpp
@@ -516,10 +516,12 @@ NEGEMMAssemblyDispatch::NEGEMMAssemblyDispatch(std::shared_ptr<IMemoryManager> m
Status NEGEMMAssemblyDispatch::validate(const ITensorInfo *a, const ITensorInfo *b, const ITensorInfo *c, const ITensorInfo *d, const GEMMInfo &gemm_info)
{
- ARM_COMPUTE_UNUSED(gemm_info, c);
+ ARM_COMPUTE_UNUSED(c);
ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(a, b, d);
ARM_COMPUTE_RETURN_ERROR_ON_CPU_F16_UNSUPPORTED(a);
ARM_COMPUTE_RETURN_ERROR_ON_CPU_BF16_UNSUPPORTED(a);
+
+ ARM_COMPUTE_RETURN_ERROR_ON(!gemm_info.pretranpose_B());
#ifndef __aarch64__
ARM_COMPUTE_RETURN_ERROR_ON_MSG(a->element_size() == 1, "8bit integer types only supported for aarch64");
#endif /* __aarch64__ */