diff options
author | Renato Arantes <renato.arantes@arm.com> | 2024-01-26 17:31:18 +0000 |
---|---|---|
committer | Renato Barros Arantes <renato.arantes@arm.com> | 2024-03-21 11:15:30 +0000 |
commit | 36a75dafdbe6d6a3a6f50bd075fe01f5b7dace38 (patch) | |
tree | 0701d615ef30444b9d0789db691b59b81fd9e86e /tests/validation/reference/Permute.cpp | |
parent | d2191150736dde66d79eb97e0c8ee506eef3c8fc (diff) | |
download | ComputeLibrary-36a75dafdbe6d6a3a6f50bd075fe01f5b7dace38.tar.gz |
[ONCPUML-1451] Add matmul kernel to enable bf16 to bf16 operations via PyTorch® autocast() function
The full range of tests must be added with [MLINFSW-482] epic due to the lack of reordering kernels implemented in Acl.
Co-Authored-By: David Mansell <David.Mansell@arm.com>
Change-Id: I820d316295a1ec94fdc89c37e4144a268f914c36
Signed-off-by: Renato Arantes <renato.arantes@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/11169
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/reference/Permute.cpp')
-rw-r--r-- | tests/validation/reference/Permute.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/validation/reference/Permute.cpp b/tests/validation/reference/Permute.cpp index 6f122b1bf5..7aa3011d8f 100644 --- a/tests/validation/reference/Permute.cpp +++ b/tests/validation/reference/Permute.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 Arm Limited. + * Copyright (c) 2017-2019,2024 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -24,6 +24,7 @@ #include "Permute.h" #include "arm_compute/core/Types.h" + #include "tests/validation/Helpers.h" namespace arm_compute @@ -42,11 +43,11 @@ SimpleTensor<T> permute(const SimpleTensor<T> &src, PermutationVector perm) permute(dst_shape, perm); // Create reference - SimpleTensor<T> dst{ dst_shape, src.data_type(), src.num_channels(), src.quantization_info() }; + SimpleTensor<T> dst{dst_shape, src.data_type(), src.num_channels(), src.quantization_info()}; // Compute reference const uint32_t num_elements = src.num_elements(); - for(uint32_t i = 0; i < num_elements; ++i) + for (uint32_t i = 0; i < num_elements; ++i) { const Coordinates src_coords = index2coord(src.shape(), i); Coordinates dst_coords = src_coords; @@ -58,13 +59,14 @@ SimpleTensor<T> permute(const SimpleTensor<T> &src, PermutationVector perm) return dst; } -template SimpleTensor<int8_t> permute(const SimpleTensor<int8_t> &src, PermutationVector perm); -template SimpleTensor<uint8_t> permute(const SimpleTensor<uint8_t> &src, PermutationVector perm); -template SimpleTensor<int16_t> permute(const SimpleTensor<int16_t> &src, PermutationVector perm); +template SimpleTensor<int8_t> permute(const SimpleTensor<int8_t> &src, PermutationVector perm); +template SimpleTensor<uint8_t> permute(const SimpleTensor<uint8_t> &src, PermutationVector perm); +template SimpleTensor<int16_t> permute(const SimpleTensor<int16_t> &src, PermutationVector perm); template SimpleTensor<uint16_t> permute(const SimpleTensor<uint16_t> &src, PermutationVector perm); template SimpleTensor<uint32_t> permute(const SimpleTensor<uint32_t> &src, PermutationVector perm); -template SimpleTensor<float> permute(const SimpleTensor<float> &src, PermutationVector perm); -template SimpleTensor<half> permute(const SimpleTensor<half> &src, PermutationVector perm); +template SimpleTensor<float> permute(const SimpleTensor<float> &src, PermutationVector perm); +template SimpleTensor<half> permute(const SimpleTensor<half> &src, PermutationVector perm); +template SimpleTensor<bfloat16> permute(const SimpleTensor<bfloat16> &src, PermutationVector perm); } // namespace reference } // namespace validation } // namespace test |