paddle.device.xpu.device_count()
返回值是 int,表示当前程序可用的 XPU 数量。
返回一个整数,表示当前程序可用的 XPU 数量。
>>> import paddle >>> paddle.device.xpu.device_count()