---
title: AI Core算子执行时间超时导致网络运行失败
description: "执行模型推理时，返回模型执行失败。Device侧日志中有如下ERROR级别的打印日志，关键信息如下："
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/tbeaicpudevg/atlasopdev_10_0144.html
sourcePath: /source/zh/canncommercial/900/others/tbeaicpudevg/atlasopdev_10_0144.html
indexId: 12914178e6931b26cac1f57574a28eeadc0a6b271be708761bbe6dbd004c30a673
---
# AI Core算子执行时间超时导致网络运行失败

#### 现象描述

执行模型推理时，返回模型执行失败。Device侧日志中有如下ERROR级别的打印日志，关键信息如下：

```
[ERROR] TSCH(-1,null):2020-06-04-10:51:09.520.395 28 (cpuid:0) ai_core_dispatcher.c:1012
bs_done_exception_proc_timeout
: slot_id=1,TS_ctrl=0x4,exception_core_list=0x0,current core usage=0x1,AI_CORES_COUNT=2,
fault_task=0
```


#### 问题根因

由于AI Core中算子执行task时间有超时时间的限制，如果算子的task执行时间超过限制时间，则Task Schedule会返回超时失败。

Atlas 训练系列产品 的超时时间为68s。


#### 定位步骤

开发者可按照以下步骤进行分析，定位到超时算子。

1. 首先查看Device侧日志，定位到TSCH组件的失败task ID。
  Device侧日志路径及查看方法请参见《日志参考(https://www.hiascend.com/document/detail/zh/canncommercial/900/maintenref/logreference/logreference_0001.html)》。

  查询TSCH组件的日志信息，通过搜索关键字bs_done_exception_proc_timeout，定位到fault_task的ID，例如fault_task=0。

  日志信息参考现象描述。

2. 查看Host侧日志，定位到失败的算子名称。
  Host侧日志路径及查看方法请参见《日志参考(https://www.hiascend.com/document/detail/zh/canncommercial/900/maintenref/logreference/logreference_0001.html)》。

  根据1查询到的fault_task ID，例如fault_task=0，在Host侧日志中搜索“TaskLaunched”和“task_id=0”，如下所示：

```
[EVENT] RUNTIME(15568,acl_caffe_interp):2020-06-04-10:50:14.522.076 [runtime/feature/src/logger.cc:1014]15570
TaskLaunched
:device_id=0, stream_id=514, sq_id=514,
task_id=0
,
kernel_name=test_case/2_16_144_417_248_408_float16/0_Interp_1_0_2_16_144_417_0_0_2_16_248_408.om/Interp_tvmbin
, devfunc_name = te_interp_1ead9f4957880f1e_0__kernel0 task_type=AiCoreKernel, task_launched_num=2
```


  如上日志中的kernel_name中的Interp即为执行超时的算子。
