From f0ff76dbfc9137d0dfc5e99666e24c7a2ca8b072 Mon Sep 17 00:00:00 2001 From: David Svantesson Date: Fri, 28 Apr 2023 16:34:52 +0000 Subject: Add Reorder to changelog Partially resolves ONCPUML-1232 Signed-off-by: David Svantesson Change-Id: I258d03524c50dd24975b473aede061f80bf9d91b Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9534 Reviewed-by: SiCong Li Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins Tested-by: Arm Jenkins --- Android.bp | 2 +- docs/user_guide/release_version_and_change_log.dox | 2 + filelist.json | 2 +- src/BUILD.bazel | 2 +- src/CMakeLists.txt | 2 +- src/runtime/NEON/functions/NEReorder.cpp | 53 ---------------------- src/runtime/NEON/functions/NEReorderLayer.cpp | 53 ++++++++++++++++++++++ 7 files changed, 59 insertions(+), 57 deletions(-) delete mode 100644 src/runtime/NEON/functions/NEReorder.cpp create mode 100644 src/runtime/NEON/functions/NEReorderLayer.cpp diff --git a/Android.bp b/Android.bp index 83b971bd0e..143e130f13 100644 --- a/Android.bp +++ b/Android.bp @@ -964,7 +964,7 @@ cc_library_static { "src/runtime/NEON/functions/NERange.cpp", "src/runtime/NEON/functions/NEReduceMean.cpp", "src/runtime/NEON/functions/NEReductionOperation.cpp", - "src/runtime/NEON/functions/NEReorder.cpp", + "src/runtime/NEON/functions/NEReorderLayer.cpp", "src/runtime/NEON/functions/NEReorgLayer.cpp", "src/runtime/NEON/functions/NEReshapeLayer.cpp", "src/runtime/NEON/functions/NEReverse.cpp", diff --git a/docs/user_guide/release_version_and_change_log.dox b/docs/user_guide/release_version_and_change_log.dox index ddbeffd6a1..f5d362b41d 100644 --- a/docs/user_guide/release_version_and_change_log.dox +++ b/docs/user_guide/release_version_and_change_log.dox @@ -43,6 +43,8 @@ If there is more than one release in a month then an extra sequential number is v23.05 Public major release - Deprecate dynamic block shape in @ref NEBatchToSpaceLayer - Deprecate dynamic block shape in @ref CLBatchToSpaceLayer + - New Arm® Neon™ kernels / functions : + - @ref NEReorderLayer v23.02.1 Public patch release - Allow mismatching data layouts between the source tensor and weights for \link cpu::CpuGemmDirectConv2d CpuGemmDirectConv2d \endlink with fixed format kernels. diff --git a/filelist.json b/filelist.json index 52e29ef9bb..efb0182fba 100644 --- a/filelist.json +++ b/filelist.json @@ -2080,7 +2080,7 @@ "Reorder": { "files": { "common": [ - "src/runtime/NEON/functions/NEReorder.cpp", + "src/runtime/NEON/functions/NEReorderLayer.cpp", "src/core/NEON/kernels/NEReorderKernel.cpp" ] } diff --git a/src/BUILD.bazel b/src/BUILD.bazel index 6e73f2eba6..44a1e83aa6 100644 --- a/src/BUILD.bazel +++ b/src/BUILD.bazel @@ -954,7 +954,7 @@ filegroup( "runtime/NEON/functions/NERange.cpp", "runtime/NEON/functions/NEReduceMean.cpp", "runtime/NEON/functions/NEReductionOperation.cpp", - "runtime/NEON/functions/NEReorder.cpp", + "runtime/NEON/functions/NEReorderLayer.cpp", "runtime/NEON/functions/NEReorgLayer.cpp", "runtime/NEON/functions/NEReshapeLayer.cpp", "runtime/NEON/functions/NEReverse.cpp", diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 35d1d9966e..cb48692a72 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -946,7 +946,7 @@ target_sources( runtime/NEON/functions/NERange.cpp runtime/NEON/functions/NEReduceMean.cpp runtime/NEON/functions/NEReductionOperation.cpp - runtime/NEON/functions/NEReorder.cpp + runtime/NEON/functions/NEReorderLayer.cpp runtime/NEON/functions/NEReorgLayer.cpp runtime/NEON/functions/NEReshapeLayer.cpp runtime/NEON/functions/NEReverse.cpp diff --git a/src/runtime/NEON/functions/NEReorder.cpp b/src/runtime/NEON/functions/NEReorder.cpp deleted file mode 100644 index f9bbeba90c..0000000000 --- a/src/runtime/NEON/functions/NEReorder.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2023 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/NEON/NEScheduler.h" -#include "arm_compute/runtime/NEON/functions/NEReorderLayer.h" - -namespace arm_compute -{ - -NEReorderLayer::NEReorderLayer() - : _reorder_kernel(std::make_unique()) -{ -} - -void NEReorderLayer::configure(const ITensor *input, ITensor *output, arm_compute::WeightFormat input_wf, arm_compute::WeightFormat output_wf) -{ - auto k = std::make_unique(); - k->configure(input, output, input_wf, output_wf); - _reorder_kernel = std::move(k); -} - -void NEReorderLayer::run() -{ - // Run Reorder - NEScheduler::get().schedule(_reorder_kernel.get(), Window::DimX); -} - -Status NEReorderLayer::validate(const ITensorInfo *input, const ITensorInfo *output, arm_compute::WeightFormat input_wf, arm_compute::WeightFormat output_wf) -{ - return NEReorderKernel::validate(input, output, input_wf, output_wf); -} - -} // namespace arm_compute \ No newline at end of file diff --git a/src/runtime/NEON/functions/NEReorderLayer.cpp b/src/runtime/NEON/functions/NEReorderLayer.cpp new file mode 100644 index 0000000000..f9bbeba90c --- /dev/null +++ b/src/runtime/NEON/functions/NEReorderLayer.cpp @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2023 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/NEON/NEScheduler.h" +#include "arm_compute/runtime/NEON/functions/NEReorderLayer.h" + +namespace arm_compute +{ + +NEReorderLayer::NEReorderLayer() + : _reorder_kernel(std::make_unique()) +{ +} + +void NEReorderLayer::configure(const ITensor *input, ITensor *output, arm_compute::WeightFormat input_wf, arm_compute::WeightFormat output_wf) +{ + auto k = std::make_unique(); + k->configure(input, output, input_wf, output_wf); + _reorder_kernel = std::move(k); +} + +void NEReorderLayer::run() +{ + // Run Reorder + NEScheduler::get().schedule(_reorder_kernel.get(), Window::DimX); +} + +Status NEReorderLayer::validate(const ITensorInfo *input, const ITensorInfo *output, arm_compute::WeightFormat input_wf, arm_compute::WeightFormat output_wf) +{ + return NEReorderKernel::validate(input, output, input_wf, output_wf); +} + +} // namespace arm_compute \ No newline at end of file -- cgit v1.2.1