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/05/12 13:24:23 UTC

[GitHub] marcoabreu commented on a change in pull request #10354: Expose the number of GPUs.

marcoabreu commented on a change in pull request #10354: Expose the number of GPUs.
URL: https://github.com/apache/incubator-mxnet/pull/10354#discussion_r187772910
 
 

 ##########
 File path: python/mxnet/context.py
 ##########
 @@ -212,6 +216,25 @@ def gpu(device_id=0):
     return Context('gpu', device_id)
 
 
+def num_gpus():
+    """Query CUDA for the number of GPUs present.
+
+    Raises
+    ------
+    Will raise an exception on any CUDA error or in case MXNet was not
+    compiled with CUDA support.
 
 Review comment:
   I think we changed the part about throwing an exception if compiled without cuda, right? It should only throw an exception in case of an actual error

----------------------------------------------------------------
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