blob: 41ebfb9fd36af64782d83e0c4b88a3b360dadae4 [file] [log] [blame]
telsoa01c577f2c2018-08-31 09:22:23 +01001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
David Beckecb56cd2018-09-05 12:52:57 +01003// SPDX-License-Identifier: MIT
telsoa01c577f2c2018-08-31 09:22:23 +01004//
5
6#include "NeonSoftmaxBaseWorkload.hpp"
7
Aron Virginas-Tarc9cc8042018-11-01 16:15:57 +00008#include <aclCommon/ArmComputeTensorUtils.hpp>
Francis Murtagh3b938352019-07-26 15:44:17 +01009#include <aclCommon/ArmComputeUtils.hpp>
telsoa01c577f2c2018-08-31 09:22:23 +010010
Matthew Benthamd80a7122019-01-08 17:52:37 +000011#include <arm_compute/runtime/NEON/functions/NESoftmaxLayer.h>
12
telsoa01c577f2c2018-08-31 09:22:23 +010013namespace armnn
14{
15
16arm_compute::Status NeonSoftmaxWorkloadValidate(const TensorInfo& input,
17 const TensorInfo& output,
18 const SoftmaxDescriptor& descriptor)
19{
telsoa01c577f2c2018-08-31 09:22:23 +010020 const arm_compute::TensorInfo aclInputInfo = armcomputetensorutils::BuildArmComputeTensorInfo(input);
21 const arm_compute::TensorInfo aclOutputInfo = armcomputetensorutils::BuildArmComputeTensorInfo(output);
22
Colm Donelanc3c5fc22019-08-15 16:03:17 +010023 unsigned int aclAxis = ComputeSoftmaxAclAxis(descriptor, input);
Francis Murtagh3b938352019-07-26 15:44:17 +010024 return arm_compute::NESoftmaxLayer::validate(&aclInputInfo, &aclOutputInfo, descriptor.m_Beta, aclAxis);
telsoa01c577f2c2018-08-31 09:22:23 +010025}
26
27} //namespace armnn
28