aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/fixtures/GEMMFixture.h
diff options
context:
space:
mode:
authorIsabella Gottardi <isabella.gottardi@arm.com>2018-03-01 16:42:00 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:53:09 +0000
commit8e74f4488daf1b628ca718396d5fc72fea95a83d (patch)
treef372c61aab423799f82ea7a98aa6a157a4887bdc /tests/validation/fixtures/GEMMFixture.h
parent0a887922c73bbe7c5d42b1eb3ae55730f0d9a139 (diff)
downloadComputeLibrary-8e74f4488daf1b628ca718396d5fc72fea95a83d.tar.gz
COMPMID-911: Allow GEMM to work with 3D tensors
Change-Id: I8c4823a0d909e19e9ef548f00b9ae98c66de61dd Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/123569 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/validation/fixtures/GEMMFixture.h')
-rw-r--r--tests/validation/fixtures/GEMMFixture.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/validation/fixtures/GEMMFixture.h b/tests/validation/fixtures/GEMMFixture.h
index e807ad8c06..8dd2998377 100644
--- a/tests/validation/fixtures/GEMMFixture.h
+++ b/tests/validation/fixtures/GEMMFixture.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -85,7 +85,12 @@ protected:
// Create and configure function
FunctionType gemm;
- gemm.configure(&a, &b, &c, &dst, alpha, beta);
+ // The GEMMinfo includes the values of the depth in case of reinterpreted 3d output.
+ // If the output shape has the same number of dimensions of the input the method called is a 2D matrix multiplication (depth_output_reinterpreted_as_3D = 1),
+ // in the other case we have to use the reinterpreted version of GEMM (depth_output_reinterpreted_as_3D = depth of the 3D output).
+ bool is_output_reinterpreted_as_3D = output_shape.num_dimensions() > shape_a.num_dimensions();
+ gemm.configure(&a, &b, &c, &dst, alpha, beta,
+ GEMMInfo(false, false, false, is_output_reinterpreted_as_3D ? output_shape[2] : 1));
ARM_COMPUTE_EXPECT(a.info()->is_resizable(), framework::LogLevel::ERRORS);
ARM_COMPUTE_EXPECT(b.info()->is_resizable(), framework::LogLevel::ERRORS);