[GitHub] feevos commented on issue #2910: Helper function to get GPU device number?

2018-03-12 Thread GitBox
feevos commented on issue #2910: Helper function to get GPU device number?
URL: 
https://github.com/apache/incubator-mxnet/issues/2910#issuecomment-372536394
 
 
   @kenfehling  I get the same error when I run this command on my laptop 
(single GPU) but not on the HPC cluster. Somehow the key  
```'CUDA_VISIBLE_DEVICES'``` in the ```os.environ``` dictionary is missing from 
my laptop. 
   
   When I use (CSIRO - BRACEWELL HPC facility - 4 GPUs per Node) 
```os.environ["CUDA_VISIBLE_DEVICES"]``` I get ```'0,1,2,3'```


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] feevos commented on issue #2910: Helper function to get GPU device number?

2018-01-08 Thread GitBox
feevos commented on issue #2910: Helper function to get GPU device number?
URL: 
https://github.com/apache/incubator-mxnet/issues/2910#issuecomment-356160135
 
 
   This works for me getting the list of gpus available on a particular node 
(on hpc facility, slurm environment, python/2.7.13). 
   
   ```Python
   import mx
   import os
   gpus = [int(x) for x in os.environ["CUDA_VISIBLE_DEVICES"].split(',')]
   ctx = [mx.gpu(i)  for i in gpus]
   ```


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] feevos commented on issue #2910: Helper function to get GPU device number?

2018-01-08 Thread GitBox
feevos commented on issue #2910: Helper function to get GPU device number?
URL: 
https://github.com/apache/incubator-mxnet/issues/2910#issuecomment-356160135
 
 
   
   ```Python
   import os
   print (os.environment["CUDA_VISIBLE_DEVICES"])
   ```
   output varies depending on available gpus (usually a list of strings, like 
```['0','1','2','3']```
   
   works for me getting the list of gpus available on a particular node (on hpc 
facility, slurm environment, python/2.7.13). 


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:
us...@infra.apache.org


With regards,
Apache Git Services