You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These four data members are equivalent with OpDesc.
But in Variable, we do not have a VarDesc data member.
I am trying to implement re-computation policy to make further memory optimization. The re-computation policy will delete the variable in forward pass, and re-compute them in backward pass.
But If I erase the variable in current scope in forward pass, I can not compute them in backward pass. Because the variable is not exits. And the var type information in VarDesc is also lost.
A solution can be delete the variable first, and make memory released. And then create the variable again, and we need to call GetMutable method to set var type for this variable. It acquires VarDesc in a Runtime variable.
We should take OpDesc and VarDesc as a data member of Operator and Variable.
The text was updated successfully, but these errors were encountered:
您好,此issue在近一个月内暂无更新,我们将于今天内关闭。若在关闭后您仍需跟进提问,可重新开启此问题,我们将在24小时内回复您。因关闭带来的不便我们深表歉意,请您谅解~感谢您对PaddlePaddle的支持!
Hello, this issue has not been updated in the past month. We will close it today for the sake of other user‘s experience. If you still need to follow up on this question after closing, please feel free to reopen it. In that case, we will get back to you within 24 hours. We apologize for the inconvenience caused by the closure and thank you so much for your support of PaddlePaddle Group!
Actually, we construct OpDesc and VarDesc at CompileTime, and then create Operator and Variable at CompileTime.
Operator has four data members:
Paddle/paddle/fluid/framework/operator.h
Lines 133 to 143 in 48f213e
These four data members are equivalent with OpDesc.
But in Variable, we do not have a VarDesc data member.
I am trying to implement re-computation policy to make further memory optimization. The re-computation policy will delete the variable in forward pass, and re-compute them in backward pass.
But If I erase the variable in current scope in forward pass, I can not compute them in backward pass. Because the variable is not exits. And the var type information in VarDesc is also lost.
A solution can be delete the variable first, and make memory released. And then create the variable again, and we need to call GetMutable method to set var type for this variable. It acquires VarDesc in a Runtime variable.
We should take OpDesc and VarDesc as a data member of Operator and Variable.
The text was updated successfully, but these errors were encountered: