============== LocalShareForwardImpl ============== */
| 10 | |
| 11 | /* ============== LocalShareForwardImpl ============== */ |
| 12 | LocalShareForwardImpl::Algorithm* LocalShareForwardImpl::get_algorithm_heuristic( |
| 13 | const TensorLayout& src, const TensorLayout& filter, const TensorLayout& dst, |
| 14 | size_t workspace_limit_in_bytes, const AlgoAttribute& positive_attr, |
| 15 | const AlgoAttribute& negative_attr) { |
| 16 | AlgoBase::SizeArgs args(this, src, filter, dst); |
| 17 | if (sm_algo_pack.batch_size_aware_chwn_small_image.is_available_attribute( |
| 18 | args, positive_attr, negative_attr, workspace_limit_in_bytes)) { |
| 19 | return &sm_algo_pack.batch_size_aware_chwn_small_image; |
| 20 | } |
| 21 | if (sm_algo_pack.batch_size_aware_chwn.is_available_attribute( |
| 22 | args, positive_attr, negative_attr, workspace_limit_in_bytes)) { |
| 23 | return &sm_algo_pack.batch_size_aware_chwn; |
| 24 | } |
| 25 | if (sm_algo_pack.batched_matmul.is_available_attribute( |
| 26 | args, positive_attr, negative_attr, workspace_limit_in_bytes)) { |
| 27 | return &sm_algo_pack.batched_matmul; |
| 28 | } |
| 29 | megdnn_throw(ssprintf( |
| 30 | "no local share conv algorithm without attribute(%s) with " |
| 31 | "attribute(%s), args(%s) and " |
| 32 | "workspace limit (%zu bytes)", |
| 33 | Algorithm::attribute_str(negative_attr).c_str(), |
| 34 | Algorithm::attribute_str(positive_attr).c_str(), args.to_string().c_str(), |
| 35 | workspace_limit_in_bytes)); |
| 36 | } |
| 37 | std::vector<LocalShareForwardImpl::Algorithm*> LocalShareForwardImpl:: |
| 38 | get_all_algorithms( |
| 39 | const TensorLayout& src, const TensorLayout& filter, |
nothing calls this directly
no test coverage detected