| 93 | #define NCB_ALGO_FUNC(name, algo, param) static_cast<AlgoBase*>(algo)->name(param) |
| 94 | |
| 95 | void ConvolutionImpl::exec( |
| 96 | _megdnn_tensor_in src, _megdnn_tensor_in filter, _megdnn_tensor_out dst, |
| 97 | const PreprocessedFilter* preprocessed_filter, _megdnn_workspace workspace) { |
| 98 | auto fparam = make_ncb_kern_param(src, filter, dst, preprocessed_filter, workspace); |
| 99 | auto&& algo = get_algorithm(fparam, workspace.size); |
| 100 | if (!is_naive_algo(algo) && |
| 101 | NCB_ALGO_FUNC(get_workspace, algo, fparam) <= workspace.size) { |
| 102 | exec_with_ncb_kern(fparam, algo); |
| 103 | } else { |
| 104 | naive::ConvolutionForwardImpl::exec( |
| 105 | src, filter, dst, preprocessed_filter, workspace); |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | void ConvolutionImpl::exec_preprocess( |
| 110 | const TensorLayout& src_layout, _megdnn_tensor_in filter, |
no test coverage detected