============== LocalShareBackwardDataImpl ============== */
| 70 | |
| 71 | /* ============== LocalShareBackwardDataImpl ============== */ |
| 72 | LocalShareBackwardDataImpl::Algorithm* LocalShareBackwardDataImpl:: |
| 73 | get_algorithm_heuristic( |
| 74 | const TensorLayout& filter, const TensorLayout& diff, |
| 75 | const TensorLayout& grad, size_t workspace_limit_in_bytes, |
| 76 | const AlgoAttribute& positive_attr, |
| 77 | const AlgoAttribute& negative_attr) { |
| 78 | AlgoBase::SizeArgs args(this, filter, diff, grad); |
| 79 | if (sm_algo_pack.implicit_gemm.is_available_attribute( |
| 80 | args, positive_attr, negative_attr, workspace_limit_in_bytes)) { |
| 81 | return &sm_algo_pack.implicit_gemm; |
| 82 | } |
| 83 | if (sm_algo_pack.batched_matmul.is_available_attribute( |
| 84 | args, positive_attr, negative_attr, workspace_limit_in_bytes)) { |
| 85 | return &sm_algo_pack.batched_matmul; |
| 86 | } |
| 87 | megdnn_throw(ssprintf( |
| 88 | "no local share bwd data algorithm without attribute(%s) " |
| 89 | "with attribute(%s) args(%s) and " |
| 90 | "workspace limit (%zu bytes)", |
| 91 | Algorithm::attribute_str(negative_attr).c_str(), |
| 92 | Algorithm::attribute_str(positive_attr).c_str(), args.to_string().c_str(), |
| 93 | workspace_limit_in_bytes)); |
| 94 | } |
| 95 | |
| 96 | std::vector<LocalShareBackwardDataImpl::Algorithm*> LocalShareBackwardDataImpl:: |
| 97 | get_all_algorithms( |
nothing calls this directly
no test coverage detected