Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-place Operations #9416

Closed
tonyyang-svail opened this issue Mar 27, 2018 · 0 comments · Fixed by #9420 or #9740
Closed

In-place Operations #9416

tonyyang-svail opened this issue Mar 27, 2018 · 0 comments · Fixed by #9420 or #9740
Assignees

Comments

@tonyyang-svail
Copy link

tonyyang-svail commented Mar 27, 2018

One of the low hanging fruits in memory optimization is in-place operators. If you look at the proto message of ResNet, it has tons of in-place operations: conv's output has been in place modified by batch_norm, scale, and Relu.

With a few lines modification of code, my experiments showed that it can save up to 40% of the memory.

VGG ResNet50
Original 3.3G 1.5G
In-place BatchNorm 2.9G 1.2G
In-place BN and activation 2.5G 0.9G
memopt 2.4G 0.94G
memopt + in-place 2.0G 0.6G
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants