is_compiled_with_custom_device¶
- paddle.device. is_compiled_with_custom_device ( device_type ) [source]
-
Whether paddle was built with Paddle_CUSTOM_DEVICE .
- Parameters
-
std::string –
type (the registered device) –
"npu". (like) –
- Returns
-
bool,
True
if CustomDevice is supported, otherwiseFalse
.
Examples
import paddle support_npu = paddle.device.is_compiled_with_custom_device("npu")