MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / find_best_algo

Method find_best_algo

dnn/src/rocm/convolution/backward_data/miopen.cpp:57–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57miopenConvBwdDataAlgorithm_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
78void ConvolutionBackwardDataImpl::AlgoMIOpen::exec(const ExecArgs& args) const {
79 MIOpenBwdDataDescs D;

Callers 2

execMethod · 0.45
execMethod · 0.45

Calls 6

miopen_handleMethod · 0.80
getMethod · 0.45
init_descMethod · 0.45
raw_ptrMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected