Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:vim3:npu:npu-performance

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:vim3:npu:npu-performance [2023/09/12 03:54]
sravan [NPU Performance Interface Usage]
products:sbc:vim3:npu:npu-performance [2023/09/12 04:10] (current)
sravan [Reload the Driver Module]
Line 1: Line 1:
 ====== NPU Performance Analysis ====== ====== NPU Performance Analysis ======
  
-===== Introduction ===== +Obtain NPU performance diagnostics and understand performance metrics.
- +
-Through this document, you can learn how to print out the performance of the NPU.+
  
 ===== Preparation ===== ===== Preparation =====
Line 9: Line 7:
 ==== Upgrade The System ==== ==== Upgrade The System ====
  
-Please refer to [[../install-os/boot-into-upgrade-mode|Boot into Upgrade Mode]].+Please refer to the [[../configurations/upgrade-system upgrade guide]].
  
 ==== Reload the Driver Module ==== ==== Reload the Driver Module ====
Line 22: Line 20:
  
 ```shell ```shell
-$ sudo insmod /lib/modules/4.9.241/kernel/drivers/amlogic/npu/galcore.ko gpuProfiler=1 showArgs=1+$ sudo insmod /lib/modules/$(uname -r)/kernel/drivers/amlogic/npu/galcore.ko gpuProfiler=1 showArgs=1
 ``` ```
  
-===== Get Interface Data ===== +==== Set environment variables ====
- +
-==== Set Environments ====+
  
 ```shell ```shell
Line 33: Line 29:
 $ export VIV_VX_DEBUG_LEVEL=1 $ export VIV_VX_DEBUG_LEVEL=1
 ``` ```
 +
 +===== Fetch diagnostic data of the NPU =====
  
 ==== Run Model ==== ==== Run Model ====
  
-Use inception as example [[npu-prebuilt-demo-usage|Get NPU Demo]].+Here is sample using the [[npu-prebuilt-demo-usage| inception example]] to run on the NPU.
  
 ```shell ```shell
Line 83: Line 81:
 ``` ```
  
-===== Interface Data Description ===== +==== Diagnostic data description ====
- +
-==== Bandwidth Data Description ====+
  
-  - ''TOTAL_READ_BANDWIDTH''    : Total read bandwidth +^ Name                   ^ Description            ^ 
-  - ''TOTAL_WRITE_BANDWIDTH''   : Total write bandwidth +| **TOTAL_READ_BANDWIDTH** | Total read bandwidth  | 
-  - ''AXI_READ_BANDWIDTH''      : AXI_SRAM read bandwidth +| **TOTAL_WRITE_BANDWIDTH**| Total write bandwidth | 
-  - ''AXI_READ_BANDWIDTH''      : AXI_SRAM write bandwidth +| **AXI_READ_BANDWIDTH**   AXI_SRAM read bandwidth| 
-  - ''DDR_READ_BANDWIDTH''      : DDR read bandwidth +| **AXI_WRITE_BANDWIDTH**  AXI_SRAM write bandwidth| 
-  - ''DDR_WRITE_BANDWIDTH''     : DDR write bandwidth+| **DDR_READ_BANDWIDTH**   DDR read bandwidth    | 
 +| **DDR_WRITE_BANDWIDTH**  DDR write bandwidth   |
  
 ==== Calculate Usage Rate ==== ==== Calculate Usage Rate ====
  
-  - ''GPUTOTALCYCLES''     : Total number of cycles. +    * ''GPUTOTALCYCLES''     : Total number of cycles. 
-  ''GPUIDLECYCLES''      : Number of cycles in idle state.+    ''GPUIDLECYCLES''      : Number of cycles in idle state.
  
-Usage rate =(''GPUTOTALCYCLES''-''GPUIDLECYCLES'')/''GPUTOTALCYCLES''.+Usage rate = (''GPUTOTALCYCLES''-''GPUIDLECYCLES'')/''GPUTOTALCYCLES''.
  
  
Last modified: 2023/09/12 03:54 by sravan