is_initialized
- paddle.cuda. is_initialized ( ) bool [source]
-
Return whether device has been initialized.
- Returns
-
True if any device (CUDA, XPU, or Custom) has been initialized, False otherwise.
- Return type
-
bool
Examples
>>> >>> import paddle >>> initialized = paddle.cuda.is_initialized() >>> print(f"Device initialized: {initialized}")
