r"""Returns whether cuda device is available on this system.
()
| 100 | |
| 101 | |
| 102 | def is_cuda_available() -> bool: |
| 103 | r"""Returns whether cuda device is available on this system.""" |
| 104 | t = _str2device_type("gpu") |
| 105 | return CompNode._get_device_count(t, False) > 0 |
| 106 | |
| 107 | |
| 108 | def is_cambricon_available() -> bool: |