-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
Hey @barry-jin , Thanks for submitting the PR
CI supported jobs: [centos-cpu, unix-cpu, unix-gpu, windows-cpu, edge, windows-gpu, centos-gpu, sanity, miscellaneous, website, clang] Note: |
src/imperative/cached_op.cc
Outdated
state.array_reqs[eid] = reqs[iter->second]; | ||
// if ref count is not 0, then we should not assign req user provide | ||
if (reqs[iter->second] == kNullOp && !(ref_count[eid] == 0)) { | ||
state.array_reqs[eid] = kWriteTo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A question, since I do not really know - do we need to put kWriteTo
here? I think it should be handled by the memory pass later on, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we need to put kWriteTo
here. Because memory plan already happens in SetBackwardGraph before this. Here we get the updated ref_count from the graph and modify the req_types based on the ref_count.
@mxnet-bot run ci [centos-gpu, unix-gpu] |
Jenkins CI successfully triggered : [centos-gpu, unix-gpu] |
Is this ready to merge? |
@barry-jin please add a test and resolve conflict so that we can merge the change. |
@mxnet-bot run ci [all] |
Jenkins CI successfully triggered : [website, edge, miscellaneous, windows-cpu, unix-cpu, sanity, centos-cpu, clang, centos-gpu, unix-gpu, windows-gpu] |
@mxnet-bot run ci [centos-cpu, centos-gpu, unix-cpu, unix-gpu] |
Jenkins CI successfully triggered : [unix-cpu, centos-gpu, centos-cpu, unix-gpu] |
@mxnet-bot run ci [unix-cpu] |
Jenkins CI successfully triggered : [unix-cpu] |
Can this be merged now? |
@barry-jin thanks for the fix! |
Description
Fix #20293
state.array_req is already set before allocating the memory.
https://github.com/apache/incubator-mxnet/blob/3480ba2c6df02bb907d3a975d354efa8697c4e71/src/imperative/cached_op.cc#L423-L434
Checklist
Essentials
Comments