mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-03 20:17:42 +03:00
Support multi and single core rknn npus
This commit is contained in:
parent
00261cb90c
commit
82cdb06a95
@ -408,7 +408,13 @@ def get_rockchip_npu_stats() -> dict[str, str]:
|
||||
try:
|
||||
with open("/sys/kernel/debug/rknpu/load", "r") as f:
|
||||
npu_output = f.read()
|
||||
core_loads = re.findall(r"Core\d+:\s*(\d+)%", npu_output)
|
||||
|
||||
if "Core0:" in npu_output:
|
||||
# multi core NPU
|
||||
core_loads = re.findall(r"Core\d+:\s*(\d+)%", npu_output)
|
||||
else:
|
||||
# single core NPU
|
||||
core_loads = re.findall(r"NPU load:\s+(\d+)%", npu_output)
|
||||
except FileNotFoundError:
|
||||
core_loads = None
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user