跳到主要内容

aclprofPush

aclprofCreateStamp

函数功能

创建msproftx事件标记。后续调用aclprofMarkaclprofSetStampTraceMessageaclprofPushaclprofRangeStart接口时需要以描述该事件的指针作为输入,表示记录该事件发生的时间跨度。同步接口。

约束说明

aclprofDestroyStamp接口配对使用,需提前调用aclprofStart接口。

函数原型

void *aclprofCreateStamp()

返回值说明

  • 返回void类型的指针,表示成功。
  • 返回nullptr,表示失败。

参考资源

接口调用示例,参见Profiling性能数据采集

父主题: Profiling AscendCL API for Extension(Profiling AscendCL API扩展接口)

aclprofSetStampTraceMessage

函数功能

为msproftx事件标记携带字符串描述,在Profiling解析并导出结果中msprof_tx summary数据展示。同步接口。

Profiling解析并导出结果请参见《性能分析工具使用指南》下的“Profiling数据说明>msproftx数据说明”。

约束说明

aclprofCreateStamp接口和aclprofDestroyStamp接口之间调用。

函数原型

aclError aclprofSetStampTraceMessage(void *stamp, const char *msg, uint32_t msgLen)

参数说明

参数名输入/输出说明
stamp输入Stamp指针,指代msproftx事件标记。 指定aclprofCreateStamp接口的指针。
msg输入字符串内容。
msgLen输入字符串长度。

返回值说明

返回0表示成功,返回其它值表示失败。

参考资源

接口调用示例,参见Profiling性能数据采集

父主题: Profiling AscendCL API for Extension(Profiling AscendCL API扩展接口)

aclprofMark

函数功能

msproftx标记瞬时事件。同步接口。

调用此接口后,Profiling自动在Stamp指针中加上当前时间戳,将Event type设置为Mark,表示开始一次msproftx采集。

约束说明

aclprofCreateStamp接口和aclprofDestroyStamp接口之间调用。

函数原型

aclError aclprofMark(void *stamp)

参数说明

参数名输入/输出说明
stamp输入Stamp指针,指代msproftx事件标记。 指定aclprofCreateStamp接口的指针。

返回值说明

返回0表示成功,返回其它值表示失败。

参考资源

接口调用示例,参见Profiling性能数据采集

父主题: Profiling AscendCL API for Extension(Profiling AscendCL API扩展接口)

aclprofPush

函数功能

msproftx用于记录事件发生的时间跨度的开始时间。同步接口。

调用此接口后,Profiling自动在Stamp指针中记录开始的时间戳,将Event type设置为Push/Pop。

约束说明

函数原型

aclError aclprofPush(void *stamp)

参数说明

参数名输入/输出说明
stamp输入Stamp指针,指代msproftx事件标记。 指定aclprofCreateStamp接口的指针。

返回值说明

返回0表示成功,返回其它值表示失败。

参考资源

接口调用示例,参见Profiling性能数据采集

父主题: Profiling AscendCL API for Extension(Profiling AscendCL API扩展接口)

aclprofPop

函数功能

msproftx用于记录事件发生的时间跨度的结束时间。同步接口。

调用此接口后,Profiling自动在Stamp指针中记录采集结束的时间戳。

约束说明

函数原型

aclError aclprofPop()

返回值说明

返回0表示成功,返回其它值表示失败。

参考资源

接口调用示例,参见Profiling性能数据采集

父主题: Profiling AscendCL API for Extension(Profiling AscendCL API扩展接口)

aclprofRangeStart

函数功能

msproftx用于记录事件发生的时间跨度的开始时间。同步接口。

调用此接口后,Profiling自动在Stamp指针记录采集开始的时间戳,将Event type设置为Start/Stop,生成一个进程唯一的id,并将Stamp保存在以进程粒度维护的一个map中。

约束说明

函数原型

aclError aclprofRangeStart(void *stamp, uint32_t *rangeId)

参数说明

参数名输入/输出说明
stamp输入Stamp指针,指代msproftx事件标记。 指定aclprofCreateStamp接口的指针。
rangeId输出msproftx事件标记的唯一标识。用于在跨线程时区分。

返回值说明

返回0表示成功,返回其它值表示失败。

参考资源

接口调用示例,参见Profiling性能数据采集

父主题: Profiling AscendCL API for Extension(Profiling AscendCL API扩展接口)

aclprofRangeStop

函数功能

msproftx用于记录事件发生的时间跨度的结束时间。同步接口。

调用此接口后,Profiling自动在Stamp指针中记录采集结束的时间戳。

约束说明

函数原型

aclError aclprofRangeStop(uint32_t rangeId)

参数说明

参数名输入/输出说明
rangeId输出msproftx事件标记的唯一标识。用于在跨线程时区分。

返回值说明

返回0表示成功,返回其它值表示失败。

参考资源

接口调用示例,参见Profiling性能数据采集

父主题: Profiling AscendCL API for Extension(Profiling AscendCL API扩展接口)

在线提单