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

fix(opr): fix fast-run error in cuda

GitOrigin-RevId: 28dd187df99229d430e4b94861fd0da1fecd67f3
上级 ba2ad46e
......@@ -93,7 +93,7 @@ template <std::size_t I = 0, typename Opr, typename... Tp>
I<sizeof...(Tp), void>::type set_sub_execution_policy(
const Opr* opr, std::tuple<Tp...>& t) {
std::get<I>(t)->execution_policy() = opr->execution_policy().sub_policy[I];
set_sub_execution_policy<I + 1, Tp...>(opr, t);
set_sub_execution_policy<I + 1, Opr, Tp...>(opr, t);
}
template <typename Opr, typename... SubOpr>
......@@ -103,7 +103,7 @@ void set_execution_policy(const Opr* opr, SubOpr... sub_oprs) {
megdnn_assert(opr->execution_policy().sub_policy.size() ==
sizeof...(sub_oprs));
auto&& sub = std::make_tuple(sub_oprs...);
set_sub_execution_policy<sizeof...(sub_oprs), Opr, SubOpr...>(opr, sub);
set_sub_execution_policy<0, Opr, SubOpr...>(opr, sub);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册