Return the number of GPUs available. Returns: int: the number of GPUs available. Note: This function returns 0 when compiled without CUDA support. Examples: .. code-block:: pycon >>> import paddle >>> paddle.device.device_count()
()
| 38 | |
| 39 | |
| 40 | def device_count() -> int: |
| 41 | ''' |
| 42 | Return the number of GPUs available. |
| 43 | |
| 44 | Returns: |
| 45 | int: the number of GPUs available. |
| 46 | |
| 47 | Note: |
| 48 | This function returns 0 when compiled without CUDA support. |
| 49 | |
| 50 | Examples: |
| 51 | .. code-block:: pycon |
| 52 | |
| 53 | >>> import paddle |
| 54 | |
| 55 | >>> paddle.device.device_count() |
| 56 | |
| 57 | ''' |
| 58 | return 0 |
| 59 | |
| 60 | |
| 61 | def get_rng_state( |
no outgoing calls