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

Fix all reduce mem sharing (#1986)

* fix all reduce mem sharing

* ByteSizeOfDataContentField=>ByteSizeOfBlobBody
上级 2e8f7ac6
......@@ -7,7 +7,7 @@
namespace oneflow {
int64_t InferRegstSize(const RegstDesc& regst) {
return RtBlobDesc(*(regst.GetBlobDesc(GenPackedLbi()))).ByteSizeOfDataContentField();
return RtBlobDesc(*(regst.GetBlobDesc(GenPackedLbi()))).ByteSizeOfBlobBody();
}
TaskNode* ReduceCompTaskNodeIf::FindPredReduceTaskNodeIf(std::function<bool(TaskNode*)> predicate) {
......
......@@ -372,7 +372,7 @@ void TaskGraph::AddReduceNoBwForwardNodeOverlapingCtrlEdges() {
void TaskGraph::EnableMemSharingInReduceStruct() {
auto GetSuccReduceTaskNode = [](TaskNode* pred) {
std::vector<TaskNode*> nodes;
pred->ForEachNodeOnOutEdge([&](TaskNode* succ) {
pred->ForEachNodeOnOutDataEdge([&](TaskNode* succ) {
if (dynamic_cast<ReduceCompTaskNodeIf*>(succ) != nullptr) { nodes.push_back(succ); }
});
return nodes;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册