blob: b97cf84afd41534a32c71974718599f43cf8a127 [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>
telsoa01c577f2c2018-08-31 09:22:23 +01009
10namespace armnn
11{
12
13arm_compute::Status NeonSoftmaxWorkloadValidate(const TensorInfo& input,
14 const TensorInfo& output,
15 const SoftmaxDescriptor& descriptor)
16{
17 // NOTE: We report 4D Softmax as unsupported until full support is added to ACL
18 if(input.GetShape().GetNumDimensions() >= 4u)
19 {
20 return arm_compute::Status(arm_compute::ErrorCode::RUNTIME_ERROR, "4d softmax is not supported");
21 }
22
23 const arm_compute::TensorInfo aclInputInfo = armcomputetensorutils::BuildArmComputeTensorInfo(input);
24 const arm_compute::TensorInfo aclOutputInfo = armcomputetensorutils::BuildArmComputeTensorInfo(output);
25
26 return arm_compute::NESoftmaxLayer::validate(&aclInputInfo, &aclOutputInfo, descriptor.m_Beta);
27}
28
29} //namespace armnn
30