is_compiled_with_cuda

paddle.device. is_compiled_with_cuda ( ) [source]

Whether this whl package can be used to run the model on GPU.

Returns

True if CUDA is currently available, otherwise False.

Return type

Bool

Examples

>>> import paddle
>>> support_gpu = paddle.device.is_compiled_with_cuda()