| 84 | } |
| 85 | |
| 86 | std::vector<MatrixMul::Algorithm*> MatrixMulImpl::get_all_algorithms( |
| 87 | const TensorLayout& A, const TensorLayout& B, const TensorLayout& C) { |
| 88 | std::vector<Algorithm*> gemm_algos, gemv_algos; |
| 89 | auto kern_size_param = make_kern_size_param(A, B, C); |
| 90 | for (auto&& algo : get_all_packed_algo()) { |
| 91 | if (algo->usable(kern_size_param)) { |
| 92 | if (algo->algoset() == AlgoBase::AlgoSet::ALGO_TYPE_GEMV) { |
| 93 | // simple gemv |
| 94 | gemv_algos.push_back(algo); |
| 95 | } else { |
| 96 | gemm_algos.push_back(algo); |
| 97 | } |
| 98 | } |
| 99 | } |
| 100 | gemv_algos.insert(gemv_algos.end(), gemm_algos.begin(), gemm_algos.end()); |
| 101 | return gemv_algos; |
| 102 | } |
| 103 | |
| 104 | std::vector<MatrixMul::Algorithm*> MatrixMulImpl::get_all_algorithms_safe( |
| 105 | const TensorLayout& A, const TensorLayout& B, const TensorLayout& C) { |