核切换
参考以下操作可将当前聚焦的核切换至指定的核,切核后会自动展示指定核代码中断处的位置。
- 如果当前运行的核为aiv的“core 2”,指定切换的核为aiv的“core 3”。
1 2 3 4 5 6 7 8 9 10 11
(msdebug) ascend aiv 3 [Switching to focus on Kernel matmul_leakyrelu_custom, CoreId 3, Type aiv] * thread #1, name = 'matmul_leakyrel', stop reason = breakpoint 1.1 frame #0: 0x000000000000fd3c device_debugdata`_ZN7AscendC13WaitEventImplEt_mix_aiv(flagId=1) at kernel_operator_sync_impl.h:142:5 139 140 __aicore__ inline void WaitEventImpl(uint16_t flagId) 141 { -> 142 wait_flag_dev(flagId); 143 } 144 145 __aicore__ inline void SetSyncBaseAddrImpl(uint64_t config)
完成切换后,再次查询核信息可看到已切换至新指定的核id所在行。1 2 3 4 5
(msdebug) ascend info cores CoreId Type Device Stream Task Block PC stop reason 17 aic 1 3 0 0 0x12c0c00f1f88 breakpoint 1.1 2 aiv 1 3 0 0 0x12c0c00f8fbc breakpoint 1.1 * 3 aiv 1 3 0 0 0x12c0c00f8d3c breakpoint 1.1
- 如果当前运行的核为aiv的“core 3”,指定切换的核为aic的“core 17”。
1 2 3 4 5 6 7 8 9 10 11
(msdebug) ascend aic 17 [Switching to focus on Kernel matmul_leakyrelu_custom, CoreId 17, Type aic] * thread #1, name = 'matmul_leakyrel', stop reason = breakpoint 1.1 frame #0: 0x0000000000008f88 device_debugdata`_ZN7AscendC7BarrierEv_mix_aic at kfc_comm.h:39 36 37 namespace AscendC { 38 __aicore__ inline void Barrier() -> 39 { 40 #if defined(__CCE_KT_TEST__) && __CCE_KT_TEST__ == 1 41 __asm__ __volatile__("" ::: "memory"); 42 #else
完成切换后,再次查询核信息可看到已切换至新指定的核id所在行。1 2 3 4 5
(msdebug) ascend info cores CoreId Type Device Stream Task Block PC stop reason * 17 aic 1 3 0 0 0x12c0c00f1f88 breakpoint 1.1 2 aiv 1 3 0 0 0x12c0c00f8fbc breakpoint 1.1 3 aiv 1 3 0 0 0x12c0c00f8d3c breakpoint 1.1
父主题: 算子调试(msDebug)