19 #include <arm_compute/function_info/MatMulInfo.h>
32 throw Exception(
"Support for adjoint not implemented.");
36 throw Exception(
"Only supported the MatMul in the last 2 dimensions");
39 arm_compute::TensorInfo aclInputInfoX = armcomputetensorutils::BuildArmComputeTensorInfo(inputInfoX);
40 arm_compute::TensorInfo aclInputInfoY = armcomputetensorutils::BuildArmComputeTensorInfo(inputInfoY);
41 const arm_compute::TensorInfo aclOutputInfo = armcomputetensorutils::BuildArmComputeTensorInfo(outputInfo);
44 aclInputInfoX.set_are_values_constant(
false);
45 aclInputInfoY.set_are_values_constant(
false);
48 activationDescriptor);
50 arm_compute::MatMulInfo matMulInfo;
54 return arm_compute::CLMatMul::validate(&aclInputInfoX, &aclInputInfoY, &aclOutputInfo, matMulInfo, activationInfo);
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;
95 arm_compute::GpuMatMulSettings settings;
97 m_MatMulLayer.configure(clCompileContext, &inputX, &inputY, &output, matMulInfo, settings, activationInfo);