From 04a0706dddc6ca24cb80e3e0789c6b0f54c48b28 Mon Sep 17 00:00:00 2001 From: SiCong Li Date: Tue, 17 Nov 2020 14:09:01 +0000 Subject: COMPMID-3979 Sanitise Padding Removal epic * Add missing padding immutability asserts in all relevant CL kernels * Remove unnecessary zero padding validation tests. Change-Id: If93f9ccbc988e0286f5e7b135f812141476d5da0 Signed-off-by: SiCong Li Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4446 Reviewed-by: Gian Marco Iodice Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- tests/validation/CL/GEMMReshapeLHSMatrix.cpp | 57 ---------------------------- 1 file changed, 57 deletions(-) (limited to 'tests/validation/CL/GEMMReshapeLHSMatrix.cpp') diff --git a/tests/validation/CL/GEMMReshapeLHSMatrix.cpp b/tests/validation/CL/GEMMReshapeLHSMatrix.cpp index 4af495944e..34c37dffde 100644 --- a/tests/validation/CL/GEMMReshapeLHSMatrix.cpp +++ b/tests/validation/CL/GEMMReshapeLHSMatrix.cpp @@ -82,68 +82,11 @@ const auto i_values = framework::dataset::make("interleave", { true, false }); /** Transpose values to test */ const auto t_values = framework::dataset::make("transpose", { true, false }); -/** Zero padding test */ -bool validate_zero_padding(unsigned int m_value, unsigned int k_value, unsigned int b_value, unsigned int m0_value, unsigned int k0_value, unsigned int v0_value, - bool i_value_lhs, bool t_value_lhs, bool input_as_3d, DataType dt) -{ - const unsigned int M = m_value; - const unsigned int K = k_value; - const unsigned int B = b_value; - - GEMMLHSMatrixInfo lhs_info; - lhs_info.m0 = m0_value; - lhs_info.k0 = k0_value; - lhs_info.v0 = v0_value; - lhs_info.interleave = i_value_lhs; - lhs_info.transpose = t_value_lhs; - - const TensorShape lhs_shape(K, M, B); - const TensorShape lhs_shape_reshaped = compute_lhs_reshaped_shape(TensorInfo(lhs_shape, 1, dt), lhs_info, input_as_3d); - - // Create tensors - CLTensor lhs = create_tensor(lhs_shape, dt); - CLTensor dst = create_tensor(lhs_shape_reshaped, dt); - - ARM_COMPUTE_EXPECT(lhs.info()->is_resizable(), framework::LogLevel::ERRORS); - ARM_COMPUTE_EXPECT(dst.info()->is_resizable(), framework::LogLevel::ERRORS); - - // Validate zero-padding - CLGEMMReshapeLHSMatrixKernel lhs_reshape; - - lhs_reshape.configure(&lhs, &dst, lhs_info, input_as_3d); - - return lhs.info()->padding().empty(); -} } // namespace TEST_SUITE(CL) TEST_SUITE(GEMMReshapeLHSMatrix) -/** Validate zero padding tests for the LHS input tensor - * - * A series of validation tests to test the zero padding requirement - * - * Checks performed in order: - * - Case where M and K are smaller than M0 and K0 - * - Generic test case with batch size = 1 - * - Generic test case with batch size = 4 - * - Generic test case with input_as_3d_value = true - */ -DATA_TEST_CASE(ValidateZeroPadding, framework::DatasetMode::ALL, zip(zip(zip(zip(zip( -framework::dataset::make("M", { 1, 23, 63, 101 }), -framework::dataset::make("K", { 1, 47, 29, 27 })), -framework::dataset::make("B", { 1, 1, 4, 7 })), -framework::dataset::make("M0", { 4, 2, 4, 8 })), -framework::dataset::make("K0", { 2, 2, 4, 8 })), -framework::dataset::make("input_as_3d", { false, false, false, true })), -m_value, k_value, b_value, m0_value, k0_value, input_as_3d_value) -{ - constexpr DataType dt = DataType::F32; - - bool status = validate_zero_padding(m_value, k_value, b_value, m0_value, k0_value, 2, false, false, input_as_3d_value, dt); - ARM_COMPUTE_EXPECT(status, framework::LogLevel::ERRORS); -} - FIXTURE_DATA_TEST_CASE(S32, CLGEMMReshapeLHSMatrixFixture, framework::DatasetMode::ALL, combine(combine(combine(combine(combine(combine(combine(datasets::SmallGEMMReshape2DShapes(), b_values), -- cgit v1.2.1