msdebug调试信息展示
ascend info devices
输入以下命令查询算子运行的设备信息,*所在行代表当前聚焦的设备。
(msdebug) ascend info devices Device Aic_Num Aiv_Num Aic_Mask Aiv_Mask * 1 0 2 0x0 0x6 (msdebug)
关键信息说明如下表:
字段  | 
释义  | 
|---|---|
Device  | 
设备逻辑id。  | 
Aic_Num  | 
使用的cube核数量。  | 
Aiv_Num  | 
使用的vector核数量。  | 
Aic_Mask  | 
实际使用的cube的mask码,用64 bit位表示,如果第 i 位bit为1,表示使用了cube i。  | 
Aiv_Mask  | 
实际使用的vector的mask码,用64 bit位表示,如果第 i 位bit为1,表示使用了vector i。  | 
ascend info cores
输入以下命令查询算子运行的核信息,*所在行代表当前聚焦的核。如下所示当前聚焦的核为aiv的“core 1”。
(msdebug) ascend info cores
  CoreId  Type  Device Stream Task Block         PC               Exception
*   1     aiv      1     3     0     0     0x1240c001a80c         f0000000
    2     aiv      1     3     0     1     0x1240c001a80c         f0000000
(msdebug)
关键信息说明如下表:
字段  | 
释义  | 
|---|---|
CoreId  | 
aiv或aic的核id,从0开始。  | 
Type  | 
核类型,包括aic或aiv。  | 
Device  | 
设备逻辑id。  | 
Stream  | 
当前kernel函数下发的stream id,stream由一系列的task组成。  | 
Task  | 
当前stream里的task id。task表示下发给task scheduler处理的任务。  | 
Block  | 
表示核函数将会在几个核上执行。每个执行该核函数的核会被分配一个逻辑ID,即block_id。  | 
PC  | 
当前核上的pc逻辑绝对地址。  | 
Exception  | 
异常状态码。  | 
ascend info tasks
输入以下命令查询算子运行的task信息,*所在行代表当前聚焦的task,包括device id、stream id、task id、Invocation即核函数名称。
(msdebug) ascend info tasks Device Stream Task Invocation * 1 3 0 add_custom (msdebug)
ascend info stream
输入以下命令查询算子运行的stream信息,*所在行代表当前聚焦的stream,包括device id、stream id、Type即核类型(包括aic或aiv)。
(msdebug) ascend info stream Device Stream Type * 1 3 aiv (msdebug)
ascend info blocks
输入以下命令查询算子运行的block信息,*所在行代表当前聚焦的block,包括device id、stream id、task id、block id。
(msdebug) ascend info blocks
  Device Stream Task Block
*   1      3     0     0
    1      3     0     1
输入以下命令显示所运行的block在当前中断处的代码。
(msdebug) ascend info blocks -d
Current stop state of all blocks:
[* CoreId 1, Block 0]
* thread #1, name = 'add_custom_npu', stop reason = breakpoint 1.1
    frame #0: 0x000000000000380c device_debugdata`::add_custom(uint8_t *__restrict, uint8_t *__restrict, uint8_t *__restrict) [inlined] KernelAdd::CopyOut(this=0x000000000016a9b8, progress=0) at add_custom.cpp:85:9
   82  	        // copy progress_th tile from local tensor to global tensor
   83  	        DataCopy(zGm[progress * TILE_LENGTH], zLocal, TILE_LENGTH);
   84  	        // free output tensor for reuse
-> 85  	        outQueueZ.FreeTensor(zLocal);
   86  	    }
   87  	
   88  	private:
[CoreId 2, Block 1]
* thread #1, name = 'add_custom_npu', stop reason = breakpoint 1.1
    frame #0: 0x000000000000380c device_debugdata`::add_custom(uint8_t *__restrict, uint8_t *__restrict, uint8_t *__restrict) [inlined] KernelAdd::CopyOut(this=0x000000000016e9b8, progress=0) at add_custom.cpp:85:9
   82  	        // copy progress_th tile from local tensor to global tensor
   83  	        DataCopy(zGm[progress * TILE_LENGTH], zLocal, TILE_LENGTH);
   84  	        // free output tensor for reuse
-> 85  	        outQueueZ.FreeTensor(zLocal);
   86  	    }
   87  	
   88  	private:
(msdebug) 
父主题: 使用msdebug上板调试算子