-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Optimize cached op static memory allocation #11658
Conversation
what API doc? |
@@ -513,6 +515,7 @@ class NDArray { | |||
// We can't reuse memory in a view. | |||
CHECK(!IsView()); | |||
NDArray ret = *this; | |||
ret.byte_offset_ = byte_offset_ + byte_offset; |
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.
this might be problematic. The way of testing if an array is a view uses both reuse_
and byte_offset_
. /~https://github.com/apache/incubator-mxnet/blob/master/include/mxnet/ndarray.h#L147
if reuse_
is true, the array can't be a view. I wonder if setting byte_offset_
to non-zero can cause problems.
I think you should test on models with static memory alloc when mkldnn is enabled. |
@piiswrong looks like this is ready for merge? |
@piiswrong bounce again |
@haojin2 @apeforest for review |
@haojin2 is this good to merge? |
@piiswrong @eric-haibin-lin Is this PR ready to be merged? |
@piiswrong @eric-haibin-lin ping! |
@eric-haibin-lin @piiswrong could you please take a look? @mxnet-label-bot add [pr-awaiting-merge] |
@mxnet-label-bot update [backend, pr-awaiting-merge] |
@ZhennanQin to aware the changes since we are WIP for Cached OP too. |
@piiswrong When you have a second I believe this may need a rebase. Has some refs to a non-existing TVM commit, 290226e1c9a. |
@pengzhao-intel I just reviewed this. It has nothing changed with cpu backend, but an optimization for GPU memory pool. So I think it's OK. |
@mxnet-label-bot update [pr-awaiting-response] |
@piiswrong ping to rebase and trigger ci, thanks! |
@piiswrong - Can you please suggest next steps in this PR? How can we take this forward? |
@piiswrong Can you please look into failing CI builds? Thanks |
@piiswrong could you please rebase the PR thanks! |
@zheng-da @pengzhao-intel - Any suggestions on next step with this optimization? How can we take this forward? |
@sandeep-krishnamurthy This PR is not related to CPU backend now. |
@mxnet-label-bot remove[pr-work-in-progress] |
@nswamy @sandeep-krishnamurthy @anirudh2290 - Please consider closing this PR since there is no follow up from the authors since January. |
@piiswrong Could you provide an update on the PR? Thanks |
This PR has been open with no follow up for a long time, more than 6 months now. |
To make sure we don't lose the work done in the PR, I have linked this PR in the issue about Gluon Memory optimization - #12226 Closing the PR due to inactivity. |
Description
(Brief description on what this PR is about)
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments