mindspore.device_context.gpu.device_count ========================================= .. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/master/resource/_static/logo_source.svg :target: https://gitee.com/mindspore/mindspore/blob/master/docs/api/api_python/device_context/mindspore.device_context.gpu.device_count.rst :alt: 查看源文件 .. py:function:: mindspore.device_context.gpu.device_count() 返回可用的GPU数量。 返回: int,可用的GPU数量。