aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/NEPermuteKernel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/NEON/kernels/NEPermuteKernel.cpp')
-rw-r--r--src/core/NEON/kernels/NEPermuteKernel.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/NEON/kernels/NEPermuteKernel.cpp b/src/core/NEON/kernels/NEPermuteKernel.cpp
index 87e5e7487a..ae1d48cc69 100644
--- a/src/core/NEON/kernels/NEPermuteKernel.cpp
+++ b/src/core/NEON/kernels/NEPermuteKernel.cpp
@@ -49,9 +49,8 @@ Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output, c
DataType::U16, DataType::S16, DataType::QS16,
DataType::U32, DataType::S32,
DataType::F16, DataType::F32);
- ARM_COMPUTE_RETURN_ERROR_ON_MSG(
- (perm.num_dimensions() != 3 && ((perm[0] != 2 && perm[1] != 0 && perm[2] != 1) || (perm[0] != 1 && perm[1] != 2 && perm[2] != 0))),
- "Only [2, 0, 1] and [1, 2, 0] permutation is supported");
+ ARM_COMPUTE_RETURN_ERROR_ON_MSG((perm.num_dimensions() == 3 && !(perm[0] == 2 && perm[1] == 0 && perm[2] == 1) && !(perm[0] == 1 && perm[1] == 2 && perm[2] == 0)),
+ "Only [2, 0, 1] and [1, 2, 0] permutation is supported");
const TensorShape output_shape = misc::shape_calculator::compute_permutation_output_shape(*input, perm);