| 36 | } |
| 37 | |
| 38 | size_t ConvolutionForwardImpl::AlgoMIOpen::get_workspace_in_bytes( |
| 39 | const SizeArgs& args) const { |
| 40 | auto got = sm_miopen_ws_cache.get(args); |
| 41 | if (got.first) |
| 42 | return got.second; |
| 43 | MIOpenForwardDescs D; |
| 44 | args.init_desc(D); |
| 45 | size_t workspace_size; |
| 46 | auto status = miopenConvolutionForwardGetWorkSpaceSize( |
| 47 | args.handle->miopen_handle(), D.filter_desc.desc, D.src_desc.desc, |
| 48 | D.conv_desc.desc, D.dst_desc.desc, &workspace_size); |
| 49 | megdnn_assert( |
| 50 | status == miopenStatusSuccess, |
| 51 | "conv fwd get workspace failed: %s; info: %s", miopenGetErrorString(status), |
| 52 | args.to_string().c_str()); |
| 53 | sm_miopen_ws_cache.set(args, workspace_size); |
| 54 | return workspace_size; |
| 55 | } |
| 56 | |
| 57 | miopenConvFwdAlgorithm_t ConvolutionForwardImpl::AlgoMIOpen::find_best_algo( |
| 58 | const ExecArgs& args) { |
nothing calls this directly
no test coverage detected