aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2021-02-23 23:41:40 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2021-02-24 10:08:28 +0000
commit6f45cf77e784d1bfc2a57119671937a3c064eac2 (patch)
treec97e0ea611fe6ef3d114ba837ce3844dc3247038
parent85e16c2431f1adce1dd166d52caece9066546895 (diff)
downloadComputeLibrary-6f45cf77e784d1bfc2a57119671937a3c064eac2.tar.gz
Account Ksections correctly for interleaved and hybrid_indirect gemm kernels
Resolves: COMPMID-4131 Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: I6ab15d5dd2e89ccda6acf06e1bef7fd85e31ce54 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5169 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--src/core/NEON/kernels/arm_gemm/gemm_hybrid_indirect.hpp4
-rw-r--r--src/core/NEON/kernels/arm_gemm/gemm_interleaved.hpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/NEON/kernels/arm_gemm/gemm_hybrid_indirect.hpp b/src/core/NEON/kernels/arm_gemm/gemm_hybrid_indirect.hpp
index d06c2183d..5d5f21507 100644
--- a/src/core/NEON/kernels/arm_gemm/gemm_hybrid_indirect.hpp
+++ b/src/core/NEON/kernels/arm_gemm/gemm_hybrid_indirect.hpp
@@ -577,7 +577,7 @@ public:
// Note: Current hybrid kernels don't actually round up height (they
// have paths for each possible height). Might need to make this
// configurable in future.
- uint64_t total_macs = static_cast<uint64_t>(args._nbatches) * args._nmulti * args._Msize * roundup(args._Nsize, strategy::out_width()) * roundup(args._Ksize, strategy::k_unroll());
+ uint64_t total_macs = static_cast<uint64_t>(args._nbatches) * args._nmulti * args._Msize * roundup(args._Nsize, strategy::out_width()) * get_ktotal(args);
float mac_cycles = static_cast<float>(total_macs) / params.kernel_macs_cycle;
@@ -596,7 +596,7 @@ public:
const Requantize32 *qp = reinterpret_cast<const Requantize32 *>(&os);
// Row sums: need to consider each value in A (batch * multi * M * K)...
- uint64_t rowsum_bytes = static_cast<uint64_t>(args._nbatches) * args._nmulti * args._Msize * roundup(args._Ksize, strategy::k_unroll());
+ uint64_t rowsum_bytes = static_cast<uint64_t>(args._nbatches) * args._nmulti * args._Msize * get_ktotal(args);
// ... but row sums are skipped if B offset==0.
if (qp->b_offset == 0) {
diff --git a/src/core/NEON/kernels/arm_gemm/gemm_interleaved.hpp b/src/core/NEON/kernels/arm_gemm/gemm_interleaved.hpp
index 92c1086a5..7f870b83d 100644
--- a/src/core/NEON/kernels/arm_gemm/gemm_interleaved.hpp
+++ b/src/core/NEON/kernels/arm_gemm/gemm_interleaved.hpp
@@ -1022,8 +1022,8 @@ public:
static uint64_t estimate_cycles(const GemmArgs &args, const PerformanceParameters &params) {
unsigned int k_blocks = iceildiv(args._Ksize, get_k_block_size(args));
- uint64_t total_macs = static_cast<uint64_t>(args._nbatches) * args._nmulti * roundup(args._Msize, strategy::out_height()) * roundup(args._Nsize, strategy::out_width()) * roundup(args._Ksize, strategy::k_unroll());
- uint64_t prepare_bytes = static_cast<uint64_t>(args._nbatches) * args._nmulti * roundup(args._Msize, strategy::out_height()) * roundup(args._Ksize, strategy::k_unroll()) * sizeof(Toi);
+ uint64_t total_macs = static_cast<uint64_t>(args._nbatches) * args._nmulti * roundup(args._Msize, strategy::out_height()) * roundup(args._Nsize, strategy::out_width()) * get_ktotal(args);
+ uint64_t prepare_bytes = static_cast<uint64_t>(args._nbatches) * args._nmulti * roundup(args._Msize, strategy::out_height()) * get_ktotal(args) * sizeof(Toi);
uint64_t merge_bytes = static_cast<uint16_t>(args._nbatches) * args._nmulti * k_blocks * roundup(args._Msize, strategy::out_height()) * roundup(args._Nsize, strategy::out_width()) * sizeof(Tr);
float mac_cycles = static_cast<float>(total_macs) / params.kernel_macs_cycle;