| 158 | } |
| 159 | |
| 160 | size_t CpuSubKernel::get_mws(const CPUInfo &platform, size_t thread_count) const |
| 161 | { |
| 162 | ARM_COMPUTE_UNUSED(thread_count); |
| 163 | |
| 164 | #if defined(ENABLE_FP32_KERNELS) |
| 165 | if (this->_run_method == &sub_same_neon<float>) |
| 166 | { |
| 167 | size_t mws = ICPPKernel::default_mws; |
| 168 | if (platform.get_cpu_model() == CPUModel::N1) |
| 169 | { |
| 170 | mws = default_mws_N1_fp32_neon; |
| 171 | } |
| 172 | else if (platform.get_cpu_model() == CPUModel::V1) |
| 173 | { |
| 174 | mws = default_mws_V1_fp32_neon; |
| 175 | } |
| 176 | else |
| 177 | { |
| 178 | return ICPPKernel::default_mws; |
| 179 | } |
| 180 | |
| 181 | // tensor is 1D or was re-interpreted as 1D |
| 182 | if (this->window().shape().num_dimensions() == 1) |
| 183 | { |
| 184 | return mws; |
| 185 | } |
| 186 | else |
| 187 | { |
| 188 | // scale mws down by the number of elements along all the dimensions (x, z, w, etc) except the one |
| 189 | // that we parallelize along (the y dimension). This allows for parallelization when the Y_SIZE is small |
| 190 | // but the other sizes are large, which boosts performance. |
| 191 | mws = static_cast<size_t>(mws / (this->window().num_iterations_total() / this->window().num_iterations(1))); |
| 192 | return std::max(static_cast<size_t>(1), mws); |
| 193 | } |
| 194 | } |
| 195 | #else /* ENABLE_FP32_KERNELS */ |
| 196 | ARM_COMPUTE_UNUSED(platform); |
| 197 | #endif /* ENABLE_FP32_KERNELS */ |
| 198 | return ICPPKernel::default_mws; |
| 199 | } |
| 200 | |
| 201 | Status |
| 202 | CpuSubKernel::validate(const ITensorInfo *src0, const ITensorInfo *src1, const ITensorInfo *dst, ConvertPolicy policy) |
no test coverage detected