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

#### 产品支持情况

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


#### 功能说明

利用单算子加载与执行接口(https://www.hiascend.comdocument/detail/zh/canncommercial/900/API/ascendgraphapi/aclpythondevg_01_0771.html)实现训练的场景下，使用本接口用于标记迭代开始与结束时间，为后续Profiling解析提供迭代标识，以便以迭代为粒度展示性能数据。


#### 函数原型

- C函数原型
  1 aclError aclprofGetStepTimestamp(aclprofStepInfo* stepInfo, aclprofStepTag tag, aclrtStream stream)

- python函数
  1 ret =acl.prof.get_step_timestamp(stepinfo, tag, stream)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| stepinfo | int，指定迭代信息。需提前调用acl.prof.create\_step\_info接口创建aclprofStepInfo类型的数据。 |
| tag | int，用于标记迭代开始或结束。在迭代开始时传入ACL\_STEP\_START，迭代结束时需传入ACL\_STEP\_END。 |
| stream | int，指定Stream。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| ret | int，错误码。 返回0表示成功。 返回其它值表示失败。 |
