You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/05/06 06:00:10 UTC

[GitHub] [incubator-mxnet] eric-haibin-lin opened a new issue #14888: Memory usage estimator

eric-haibin-lin opened a new issue #14888: Memory usage estimator
URL: https://github.com/apache/incubator-mxnet/issues/14888
 
 
   GPU memory is limited. It would be great to have an utility function to estimate the memory usage of training a model given the shape of the input. Currently, the only way is to run the model with different hidden_size and batch_size (trial and error). MXNet could provide an API that makes this process automatic so that it's easier for the user. @Roshrini @pinaraws  @cgraywang @yifeim feel free to add additional contexts
   
   For example, there is a 3rdparty library that prints the theoretical memory consumption of a pytorch model's forward/backward intermediate data entries, weights and gradients. https://github.com/jacobkimmel/pytorch_modelsize 
   
   In MXNet we can record the memory planning of a model and report the memory usage given input shapes. This does not include the temporary memory requested at runtime (e.g. by MKLDNN/CUDNN). If reporting planned memory usage not accurate enough, we can simply run the trials and return the actual peak memory usage at runtime. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services