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

fix(mge/imperative): fix OutputCallback hang

GitOrigin-RevId: 49c10c79d6f600270c1e215e285e686b829221de
上级 0e82b959
......@@ -44,15 +44,8 @@ class Rendezvous {
public:
Rendezvous() = default;
Rendezvous(const Rendezvous& rhs) = delete;
Rendezvous(Rendezvous&& rhs) = default;
Rendezvous(Rendezvous&& rhs) = delete;
Rendezvous& operator=(const Rendezvous& rhs) = delete;
Rendezvous& operator=(Rendezvous&& rhs) {
MGB_LOCK_GUARD(m_lock);
m_drop_next = rhs.m_drop_next;
m_read_ahead = rhs.m_read_ahead;
m_promise = std::move(rhs.m_promise);
return *this;
}
R get() {
std::future<R> f;
......
......@@ -123,6 +123,7 @@ OutputCallback::OutputCallback(Param param, const VarNodeArray& inputs,
->add_flag(VarNode::Flag::ALLOW_EMPTY_SHAPE)
.add_flag(VarNode::Flag::NO_SYS_MEM_ALLOC)
.dtype(DType::from_enum(DTypeEnum::Byte));
add_equivalence_component<ScalarHash<void*>>(this);
}
SymbolVar OutputCallback::make(Param param, const SymbolVarArray& inputs) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册