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

Function cuda_device_count

fastdeploy/usage/usage_lib.py:159–164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

157
158
159def cuda_device_count() -> int:
160 if not paddle.device.is_compiled_with_cuda():
161 return 0
162
163 device_count = paddle.device.cuda.device_count()
164 return device_count
165
166
167def xpu_device_count() -> int:

Calls

no outgoing calls