marcoabreu commented on issue #10354: Expose the number of GPUs.
URL: https://github.com/apache/incubator-mxnet/pull/10354#issuecomment-380864744
What do you think about something along the lines of:
```
try
assert get_num_cpu() > 0, "Expected exception on a CPU only build" # GPU instance
with 1 or more GPUs.
catch CUDA_NOT_PRESENT
pass # We're on a CPU only build
```
This will allow to distinguish between a CPU and GPU build as well as a CPU and GPU instance.
----------------------------------------------------------------
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
|