31 throw Exception(
"Support for adjoint not implemented.");
35 throw Exception(
"Only supported the MatMul in the last 2 dimensions");
38 arm_compute::TensorInfo aclInputInfoX = armcomputetensorutils::BuildArmComputeTensorInfo(inputInfoX);
39 arm_compute::TensorInfo aclInputInfoY = armcomputetensorutils::BuildArmComputeTensorInfo(inputInfoY);
40 const arm_compute::TensorInfo aclOutputInfo = armcomputetensorutils::BuildArmComputeTensorInfo(outputInfo);
43 aclInputInfoX.set_are_values_constant(
false);
44 aclInputInfoY.set_are_values_constant(
false);
47 activationDescriptor);
49 arm_compute::MatMulInfo matMulInfo;
52 matMulInfo.fused_activation(activationInfo);
54 return arm_compute::CLMatMul::validate(&aclInputInfoX, &aclInputInfoY, &aclOutputInfo, matMulInfo);
59 const arm_compute::CLCompileContext& clCompileContext)
70 throw Exception(
"Support for adjoint not implemented.");
75 throw Exception(
"Only supported the MatMul in the last 2 dimensions");
80 arm_compute::ICLTensor& inputX = PolymorphicDowncast<ClTensorHandle*>(
m_Data.
m_Inputs[0])->GetTensor();
81 arm_compute::ICLTensor& inputY = PolymorphicDowncast<ClTensorHandle*>(
m_Data.
m_Inputs[1])->GetTensor();
82 auto outputHandle = PolymorphicDowncast<ClTensorHandle*>(
m_Data.
m_Outputs[0]);
83 arm_compute::ICLTensor& output = outputHandle->GetTensor();
86 inputX.info()->set_are_values_constant(
false);
87 inputY.info()->set_are_values_constant(
false);
91 arm_compute::MatMulInfo matMulInfo;
94 matMulInfo.fused_activation(activationInfo);
96 m_MatMulLayer.configure(clCompileContext, &inputX, &inputY, &output, matMulInfo);