Check if CUDA is initialized.
()
| 76 | |
| 77 | |
| 78 | def cuda_is_initialized() -> bool: |
| 79 | """Check if CUDA is initialized.""" |
| 80 | if not paddle.is_compiled_with_cuda(): |
| 81 | return False |
| 82 | return paddle.device.cuda.device_count() > 0 |
| 83 | |
| 84 | |
| 85 | def cuda_get_device_properties(device, names: Sequence[str], init_cuda=False) -> tuple[Any, ...]: |
no outgoing calls