is_compiled_with_npu

paddle.device. is_compiled_with_npu ( ) [source]

Whether paddle was built with WITH_ASCEND_CL=ON to support Ascend NPU.

Returns (bool): True if NPU is supported, otherwise False.

Examples

import paddle
support_npu = paddle.device.is_compiled_with_npu()