How to use rbln-stat
rbln-stat
is a command-line interface (CLI) utility designed to assist users in managing and monitoring running processes on RBLN NPU. Users can check various information including
- Version of the ATOM (
Name
)
- RBLN-CA02: ATOM
- RBLN-CA12: ATOM+
- Power consumption (
Power
)
- Current temperature (
Temp
)
- NPU utilization (
Util
)
- Process id (
PID
)
- Context id (
CTX
)
- Allocated memory size (
Memalloc
).
The rbln-stat
utility is already included in the RBLN Driver package that you are using now.
| $ rbln-stat
+-------------------------------------------------------------------------------------------------+
| Device Infomation KMD ver: N/A |
+-----+-----------+-----------+---------------+------+---------+--------------------------+-------+
| NPU | Name | Device | PCI BUS ID | Temp | Power | Memory(used/total) | Util |
+-----+-----------+-----------+---------------+------+---------+--------------------------+-------+
| 0 | RBLN-CA12 | rbln0 | 0000:51:00.0 | 30C | 43.9W | 2.4GiB / 15.7GiB | 98.7 |
| 1 | RBLN-CA12 | rbln1 | 0000:d8:00.0 | 25C | 6.1W | 0.0B / 15.7GiB | 0.0 |
+-----+-----------+-----------+---------------+------+---------+--------------------------+-------+
+-------------------------------------------------------------------------------------------------+
| Context Infomation |
+-----+---------------------+--------------+-----+----------+------+---------------------+--------+
| NPU | Process | PID | CTX | Priority | PTID | Memalloc | Status |
+-----+---------------------+--------------+-----+----------+------+---------------------+--------+
| 0 | python3 | 2928727 | 1 | min | 0 | 1.9GiB | run |
| 0 | python3 | 2930166 | 2 | min | 1 | 468.0MiB | run |
| 0 | python3 | 2934705 | 3 | min | 2 | 88.0MiB | idle |
+-----+---------------------+--------------+-----+----------+------+---------------------+--------+
|
How to specify device
If your system contains multiple RBLN NPU devices, you have the option to assign a specific device ID to your process by utilizing the RBLN_DEVICES
environment variable. The device ID (NPU ID) can be obtained from the CLI tool rbln-stat
.
| $ RBLN_DEVICES=0 python inference.py # to use NPU=0
$ RBLN_DEVICES=1 python inference.py # to use NPU=1
|