Samsung / ONE

On-device Neural Engine
Other
437 stars 157 forks source link

[CFE] Reduce Duplicate Code #9947

Open seanshpark opened 2 years ago

seanshpark commented 2 years ago

Our recent DC score is 4.04 and seems near the edge. Let's make this score higher.

seanshpark commented 2 years ago

Top 10

No. Metric BlockKey Path LineStart LineEnd LineCount Token Violation
1 DC 1 compiler/luci/pass/src/ConvertNCHWToNHWCPass.cpp 1099 1175 77 351 Y
2 DC 1 compiler/luci/pass/src/ConvertNCHWToNHWCPass.cpp 889 964 76 351 Y
3 DC 1 compiler/luci/pass/src/ConvertNCHWToNHWCPass.cpp 1175 1250 76 351 Y
4 DC 3 compiler/luci/pass/src/ForwardTransposeOpPass.cpp 164 219 56 286 Y
5 DC 3 compiler/luci/pass/src/ForwardTransposeOpPass.cpp 221 276 56 286 Y
6 DC 67 compiler/logo/src/Passes/ReorderDecodePass.cpp 83 131 49 102 Y
7 DC 67 compiler/logo/src/Passes/ReorderDecodePass.cpp 184 231 48 102 Y
8 DC 2 compiler/circle-eval-diff/src/MetricPrinter.cpp 196 234 39 306 Y
9 DC 47 compiler/luci/pass/src/TransformMinMaxToRelu6Pass.cpp 25 63 39 115 Y
10 DC 47 compiler/luci/pass/src/TransformMinReluToRelu6Pass.cpp 25 63 39 115 Y
seanshpark commented 2 years ago

@jinevening , do you have some time to look on the above codes? if not I'll take some time and look these when available :)

jinevening commented 2 years ago

Ah, I wrote many of them. I'll take a look. Thanks for sharing :)

seanshpark commented 2 years ago

This is not urgent, so please take your time :)

seanshpark commented 2 years ago

I'll later show you how to get full report at the office (today is my WFH)

jinevening commented 2 years ago

@mhs4670go showed interests in this task :)

jinevening commented 1 year ago

@mhs4670go ping