---
title: 函数：get_op_end
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclpythondevg_01_0884.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclpythondevg_01_0884.html
indexId: 85d6ff4a5ef3e287215c3702a489f5e4d3e6e4637dfd8b66f3a128e63db11e0f71
---
# 函数：get_op_end

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |


#### 功能说明

获取算子执行的结束时间，单位为ns。

建议用户新建一个线程，在新线程内调用该接口，否则可能阻塞主线程中的其它任务调度。


#### 函数原型

- C函数原型
  1 uint64_t aclprofGetOpEnd(const void *opInfo, size_t opInfoLen, uint32_t index)

- python函数
  1 op_end = acl.prof.get_op_end(op_info, op_info_len, index)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| op\_info | int，指定算子信息的内存地址。 |
| op\_info\_len | int，算子信息的长度。 |
| index | int，指定获取第几个算子的算子名称。 用户调用acl.prof.get\_op\_num接口获取算子数量后，这个index的取值范围：[0, (算子数量\-1)]。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| op\_end | int，算子执行的结束时间。 |
