diff options
author | Gunes Bayir <gunes.bayir@arm.com> | 2021-09-13 13:38:29 +0100 |
---|---|---|
committer | Gunes Bayir <gunes.bayir@arm.com> | 2021-09-15 19:13:17 +0000 |
commit | cc171f9e4520e16b5e1b9c483562ed022d9151fa (patch) | |
tree | f364fb4dd1d8f775c21066ae53f61185257766cc /src/graph/mutators/MutatorUtils.h | |
parent | 9d6ddfc8a0ea579fb2a46fab971f6827d93fc96b (diff) | |
download | ComputeLibrary-cc171f9e4520e16b5e1b9c483562ed022d9151fa.tar.gz |
Provide tests for fusing pad layer in graph API
There are two tests:
- A unit test that checks if certain padding configurations are to be
fused or not
- A fixture test that compares a reference implementation of pad+conv
vs target implementation using the same fusing logic as graph API
Tests are written for CL backend only to prevent code duplication.
The code written in the graph API remains untested.
Resolves: COMPMID-4702
Change-Id: Ie84d1cb910013033b46ac9d66cf5fc556d4963d2
Signed-off-by: Gunes Bayir <gunes.bayir@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6252
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Sheri Zhang <sheri.zhang@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/graph/mutators/MutatorUtils.h')
-rw-r--r-- | src/graph/mutators/MutatorUtils.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/graph/mutators/MutatorUtils.h b/src/graph/mutators/MutatorUtils.h new file mode 100644 index 0000000000..170d892c93 --- /dev/null +++ b/src/graph/mutators/MutatorUtils.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2021 Arm Limited. + * + * SPDX-License-Identifier: MIT + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +#ifndef ARM_COMPUTE_GRAPH_MUTATOR_UTILS_H +#define ARM_COMPUTE_GRAPH_MUTATOR_UTILS_H + +#include "arm_compute/graph/Utils.h" + +namespace arm_compute +{ +namespace graph +{ +/** Check if padding is in height and/or width dimensions + * + * @param[in] layout Data layout of the tensor + * @param[in] padding_list List of padding pairs + */ +bool is_padding_in_height_or_width(const DataLayout &layout, const PaddingList &padding_list); +} // namespace graph +} // namespace arm_compute + +#endif /* ARM_COMPUTE_GRAPH_MUTATOR_UTILS_H */
\ No newline at end of file |