| 76 | } |
| 77 | |
| 78 | void ConvolutionBackwardDataImpl::AlgoMIOpen::exec(const ExecArgs& args) const { |
| 79 | MIOpenBwdDataDescs D; |
| 80 | args.init_desc(D); |
| 81 | auto algo = |
| 82 | const_cast<ConvolutionBackwardDataImpl::AlgoMIOpen*>(this)->find_best_algo( |
| 83 | args); |
| 84 | float alpha = 1.0f, beta = 0.0f; |
| 85 | auto status = miopenConvolutionBackwardData( |
| 86 | args.handle->miopen_handle(), &alpha, D.diff_desc.desc, |
| 87 | args.diff_tensor->raw_ptr(), D.filter_desc.desc, |
| 88 | args.filter_tensor->raw_ptr(), D.conv_desc.desc, algo, &beta, |
| 89 | D.grad_desc.desc, args.grad_tensor->raw_ptr(), args.workspace.raw_ptr, |
| 90 | args.workspace.size); |
| 91 | megdnn_assert( |
| 92 | status == miopenStatusSuccess, "conv bwd_data failed: %s; info: %s", |
| 93 | miopenGetErrorString(status), args.to_string().c_str()); |
| 94 | } |
| 95 | |
| 96 | void ConvolutionBackwardDataImpl::AlgoPack::fill_miopen_algos() {} |
| 97 |
nothing calls this directly
no test coverage detected