提交 ef9aa800 编写于 作者: M Megvii Engine Team

fix(mgb/dnn): fix cuda naive matmul algo

GitOrigin-RevId: 79c9bba73b46274d4db59ed5b57c1ba0b1dacf45
上级 fe99cdc7
...@@ -29,7 +29,6 @@ MatrixMulForwardImpl::AlgoPack::AlgoPack() { ...@@ -29,7 +29,6 @@ MatrixMulForwardImpl::AlgoPack::AlgoPack() {
#if CUDA_VERSION >= 10010 #if CUDA_VERSION >= 10010
all_algos.push_back(&cublas_lt); all_algos.push_back(&cublas_lt);
#endif #endif
all_algos.push_back(&naive);
#if !MEGDNN_DISABLE_FLOAT16 #if !MEGDNN_DISABLE_FLOAT16
all_algos.push_back(&bfloat16); all_algos.push_back(&bfloat16);
#endif #endif
...@@ -45,6 +44,7 @@ MatrixMulForwardImpl::AlgoPack::AlgoPack() { ...@@ -45,6 +44,7 @@ MatrixMulForwardImpl::AlgoPack::AlgoPack() {
all_algos.push_back(&algo); all_algos.push_back(&algo);
} }
#endif #endif
all_algos.push_back(&naive);
for (auto&& algo : all_algos) { for (auto&& algo : all_algos) {
m_all_algos_map.emplace(algo->info().desc, algo); m_all_algos_map.emplace(algo->info().desc, algo);
......
...@@ -157,7 +157,7 @@ public: ...@@ -157,7 +157,7 @@ public:
void exec(const ExecArgs& args) const override; void exec(const ExecArgs& args) const override;
MEGDNN_DECL_ALGO_TYPE(CUDA_NAIVE) MEGDNN_DECL_ALGO_TYPE(CUDA_NAIVE)
AlgoAttribute attribute() const override { AlgoAttribute attribute() const override {
return AlgoAttribute::REPRODUCIBLE; return AlgoAttribute::REPRODUCIBLE | AlgoAttribute::NAIVE;
} }
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册