IVGCVSW-6260 ConstTensorsAsInput: Fully Connected Cl and Neon support.

  * IVGCVSW-6940 ConstTensorsAsInput: DepthwiseConvolution2d - Complete Neon and Cl Bug Fix
  * Bug fix to enable Cl and Neon Backend Compatibility ConstantTensorsAsInputs
  * Updated Cl and Neon FullyConnected workloads to handle constant
    weights and bias as inputs rather than reading from member variables.
  * Prevent non const weights and biases passing CL and NEON validate
    for Depthwise Convolution.

Signed-off-by: Cathal Corbett <cathal.corbett@arm.com>
Change-Id: I0f505ff5998a183152f843d0f6cc74327ba920e7
diff --git a/src/backends/cl/ClBackend.cpp b/src/backends/cl/ClBackend.cpp
index ed6f221..47990d8 100644
--- a/src/backends/cl/ClBackend.cpp
+++ b/src/backends/cl/ClBackend.cpp
@@ -398,18 +398,19 @@
                             else if (base.GetType() == LayerType::FullyConnected)
                             {
                                 FullyConnectedLayer* baseLayer = PolymorphicDowncast<FullyConnectedLayer*>(&base);
+                                FullyConnectedDescriptor descriptor = baseLayer->GetParameters();
 
+                                // As bias is optional only try to get TensorInfo from input if bias is enabled.
                                 Optional<TensorInfo> biases;
-
-                                if (baseLayer->GetParameters().m_BiasEnabled)
+                                if (descriptor.m_BiasEnabled)
                                 {
-                                    biases = baseLayer->m_Bias->GetTensorInfo();
+                                    biases = baseLayer->GetInputSlot(2).GetConnectedOutputSlot()->GetTensorInfo();
                                 }
 
                                 arm_compute::Status status = ClFullyConnectedWorkloadValidate(
                                         baseLayer->GetInputSlot(0).GetConnectedOutputSlot()->GetTensorInfo(),
                                         activationLayer->GetInputSlot(0).GetConnectedOutputSlot()->GetTensorInfo(),
-                                        baseLayer->m_Weight->GetTensorInfo(),
+                                        baseLayer->GetInputSlot(1).GetConnectedOutputSlot()->GetTensorInfo(),
                                         biases,
                                         baseLayer->GetParameters(),
                                         &activationDesc);