diff options
author | Jakub Sujak <jakub.sujak@arm.com> | 2023-04-17 12:08:48 +0100 |
---|---|---|
committer | Omar Al Khatib <omar.alkhatib@arm.com> | 2023-05-05 14:48:28 +0000 |
commit | e9b3ee2badebf91188c1cd0e59d6aaa30ed60985 (patch) | |
tree | 750c39df7c0113caf6a893bb6af6e9ef1ecc3756 /tests/validation/fixtures/MatMulFixture.h | |
parent | edafe7f5fdc056fddc395c70420fc869dcb7d9fb (diff) | |
download | ComputeLibrary-e9b3ee2badebf91188c1cd0e59d6aaa30ed60985.tar.gz |
Connect CLMatMul function to quantized kernels and resolve NE BatchMatMul int_8 failures
* Adapt the CLMatMul function and ClMatMul operator to use quantized kernels.
* Add function-level tests.
Resolves: COMPMID-5929 and COMPMID-5811
Change-Id: I5348cdcf07b8074c138e04dfef0a73399377accd
Signed-off-by: Jakub Sujak <jakub.sujak@arm.com>
Signed-off-by: Omar Al Khatib <omar.alkhatib@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9575
Reviewed-by: Mohmun02 <MohammedSuhail.Munshi@arm.com>
Reviewed-by: SiCong Li <sicong.li@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/fixtures/MatMulFixture.h')
-rw-r--r-- | tests/validation/fixtures/MatMulFixture.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/validation/fixtures/MatMulFixture.h b/tests/validation/fixtures/MatMulFixture.h index 15719024b1..2f94c1f9d2 100644 --- a/tests/validation/fixtures/MatMulFixture.h +++ b/tests/validation/fixtures/MatMulFixture.h @@ -21,8 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef TESTS_VALIDATION_FIXTURES_MATMULFIXTURE -#define TESTS_VALIDATION_FIXTURES_MATMULFIXTURE +#ifndef ACL_TESTS_VALIDATION_FIXTURES_MATMULFIXTURE +#define ACL_TESTS_VALIDATION_FIXTURES_MATMULFIXTURE #include "arm_compute/core/Types.h" #include "arm_compute/core/Utils.h" @@ -188,8 +188,9 @@ protected: std::vector<int32_t> output_multipliers{ output_multiplier }; std::vector<int32_t> output_shifts{ output_shift }; + //The lhs and rhs offsets are negated here to keep the reference aligned with the function implementation where the lhs and rhs offsets are also negated. const auto tmp = reference::gemmlowp_matrix_multiply_core<int32_t>( - a, b, c.shape(), aq.offset, bq.offset); + a, b, c.shape(), -aq.offset, -bq.offset); auto output = reference::gemmlowp_quantize_down_scale_by_fixedpoint<int32_t, TT>( tmp, output_multipliers, output_shifts, oq.offset, @@ -314,4 +315,4 @@ public: } // namespace validation } // namespace test } // namespace arm_compute -#endif /* ARM_COMPUTE_TEST_MATMUL_FIXTURE */ +#endif /* ACL_TESTS_VALIDATION_FIXTURES_MATMULFIXTURE */ |