blob: 3efffafe259d91710f5b6709f7006c7ebbc642cc [file] [log] [blame]
telsoa01c577f2c2018-08-31 09:22:23 +01001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
3// See LICENSE file in the project root for full license information.
4//
5
6#include "NeonSoftmaxBaseWorkload.hpp"
7
8#include "backends/ArmComputeTensorUtils.hpp"
9
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