| 55 | } |
| 56 | |
| 57 | miopenConvBwdDataAlgorithm_t ConvolutionBackwardDataImpl::AlgoMIOpen::find_best_algo( |
| 58 | const ExecArgs& args) { |
| 59 | auto find_algo = sm_miopen_algo_cache.get(args); |
| 60 | if (find_algo.first) |
| 61 | return find_algo.second; |
| 62 | bool exhaustive_search = args.handle->enable_miopen_algo_search(); |
| 63 | MIOpenBwdDataDescs D; |
| 64 | args.init_desc(D); |
| 65 | const int req_algo_count = 1; |
| 66 | int ret_algo_count; |
| 67 | miopenConvAlgoPerf_t algo_perf; |
| 68 | miopen_check(miopenFindConvolutionBackwardDataAlgorithm( |
| 69 | args.handle->miopen_handle(), D.diff_desc.desc, args.diff_tensor->raw_ptr(), |
| 70 | D.filter_desc.desc, args.filter_tensor->raw_ptr(), D.conv_desc.desc, |
| 71 | D.grad_desc.desc, args.grad_tensor->raw_ptr(), req_algo_count, |
| 72 | &ret_algo_count, &algo_perf, args.workspace.raw_ptr, args.workspace.size, |
| 73 | exhaustive_search)); |
| 74 | sm_miopen_algo_cache.set(args, algo_perf.bwd_data_algo); |
| 75 | return algo_perf.bwd_data_algo; |
| 76 | } |
| 77 | |
| 78 | void ConvolutionBackwardDataImpl::AlgoMIOpen::exec(const ExecArgs& args) const { |
| 79 | MIOpenBwdDataDescs D; |
no test coverage detected