| 127 | } // namespace |
| 128 | |
| 129 | void CpuSubKernel::configure(const ITensorInfo *src0, const ITensorInfo *src1, ITensorInfo *dst, ConvertPolicy policy) |
| 130 | { |
| 131 | ARM_COMPUTE_TRACE_EVENT(ARM_COMPUTE_PROF_CAT_CPU, ARM_COMPUTE_PROF_LVL_CPU, "CpuSubKernel::configure"); |
| 132 | ARM_COMPUTE_ERROR_ON_NULLPTR(src0, src1, dst); |
| 133 | ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(*src0, *src1, *dst, policy)); |
| 134 | |
| 135 | const TensorShape &out_shape = TensorShape::broadcast_shape(src0->tensor_shape(), src1->tensor_shape()); |
| 136 | |
| 137 | // Auto initialize dst if not initialized |
| 138 | set_shape_if_empty(*dst, out_shape); |
| 139 | set_data_type_if_unknown(*dst, src0->data_type()); |
| 140 | |
| 141 | const auto can_use_fixedpoint = sub_q8_neon_fixedpoint_possible(src0, src1, dst); |
| 142 | const auto can_use_sme2_add_impl = false; |
| 143 | const auto uk = |
| 144 | CpuSubKernel::get_implementation<CpuSubKernelDataTypeISASelectorData>(CpuSubKernelDataTypeISASelectorData{ |
| 145 | src0->data_type(), CPUInfo::get().get_isa(), can_use_fixedpoint, can_use_sme2_add_impl}); |
| 146 | |
| 147 | ARM_COMPUTE_ERROR_ON_NULLPTR(uk); |
| 148 | |
| 149 | _policy = policy; |
| 150 | _run_method = uk->ukernel; |
| 151 | _name = std::string("CpuSubKernel").append("/").append(uk->name); |
| 152 | |
| 153 | // CpuSubKernel doesn't need padding so update_window_and_padding() can be skipped |
| 154 | Window win; |
| 155 | std::tie(win, _split_dimension) = calculate_squashed_or_max_window(*src0, *src1); |
| 156 | |
| 157 | ICpuKernel::configure(win); |
| 158 | } |
| 159 | |
| 160 | size_t CpuSubKernel::get_mws(const CPUInfo &platform, size_t thread_count) const |
| 161 | { |
nothing calls this directly
no test coverage detected