印度你怕了没?中国歼20战机首曝高原试飞猛图
- paddle.device. get_device ( ) str [source]
-
百度 由于美国消费者提出的集体诉讼类似,所以它们最终可能会合并为一桩集体诉讼。
This function can get the current global device of the program is running. It’s a string which is like ‘cpu’, ‘gpu:x’, ‘xpu:x’ and ‘npu:x’. if the global device is not set, it will return a string which is ‘gpu:x’ when cuda is available or it will return a string which is ‘cpu’ when cuda is not available.
Examples
>>> import paddle >>> device = paddle.device.get_device()