pytorch / FBGEMM
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 40% duplication:
    • 64,386 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 26,034 duplicated lines
  • 5,193 duplicates
system40% (26,034 lines)
Duplication per Extension
cc49% (15,649 lines)
cu36% (3,609 lines)
h31% (2,097 lines)
py30% (1,979 lines)
cpp29% (1,972 lines)
cuh28% (716 lines)
cmake4% (12 lines)
Duplication per Component (primary)
src48% (14,174 lines)
fbgemm_gpu/src34% (3,648 lines)
bench48% (2,551 lines)
fbgemm_gpu/codegen32% (2,063 lines)
fbgemm_gpu/bench32% (1,196 lines)
fbgemm_gpu/include/fbgemm_gpu28% (918 lines)
include/fbgemm27% (786 lines)
fbgemm_gpu/fbgemm_gpu29% (686 lines)
cmake/modules4% (12 lines)
fbgemm_gpu/bench/scripts0% (0 lines)
fbgemm_gpu0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G include/fbgemm include/fbgemm src src include/fbgemm--src 696 fbgemm_gpu/include/fbgemm_gpu fbgemm_gpu/include/fbgemm_gpu fbgemm_gpu/src fbgemm_gpu/src fbgemm_gpu/include/fbgemm_gpu--fbgemm_gpu/src 190 fbgemm_gpu/codegen fbgemm_gpu/codegen fbgemm_gpu/codegen--fbgemm_gpu/include/fbgemm_gpu 106 fbgemm_gpu/codegen--fbgemm_gpu/src 145 fbgemm_gpu/bench fbgemm_gpu/bench fbgemm_gpu/bench--fbgemm_gpu/include/fbgemm_gpu 66 fbgemm_gpu/bench--fbgemm_gpu/src 60

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 50 longest duplicates.
See data for all 5,193 duplicates...
Size#FoldersFilesLinesCode
179 x 2 src
src
194:384 (19%)
584:774 (19%)
view
93 x 2 bench
bench
215:363 (39%)
253:399 (35%)
view
84 x 2 src
src
181:268 (13%)
396:483 (13%)
view
71 x 2 src
src
65:156 (31%)
372:463 (9%)
view
66 x 2 src
src
390:458 (7%)
584:652 (7%)
view
66 x 2 src
src
194:262 (7%)
390:458 (7%)
view
63 x 2 src
src
319:384 (6%)
513:578 (6%)
view
63 x 2 src
src
821:907 (5%)
859:945 (6%)
view
63 x 2 src
src
513:578 (6%)
709:774 (6%)
view
50 x 2 src
src
55:117 (27%)
43:105 (29%)
view
49 x 2 src
src
585:656 (4%)
624:696 (4%)
view
49 x 2 src
src
20:91 (74%)
20:91 (70%)
view
49 x 2 fbgemm_gpu/src
fbgemm_gpu/src
640:688 (2%)
1375:1425 (2%)
view
48 x 2 bench
bench
35:97 (24%)
39:101 (22%)
view
47 x 2 src
src
226:277 (16%)
298:349 (16%)
view
46 x 2 src
src
512:580 (4%)
551:619 (4%)
view
44 x 2 fbgemm_gpu/include/fbgemm_gpu
fbgemm_gpu/include/fbgemm_gpu
234:286 (2%)
373:425 (2%)
view
43 x 2 src
src
343:393 (3%)
323:372 (4%)
view
42 x 2 src
src
3191:3232 (1%)
3311:3352 (1%)
view
42 x 2 src
src
3191:3232 (1%)
3362:3403 (1%)
view
42 x 2 src
src
3311:3352 (1%)
3362:3403 (1%)
view
42 x 2 src
src
2164:2205 (1%)
2335:2376 (1%)
view
42 x 2 src
src
2164:2205 (1%)
2284:2325 (1%)
view
42 x 2 bench
bench
194:255 (18%)
193:254 (17%)
view
42 x 2 src
src
2284:2325 (1%)
2335:2376 (1%)
view
41 x 2 src
src
1762:1804 (1%)
2114:2156 (1%)
view
41 x 2 fbgemm_gpu/src
fbgemm_gpu/src
1305:1350 (2%)
1642:1687 (2%)
view
41 x 2 src
src
134:184 (17%)
125:175 (16%)
view
41 x 2 src
src
115:164 (14%)
67:117 (16%)
view
41 x 2 src
src
2789:2831 (1%)
3141:3183 (1%)
view
40 x 2 src
src
2010:2050 (1%)
2378:2418 (1%)
view
40 x 2 src
src
3037:3077 (1%)
3405:3445 (1%)
view
39 x 2 src
src
1809:1847 (1%)
1922:1960 (1%)
view
39 x 2 src
src
1809:1847 (1%)
1970:2008 (1%)
view
39 x 2 src
src
1922:1960 (1%)
1970:2008 (1%)
view
39 x 2 src
src
2836:2874 (1%)
2997:3035 (1%)
view
39 x 2 src
src
2836:2874 (1%)
2949:2987 (1%)
view
39 x 2 src
src
2949:2987 (1%)
2997:3035 (1%)
view
38 x 2 src
src
457:506 (2%)
1143:1191 (2%)
view
38 x 2 fbgemm_gpu/include/fbgemm_gpu
fbgemm_gpu/include/fbgemm_gpu
198:240 (1%)
477:519 (1%)
view
38 x 2 src
src
35:80 (29%)
40:85 (22%)
view
38 x 2 src
src
2456:2495 (1%)
2789:2828 (1%)
view
38 x 2 src
src
2456:2495 (1%)
3141:3180 (1%)
view
38 x 2 src
src
48:93 (6%)
40:85 (22%)
view
38 x 2 src
src
1429:1468 (1%)
1762:1801 (1%)
view
38 x 2 src
src
1429:1468 (1%)
2114:2153 (1%)
view
38 x 2 src
src
35:80 (29%)
48:93 (6%)
view
37 x 2 fbgemm_gpu/src
fbgemm_gpu/src
185:225 (9%)
346:386 (9%)
view
37 x 2 src
src
1661:1698 (1%)
2378:2415 (1%)
view
37 x 2 fbgemm_gpu/include/fbgemm_gpu
fbgemm_gpu/include/fbgemm_gpu
313:355 (1%)
432:474 (1%)
view
Duplicated Units
The list of top 23 duplicated units.
See data for all 23 unit duplicates...
Size#FoldersFilesLinesCode
345 x 2 src
src
2076:2446 
3103:3473 
view
326 x 2 src
src
1724:2075 
2751:3102 
view
307 x 2 src
src
1391:1723 
2418:2750 
view
288 x 2 src
src
1077:1390 
2104:2417 
view
269 x 2 src
src
782:1076 
1809:2103 
view
250 x 2 src
src
506:781 
1533:1808 
view
231 x 2 src
src
249:505 
1276:1532 
view
212 x 2 src
src
11:248 
1038:1275 
view
193 x 2 src
src
819:1037 
819:1037 
view
174 x 2 src
src
619:818 
619:818 
view
155 x 2 src
src
438:618 
438:618 
view
136 x 2 src
src
276:437 
276:437 
view
117 x 2 src
src
133:275 
133:275 
view
96 x 2 src
src
11:132 
11:132 
view
56 x 2 bench
bench
285:364 
321:400 
view
31 x 2 src
src
97:129 
104:136 
view
27 x 2 src
src
41:70 
67:96 
view
19 x 3 src
src
src
211:232 
725:746 
232:252 
view
16 x 3 src
src
src
189:208 
210:229 
189:208 
view
12 x 3 src
src
src
170:186 
191:207 
170:186 
view
9 x 2 bench
bench
100:111 
355:366 
view
8 x 7 bench
bench
bench
bench
bench
bench
bench
139:149 
326:336 
458:468 
333:343 
43:53 
540:550 
309:319 
view
8 x 2 bench
bench
29:38 
29:38 
view