执行调优结果如下所示,代表调优完成。调优后的自定义知识库请参见自定义知识库,调优结果文件请参见算子调优结果文件。
[Aoe]<xxxx> Single operator tuning process finished. //xxxx:算子名称。 [Aoe]Aoe process finished,cost time 1109s. //调优完成。
调优完成后,若满足自定义知识库生成条件(请参见图2和图3),则会生成自定义知识库。生成自定义知识库会存储到TUNE_BANK_PATH环境变量中指定的路径/${soc_version}/目录,若不设置此环境变量,默认存储到${HOME}/Ascend/latest/data/aoe/custom/op/${soc_version}路径下。如何使用调优后的自定义知识库请参见如何使用调优后的自定义知识库。
调优过程中,会在执行调优的工作目录下实时生成命名为“aoe_result_opat_{timestamp}_{pidxxx}.json”的文件,记录调优过程中被调优的算子信息。
其中{timestamp}为时间戳,格式为:年月日时分秒毫秒,“{pidxxx}”中的“xxx”为进程ID。
内容格式如下所示,可以包括多个调优任务,各字段含义请参见表1。tid表示线程ID。
{ "report_{timestamp}_{tid}": [ { "basic": { "tuning_name": "调优任务名", "tuning_time(s)": 26 } }, { "OPAT": { "opat_tune_result": "tune success", "repo_modified_operators": { "add_repo_operators": [ { "op_name": "MatMul", "op_type": "matmul", "performance_after_tune(us)": 3.06, "performance_before_tune(us)": 4.06, "performance_improvement": "32.68%" } ] }, "repo_summary": { "repo_add_num": 1, "repo_hit_num": 0, "repo_reserved_num": 0, "repo_unsatisfied_num": 0, "repo_update_num": 0, "total_num": 1 } } } ], "report_{timestamp}_{tid}": [ ........ .....
调优失败时(即opat_tune_result显示为"tune failed"时),还会显示调优失败的算子的op_name列表。
"tune_failed_operators": [ "res4a_branch1" ]
字段名称 |
含义 |
|||
---|---|---|---|---|
basic |
||||
- |
tuning_name |
- |
- |
调优任务名称。 |
- |
tuning_time(s) |
- |
- |
调优耗费的时长,单位:s。 |
OPAT 说明:
没有可调优的算子时,该段信息不存在。 |
||||
- |
opat_tune_result |
- |
- |
调优结果,成功时显示为"tune success",失败时显示为"tune failed"。 |
- |
repo_modified_operators |
- |
- |
调优后,调优策略有增加和更新的算子详细信息。 |
- |
- |
add_repo_operators |
- |
调优后增加调优策略的算子,可以没有,也可以有多个。 |
- |
- |
- |
op_name |
算子名称。 |
- |
- |
- |
op_type |
算子类型。可以有一个,也可以有多个。当有多个的时候,需要使用[]将多个算子类型括起来。 |
- |
- |
- |
performance_after_tune(us) |
调优后算子执行时间,单位:us。 |
- |
- |
- |
performance_before_tune(us) |
调优前算子执行时间,单位:us。 |
- |
- |
- |
performance_improvement |
调优后算子执行时间减少百分比。 |
- |
- |
update_repo_operators |
- |
调优后更新调优策略的算子,可以没有,也可以有多个。 |
- |
- |
- |
op_name |
算子名称。 |
- |
- |
- |
op_type |
算子类型。 |
- |
- |
- |
performance_after_tune(us) |
调优后算子执行时间,单位:us。 |
- |
- |
- |
performance_before_tune(us) |
调优前算子执行时间,单位:us。 |
- |
- |
- |
performance_improvement |
调优后算子执行时间减少百分比。 |
- |
repo_summary |
- |
- |
记录调优任务中不同状态算子的个数。 |
- |
- |
repo_add_num |
- |
调优前调优策略不在知识库中,调优后调优策略追加到知识库中的算子的个数。 |
- |
- |
repo_hit_num |
- |
调优过程中调优策略在知识库中的算子的个数。 |
- |
- |
repo_reserved_num |
- |
调优前调优策略在知识库中,调优后知识库中的调优策略无变化的算子的个数。 |
- |
- |
repo_unsatisfied_num |
- |
调优前调优策略不在知识库,调优后也未写入知识库的算子个数。 |
- |
- |
repo_update_num |
- |
调优前调优策略在知识库中,调优后知识库中的调优策略有更新的算子个数。 |
- |
- |
total_num |
- |
调优任务中被调优的算子总数。
|
- |
tune_failed_operators |
- |
- |
调优失败的算子的op_name列表。 说明:
可选,当opat_tune_result显示"tune failed"时才记录该字段。 |