MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / cuda_is_initialized

Function cuda_is_initialized

fastdeploy/usage/usage_lib.py:78–82  ·  view source on GitHub ↗

Check if CUDA is initialized.

()

Source from the content-addressed store, hash-verified

76
77
78def 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
85def cuda_get_device_properties(device, names: Sequence[str], init_cuda=False) -> tuple[Any, ...]:

Callers 2

Calls

no outgoing calls

Tested by 1