mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-21 06:45:24 -06:00
feat(api/device): add shortcut when there is no NVLink available
This commit is contained in:
parent
4073d7da75
commit
b2dc47eec8
1 changed files with 2 additions and 0 deletions
|
|
@ -1537,6 +1537,8 @@ class Device: # pylint: disable=too-many-instance-attributes,too-many-public-me
|
|||
could be :const:`nvitop.NA` when not applicable.
|
||||
"""
|
||||
nvlink_link_count = self.nvlink_link_count()
|
||||
if nvlink_link_count == 0:
|
||||
return []
|
||||
|
||||
def query_nvlink_throughput_counters() -> tuple[tuple[int | NaType, int]]:
|
||||
return tuple( # type: ignore[return-value]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue