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

Method get_all_algorithms

dnn/src/fallback/matrix_mul/opr_impl.cpp:86–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86std::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
104std::vector<MatrixMul::Algorithm*> MatrixMulImpl::get_all_algorithms_safe(
105 const TensorLayout& A, const TensorLayout& B, const TensorLayout& C) {

Callers

nothing calls this directly

Calls 6

usableMethod · 0.45
algosetMethod · 0.45
push_backMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected