diff options
author | Anthony Barbier <anthony.barbier@arm.com> | 2018-07-06 17:05:59 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:54:54 +0000 |
commit | 71d9b57aac146ae3ad5648c1308a872cea90070d (patch) | |
tree | b4f36f7c6a45782ef9e40fe4c6a9e9a68d716948 /src/runtime/NEON/functions/NEGEMMLowpAssemblyMatrixMultiplyCore.cpp | |
parent | d1794ebfa10d05af7d2458c5d506152fd38068d3 (diff) | |
download | ComputeLibrary-71d9b57aac146ae3ad5648c1308a872cea90070d.tar.gz |
COMPMID-1381: Cleaned up the AssemblyHelper interface
Introduced a new IFunction for when we'll fork the arm_gemm functions
Increased encapsulation and abstraction of which method is used
Change-Id: I5fd8b14b5c77e7f8ecb09029b5e2eccd10dbdcf4
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/139108
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Diffstat (limited to 'src/runtime/NEON/functions/NEGEMMLowpAssemblyMatrixMultiplyCore.cpp')
-rw-r--r-- | src/runtime/NEON/functions/NEGEMMLowpAssemblyMatrixMultiplyCore.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/runtime/NEON/functions/NEGEMMLowpAssemblyMatrixMultiplyCore.cpp b/src/runtime/NEON/functions/NEGEMMLowpAssemblyMatrixMultiplyCore.cpp index 98b476794d..9b5d02ca44 100644 --- a/src/runtime/NEON/functions/NEGEMMLowpAssemblyMatrixMultiplyCore.cpp +++ b/src/runtime/NEON/functions/NEGEMMLowpAssemblyMatrixMultiplyCore.cpp @@ -38,8 +38,8 @@ using namespace arm_compute; NEGEMMLowpAssemblyMatrixMultiplyCore::NEGEMMLowpAssemblyMatrixMultiplyCore(std::shared_ptr<IMemoryManager> memory_manager) - : _memory_group(std::move(memory_manager)), _asm_glue_unsigned(), _asm_glue_signed(), _mm_kernel(nullptr), _mtx_a_reshape_kernel(nullptr), _mtx_b_reshape_kernel(nullptr), _tmp_a(), _tmp_b(), - _workspace(), _B_pretransposed() + : _memory_group(memory_manager), _asm_glue_unsigned(memory_manager), _asm_glue_signed(memory_manager), _mm_kernel(nullptr), _mtx_a_reshape_kernel(nullptr), _mtx_b_reshape_kernel(nullptr), _tmp_a(), + _tmp_b() { } @@ -53,18 +53,19 @@ void NEGEMMLowpAssemblyMatrixMultiplyCore::configure(const ITensor *a, const ITe ARM_COMPUTE_ERROR_ON_MSG((b)->info()->dimension(0) != (output)->info()->dimension(0), "The output matrix must have the same number of columns as the matrix B"); bool run_optimised = false; -#ifdef __aarch64__ switch(a->info()->data_type()) { case DataType::S8: { - run_optimised = setup_assembly_kernel(a, b, output, 1.f, 0.f, true, _workspace, _B_pretransposed, _memory_group, _asm_glue_signed); + _asm_glue_signed.configure(a, b, output, 1.f, 0.f, true); + run_optimised = _asm_glue_unsigned.is_configured(); break; } case DataType::QASYMM8: case DataType::U8: { - run_optimised = setup_assembly_kernel(a, b, output, 1.f, 0.f, true, _workspace, _B_pretransposed, _memory_group, _asm_glue_unsigned); + _asm_glue_unsigned.configure(a, b, output, 1.f, 0.f, true); + run_optimised = _asm_glue_unsigned.is_configured(); break; } default: @@ -73,7 +74,6 @@ void NEGEMMLowpAssemblyMatrixMultiplyCore::configure(const ITensor *a, const ITe break; } } -#endif /* __aarch64__ */ if(!run_optimised) { // The interleaved output matrix will have the following shape: [ a_height * 4, ceil(a_width / 4.0f) ] @@ -133,11 +133,11 @@ void NEGEMMLowpAssemblyMatrixMultiplyCore::run() NEScheduler::get().schedule(_mtx_b_reshape_kernel.get(), Window::DimY); } - if(_asm_glue_unsigned._optimised_kernel != nullptr) + if(_asm_glue_unsigned.is_configured()) { _asm_glue_unsigned.run(); } - else if(_asm_glue_signed._optimised_kernel != nullptr) + else if(_asm_glue_signed.is_configured()) { _asm_glue_signed.run(); } |