提交 ff1de4cd 编写于 作者: J Juncheng 提交者: Li Xinqi

RegstDesc4RegstDescId (#1277)



Former-commit-id: b1987003
上级 93e0752c
......@@ -155,4 +155,10 @@ void RegstMgr::InitOFRecordBlobIfNeed(Blob* blob_ptr) {
}
}
const RtRegstDesc& RegstMgr::RegstDesc4RegstDescId(int64_t regst_desc_id) const {
const auto& it = regst_desc_id2rt_regst_desc_.find(regst_desc_id);
CHECK(it != regst_desc_id2rt_regst_desc_.end());
return *it->second;
}
} // namespace oneflow
......@@ -18,6 +18,7 @@ class RegstMgr final {
~RegstMgr() = default;
void NewRegsts(const RegstDescProto& regst_desc_proto, std::function<void(Regst*)> OneRegstDone);
const RtRegstDesc& RegstDesc4RegstDescId(int64_t regst_desc_id) const;
private:
friend class Global<RegstMgr>;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册