get_available_custom_device

paddle.device. get_available_custom_device ( ) [源代码]

该功能获得所有可用的自定义设备。

返回

返回列表包含所有可用的自定义设备。

代码示例

>>> import paddle
>>> paddle.device.get_available_custom_device()

>>> # Case 1: paddlepaddle-gpu package installed, and no custom device registered.
>>> # Output: None

>>> # Case 2: paddlepaddle-gpu package installed, and custom device 'CustomCPU' and 'CustomGPU' is registered.
>>> # Output: ['CustomCPU', 'CustomGPU:0', 'CustomGPU:1']