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 2018/08/08 11:45:00 UTC

[GitHub] sbodenstein opened a new pull request #12083: GPU Memory Query to C API

sbodenstein opened a new pull request #12083: GPU Memory Query to C API
URL: https://github.com/apache/incubator-mxnet/pull/12083
 
 
   This PR adds a function `MXNET_DLL int MXGetGPUMemoryInformation(int dev, int* free_mem, int* total_mem);` to the C API to allow any language binding to easily query for the total and available memory available on a particular GPU. 
   
   Its useful as `nvidia-smi` is not available on certain platforms (like OSX). Having a platform-independent way of querying this (eg to automatically figure out appropriate batch sizes) is very useful for higher-level frameworks built on top of MXNet.
   
   This is similar to the Torch function [getMemoryUsage](https://github.com/torch/cutorch/blob/7126f4bc02757838dd597d94e5d8ee67b45e0388/init.c#L710), with the same implementation. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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