MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / configure

Method configure

src/cpu/kernels/CpuAddMulAddKernel.cpp:135–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133} // namespace
134
135void CpuAddMulAddKernel::configure(const ITensorInfo *input1,
136 const ITensorInfo *input2,
137 const ITensorInfo *bn_mul,
138 const ITensorInfo *bn_add,
139 ITensorInfo *add_output,
140 ITensorInfo *final_output,
141 ConvertPolicy policy,
142 const ActivationLayerInfo &act_info)
143{
144 ARM_COMPUTE_TRACE_EVENT(ARM_COMPUTE_PROF_CAT_CPU, ARM_COMPUTE_PROF_LVL_CPU, "CpuAddMulAddKernel::configure");
145 ARM_COMPUTE_UNUSED(bn_mul, bn_add, input2);
146 ARM_COMPUTE_ERROR_ON_NULLPTR(input1, input2, bn_add, bn_mul, final_output);
147 ARM_COMPUTE_ERROR_THROW_ON(
148 validate_arguments(input1, input2, bn_mul, bn_add, add_output, final_output, policy, act_info));
149
150 const auto uk = CpuAddMulAddKernel::get_implementation<DataTypeISASelectorData>(
151 DataTypeISASelectorData{input1->data_type(), CPUInfo::get().get_isa()});
152 ARM_COMPUTE_ERROR_ON_NULLPTR(uk);
153 ARM_COMPUTE_ERROR_ON(uk->ukernel == nullptr);
154
155 _policy = policy;
156 _act_info = act_info;
157 _run_method = uk->ukernel;
158 _name = std::string("CpuAddMulAddKernel/").append(uk->name);
159
160 // Auto initialize outputs if not initialized
161 set_shape_if_empty(*final_output, input1->tensor_shape());
162 set_data_type_if_unknown(*final_output, input1->data_type());
163
164 if (add_output != nullptr)
165 {
166 set_shape_if_empty(*add_output, input1->tensor_shape());
167 set_data_type_if_unknown(*add_output, input1->data_type());
168 }
169
170 // Configure kernel window
171 Window win;
172 win = calculate_max_window(*final_output, Steps());
173 ICpuKernel::configure(win);
174}
175
176Status CpuAddMulAddKernel::validate(const ITensorInfo *input1,
177 const ITensorInfo *input2,

Callers

nothing calls this directly

Calls 8

set_shape_if_emptyFunction · 0.85
set_data_type_if_unknownFunction · 0.85
StepsClass · 0.85
get_isaMethod · 0.80
appendMethod · 0.80
validate_argumentsFunction · 0.70
calculate_max_windowFunction · 0.50
data_typeMethod · 0.45

Tested by

no test coverage detected