diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2021-07-26 13:18:50 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-09-07 13:44:08 +0000 |
commit | aed63ee175e0d64c934389e9d1b2edd0cb1a5cdd (patch) | |
tree | 8f025f849e863b9cdec1d6b889bc463e6c4f78d1 /src/core/NEON/kernels/arm_gemm/quantize_wrapper.hpp | |
parent | 58d3c5a7df769def499806e4d26cea518add161a (diff) | |
download | ComputeLibrary-aed63ee175e0d64c934389e9d1b2edd0cb1a5cdd.tar.gz |
Add support for non-constant weights and biases in CpuFullyConnected
Changing the approach for specifying that weights and biases tensors are
non-constant by making it a member of TensorInfo rather than an option
of the functions.
Resolves: COMPMID-4222
Change-Id: I96e6f3868f51785c9700a3ef6a1fe7b05747862c
Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6162
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/arm_gemm/quantize_wrapper.hpp')
-rw-r--r-- | src/core/NEON/kernels/arm_gemm/quantize_wrapper.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/NEON/kernels/arm_gemm/quantize_wrapper.hpp b/src/core/NEON/kernels/arm_gemm/quantize_wrapper.hpp index 1e2a9acc1d..ce727032e6 100644 --- a/src/core/NEON/kernels/arm_gemm/quantize_wrapper.hpp +++ b/src/core/NEON/kernels/arm_gemm/quantize_wrapper.hpp @@ -179,13 +179,16 @@ public: return _subgemm->get_B_pretransposed_array_size() + col_sum_size(); } + void requantize_bias(void *in_buffer, const To *B, const int ldb, const int B_multi_stride) override { + _col_sums = reinterpret_cast<int32_t *>(in_buffer); + col_sums_pretransposed(B, ldb, B_multi_stride); + } + void pretranspose_B_array(void *buffer, const To *B, const int ldb, const int B_multi_stride) override { uintptr_t buffer_int = reinterpret_cast<uintptr_t>(buffer); _subgemm->pretranspose_B_array(reinterpret_cast<void *>(buffer_int + col_sum_size()), B, ldb, B_multi_stride); - _col_sums = reinterpret_cast<int32_t *>(buffer); - - col_sums_pretransposed(B, ldb, B_multi_stride); + requantize_bias(buffer, B, ldb, B_multi_stride); } void set_pretransposed_B_data(void *buffer) override { |