15 #include <arm_compute/function_info/MatMulInfo.h>
23 const bool isFastMathEnabled,
28 throw Exception(
"Support for adjoint not implemented.");
32 throw Exception(
"Only supported the MatMul in the last 2 dimensions");
35 arm_compute::TensorInfo aclInputInfoX = armcomputetensorutils::BuildArmComputeTensorInfo(inputInfoX);
36 arm_compute::TensorInfo aclInputInfoY = armcomputetensorutils::BuildArmComputeTensorInfo(inputInfoY);
37 arm_compute::TensorInfo aclOutputInfo = armcomputetensorutils::BuildArmComputeTensorInfo(outputInfo);
40 aclInputInfoX.set_are_values_constant(
false);
41 aclInputInfoY.set_are_values_constant(
false);
44 activationDescriptor);
46 arm_compute::MatMulInfo matMulInfo;
50 arm_compute::CpuMatMulSettings settings;
51 settings.fast_math(isFastMathEnabled);
53 return arm_compute::NEMatMul::validate(&aclInputInfoX, &aclInputInfoY, &aclOutputInfo, matMulInfo, settings,
59 const bool isFastMathEnabled)
64 throw Exception(
"Support for adjoint not implemented.");
69 throw Exception(
"Only supported the MatMul in the last 2 dimensions");
74 arm_compute::ITensor& inputX = PolymorphicDowncast<IAclTensorHandle*>(
m_Data.
m_Inputs[0])->GetTensor();
75 arm_compute::ITensor& inputY = PolymorphicDowncast<IAclTensorHandle*>(
m_Data.
m_Inputs[1])->GetTensor();
76 arm_compute::ITensor& output = PolymorphicDowncast<IAclTensorHandle*>(
m_Data.
m_Outputs[0])->GetTensor();
79 inputX.info()->set_are_values_constant(
false);
80 inputY.info()->set_are_values_constant(
false);
84 arm_compute::MatMulInfo matMulInfo;
88 arm_compute::CpuMatMulSettings settings;
89 settings.fast_math(isFastMathEnabled);
91 m_MatMulLayer.configure(&inputX, &inputY, &output, matMulInfo, settings, activationInfo);