昇腾社区首页
中文
注册

中断运行

  1. host侧或device侧的算子运行程序卡顿时,用户可通过键盘输入“CTRL+C”,可手动中断算子运行程序并回显中断位置信息。
    若运行程序出现卡顿的现象,可以通过键盘输入“CTRL+C”中断运行程序 。运行卡顿的原因可能是以下情况:
    • 用户程序本身存在死循环,需要通过修复程序解决。
    • 算子使用了表1中的同步类指令。
    (msdebug) r
    Process 199473 launched: '${INSTALL_DIR}/projects/AddKernelInvocation/add_npu' (aarch64)
    [Launch of Kernel add_custom on Device 1]
    //  键盘输入“CTRL+C”命令
    Process 199473 stopped
    [Switching to focus on Kernel add_custom, CoreId 39, Type aiv]
    * thread #1, name = 'add_npu', stop reason = signal SIGSTOP
        frame #0: 0x00000000000013b8 device_debugdata`KernelAdd::Compute(this=<unavailable>, progress=<unavailable>) at add_custom.cpp:58:2
       55           outQueueZ.EnQue<half>(zLocal);
       56           inQueueX.FreeTensor(xLocal);
       57           inQueueY.FreeTensor(yLocal); 
    -> 58           while(true) {                  // 中断位置信息,表示此处程序陷入无限循环、同步类指令等现象
       59           }
       60       }
  2. 调试完以后,执行q命令并输入Y或y结束调试。
    (msdebug) q
    Quitting LLDB will kill one or more processes. Do you really want to proceed: [Y/n] y