| 282 | } |
| 283 | |
| 284 | void ConvolutionImpl::exec_with_ncb_kern(const NCBKernParam& param, Algorithm* algo) { |
| 285 | auto&& kerns = NCB_ALGO_FUNC(dispatch_kern, algo, param); |
| 286 | auto&& fallback_handle = handle(); |
| 287 | for (auto&& kernel : kerns) { |
| 288 | megdnn_assert( |
| 289 | param.filter_meta.format == Param::Format::NCHW || |
| 290 | param.filter_meta.format == Param::Format::NHWC || |
| 291 | param.filter_meta.format == Param::Format::NCHW88 || |
| 292 | param.filter_meta.format == Param::Format::NCHW44 || |
| 293 | param.filter_meta.format == Param::Format::NCHW44_DOT, |
| 294 | "invalid conv format"); |
| 295 | auto run = [param, kernel](size_t index, size_t thread_id) { |
| 296 | CpuNDRange ndrange_id(kernel.global_size, index); |
| 297 | kernel.kern(param, {thread_id, ndrange_id}); |
| 298 | }; |
| 299 | static_cast<naive::HandleImpl*>(fallback_handle) |
| 300 | ->dispatch_kern(run, kernel.global_size.total_size()); |
| 301 | } |
| 302 | } |
| 303 | |
| 304 | ConvolutionImpl::Algorithm* ConvolutionImpl::get_algorithm_heuristic_with_ncb( |
| 305 | const NCBKernSizeParam& param, size_t workspace_limit_in_bytes, |
nothing calls this directly
no test coverage detected