Cambricon / mlu-ops

Efficient operation implementation based on the Cambricon Machine Learning Unit (MLU) .
MIT License
103 stars 102 forks source link

[Fix](mlu-ops): Fix an error of perf analyser #993

Closed ZhouxiangZhouxiang closed 5 months ago

ZhouxiangZhouxiang commented 6 months ago

Fix the name of prototype so that there is no duplicated names.

Thanks for your contribution and we appreciate it a lot. :rocket::rocket:

1. Motivation

When we run the perf tool to compare multiple operators, the comparison can fail. The reason is that 2 dataframes need to be merged according to their common keys called "protoName". ProtoNames are the names of calculators' testcases, which means there are a lot of repetitive ones like case0 or case_0. But as a key, protoName should be unique in each dataframe. Repetitive names means that merging 2 dataframes can result in incorrect results.

2. Modification

I have changed the name of the protoname in function preprocess in file parser.py to the full path of the test case of each calculator so that there are no repeated protoNames.

3. Test Report

This is the png generated by the python file for all the calculators, which means the now the bug is solved. next

chqy99 commented 6 months ago

Motivation 需要详细介绍为什么这样改的原因,而不是错误现象:多个算子有可能有同名的测例文件,使用测例的文件名当做键值不合理,应该使用测例的绝对路径当做键值