diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2019-09-18 15:02:53 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-10-01 17:12:03 +0000 |
commit | 79f88e6d825402388bb79fc123ee2dfe01985bda (patch) | |
tree | dd598725afffccca79c91fd4a3e484561dfa891a /src/runtime | |
parent | 20c2b501f206e4db1c15c2334f9e8a1baf640a50 (diff) | |
download | ComputeLibrary-79f88e6d825402388bb79fc123ee2dfe01985bda.tar.gz |
COMPMID-2313: Implement CL INSTANCE_NORMALIZATION function
Change-Id: If11799bef1bbb973d4287ffc1c6eb4c2a28bbf5f
Signed-off-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1989
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Diffstat (limited to 'src/runtime')
-rw-r--r-- | src/runtime/CL/functions/CLInstanceNormalizationLayer.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/runtime/CL/functions/CLInstanceNormalizationLayer.cpp b/src/runtime/CL/functions/CLInstanceNormalizationLayer.cpp new file mode 100644 index 0000000000..2b0987fa2f --- /dev/null +++ b/src/runtime/CL/functions/CLInstanceNormalizationLayer.cpp @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2019 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. + */ +#include "arm_compute/runtime/CL/functions/CLInstanceNormalizationLayer.h" + +#include "arm_compute/core/CL/kernels/CLInstanceNormalizationLayerKernel.h" +#include "arm_compute/core/Types.h" + +namespace arm_compute +{ +CLInstanceNormalizationLayer::CLInstanceNormalizationLayer() +{ +} + +void CLInstanceNormalizationLayer::configure(ICLTensor *input, ICLTensor *output, float gamma, float beta, float epsilon) +{ + auto k = arm_compute::support::cpp14::make_unique<CLInstanceNormalizationLayerKernel>(); + k->configure(input, output, gamma, beta, epsilon); + _kernel = std::move(k); +} + +Status CLInstanceNormalizationLayer::validate(const ITensorInfo *input, const ITensorInfo *output, float gamma, float beta, float epsilon) +{ + return CLInstanceNormalizationLayerKernel::validate(input, output, gamma, beta, epsilon); +} +} // namespace arm_compute
\ No newline at end of file |