Maybe we should relax inplace optimization conditions in plan_memory.cc? #20695
-
Hi guys, we developed our custom fake quantization operator but suffer out of memory issues due to store activations two times (before and after fakequant op). We try to solve this problem by making forward and backward in place, however, the in_data and out_data are not shared because the mxnet backend makes the final decision of memory optimization. We notice that the condition at line 257 in plan_memory.cc controls whether to perform optimization, in our opinion, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I checked the code and noticed that the |
Beta Was this translation helpful? Give feedback.
I checked the code and noticed that the
FInplaceIdentity
function enables in-place optimization even when the input reference count is greater than one, which covers the above cases.