17 using namespace armcomputetensorutils;
26 const arm_compute::TensorInfo aclInput = BuildArmComputeTensorInfo(input);
27 const arm_compute::TensorInfo aclOutput = BuildArmComputeTensorInfo(output);
28 arm_compute::TensorInfo aclWeights = BuildArmComputeTensorInfo(weights);
29 aclWeights.set_are_values_constant(weights.
IsConstant());
31 arm_compute::TensorInfo aclBiases;
32 arm_compute::TensorInfo* optionalAclBiases =
nullptr;
37 "ClFullyConnectedWorkload: Bias was enabled in the descriptor but no value was supplied.");
38 aclBiases = BuildArmComputeTensorInfo(biases.
value());
39 aclBiases.set_are_values_constant(biases.
value().IsConstant());
40 optionalAclBiases = &aclBiases;
43 const arm_compute::FullyConnectedLayerInfo fullyConnectedLayerInfo =
46 return arm_compute::CLFullyConnectedLayer::validate(&aclInput,
50 fullyConnectedLayerInfo);
56 std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager,
57 const arm_compute::CLCompileContext& clCompileContext)
62 arm_compute::ICLTensor& input = PolymorphicDowncast<IClTensorHandle*>(
m_Data.
m_Inputs[0])->GetTensor();
63 arm_compute::ICLTensor& output = PolymorphicDowncast<IClTensorHandle*>(
m_Data.
m_Outputs[0])->GetTensor();
64 arm_compute::ICLTensor& weights = PolymorphicDowncast<IClTensorHandle*>(
m_Data.
m_Inputs[1])->GetTensor();
66 weights.info()->set_are_values_constant(
info.m_InputTensorInfos[1].IsConstant());
68 arm_compute::ICLTensor* bias =
nullptr;
71 bias = &PolymorphicDowncast<IClTensorHandle*>(
m_Data.
m_Inputs[2])->GetTensor();
72 bias->info()->set_are_values_constant(
info.m_InputTensorInfos[2].IsConstant());
77 arm_compute::FullyConnectedLayerInfo fc_info =
83 m_FullyConnectedLayer.configure(clCompileContext,