pytorch / tensorpipe
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
  • 18% duplication:
    • 17,001 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 3,213 duplicated lines
  • 311 duplicates
system18% (3,213 lines)
Duplication per Extension
cc24% (2,138 lines)
h13% (1,059 lines)
in76% (16 lines)
Duplication per Component (primary)
tensorpipe/channel32% (1,737 lines)
tensorpipe/transport26% (917 lines)
tensorpipe/benchmark30% (310 lines)
tensorpipe/common3% (146 lines)
tensorpipe/python17% (55 lines)
tensorpipe/core1% (32 lines)
tensorpipe69% (16 lines)
cmake0% (0 lines)
tensorpipe/misc0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G tensorpipe/channel tensorpipe/channel tensorpipe/transport tensorpipe/transport tensorpipe/channel--tensorpipe/transport 156

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 311 duplicates...
Size#FoldersFilesLinesCode
94 x 2 tensorpipe/channel/cma
tensorpipe/channel/xth
cc
channel_impl.cc
channel_impl.cc
111:231 (47%)
108:228 (48%)
view
72 x 2 tensorpipe/transport/ibv
tensorpipe/transport/shm
cc
listener_impl.cc
listener_impl.cc
52:152 (75%)
46:146 (80%)
view
60 x 2 tensorpipe/transport/ibv
tensorpipe/transport/shm
cc
connection_impl.cc
connection_impl.cc
158:265 (18%)
102:209 (28%)
view
47 x 2 tensorpipe/channel/cma
tensorpipe/channel/xth
channel_impl.h
channel_impl.h
58:117 (67%)
57:116 (68%)
view
42 x 2 tensorpipe/channel/cuda_xth
tensorpipe/channel/xth
channel_impl.h
channel_impl.h
84:138 (47%)
58:112 (60%)
view
42 x 2 tensorpipe/channel/cma
tensorpipe/channel/cuda_xth
channel_impl.h
channel_impl.h
59:113 (60%)
84:138 (47%)
view
34 x 2 tensorpipe/channel/cuda_xth
tensorpipe/channel/xth
cc
channel_impl.cc
channel_impl.cc
159:201 (14%)
108:150 (17%)
view
34 x 2 tensorpipe/channel/cma
tensorpipe/channel/cuda_xth
cc
channel_impl.cc
channel_impl.cc
111:153 (17%)
159:201 (14%)
view
31 x 2 tensorpipe/channel/basic
tensorpipe/channel/cma
cc
channel_impl.cc
channel_impl.cc
95:139 (25%)
137:181 (15%)
view
31 x 2 tensorpipe/channel/basic
tensorpipe/channel/xth
cc
channel_impl.cc
channel_impl.cc
95:139 (25%)
134:178 (16%)
view
30 x 2 tensorpipe/channel/cma
tensorpipe/channel/xth
cc
channel_impl.cc
channel_impl.cc
246:286 (15%)
241:281 (15%)
view
29 x 2 tensorpipe/channel/mpt
tensorpipe/channel/xth
cc
channel_impl.cc
channel_impl.cc
230:270 (11%)
138:178 (15%)
view
29 x 2 tensorpipe/channel/cma
tensorpipe/channel/mpt
cc
channel_impl.cc
channel_impl.cc
141:181 (14%)
230:270 (11%)
view
29 x 2 tensorpipe/channel/basic
tensorpipe/channel/mpt
cc
channel_impl.cc
channel_impl.cc
99:139 (23%)
230:270 (11%)
view
28 x 2 tensorpipe/channel/cma
tensorpipe/channel/xth
cc
channel_impl.cc
channel_impl.cc
66:106 (14%)
65:105 (14%)
view
28 x 2 tensorpipe/channel/cuda_xth
tensorpipe/channel/xth
cc
channel_impl.cc
channel_impl.cc
111:151 (12%)
65:105 (14%)
view
28 x 2 tensorpipe/channel/cma
tensorpipe/channel/cuda_xth
cc
channel_impl.cc
channel_impl.cc
66:106 (14%)
111:151 (12%)
view
27 x 2 tensorpipe/channel/basic
tensorpipe/channel/xth
cc
channel_impl.cc
channel_impl.cc
36:72 (21%)
50:87 (13%)
view
27 x 2 tensorpipe/channel/cuda_xth
tensorpipe/channel/xth
cc
channel_impl.cc
channel_impl.cc
211:248 (11%)
157:192 (13%)
view
27 x 2 tensorpipe/channel/cma
tensorpipe/channel/cuda_xth
cc
channel_impl.cc
channel_impl.cc
160:195 (13%)
211:248 (11%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 20 unit duplicates...
Size#FoldersFilesLinesCode
42 x 2 tensorpipe/channel/xth
tensorpipe/channel/cma
cc
channel_impl.cc
channel_impl.cc
160:214 
163:217 
view
41 x 2 tensorpipe/transport/shm
tensorpipe/transport/ibv
cc
listener_impl.cc
listener_impl.cc
103:147 
109:153 
view
32 x 2 tensorpipe/transport/shm
tensorpipe/transport/ibv
cc
connection_impl.cc
connection_impl.cc
160:206 
216:262 
view
23 x 3 tensorpipe/channel/xth
tensorpipe/channel/cma
tensorpipe/channel/cuda_xth
cc
channel_impl.cc
channel_impl.cc
channel_impl.cc
68:99 
69:100 
114:145 
view
22 x 2 tensorpipe/benchmark
tensorpipe/benchmark
cc
benchmark_transport.cc
benchmark_pipe.cc
30:52 
109:131 
view
16 x 3 tensorpipe/channel/xth
tensorpipe/channel/cma
tensorpipe/channel/cuda_xth
cc
channel_impl.cc
channel_impl.cc
channel_impl.cc
119:136 
122:139 
170:187 
view
11 x 3 tensorpipe/channel/xth
tensorpipe/channel/mpt
tensorpipe/channel/basic
cc
channel_impl.cc
channel_impl.cc
channel_impl.cc
54:66 
157:169 
40:52 
view
11 x 4 tensorpipe/channel/xth
tensorpipe/channel/mpt
tensorpipe/channel/basic
tensorpipe/channel/cma
cc
channel_impl.cc
channel_impl.cc
channel_impl.cc
channel_impl.cc
146:158 
238:250 
107:119 
149:161 
view
11 x 3 tensorpipe/channel/xth
tensorpipe/channel/cma
tensorpipe/channel/cuda_xth
cc
channel_impl.cc
channel_impl.cc
channel_impl.cc
260:272 
265:277 
303:315 
view
10 x 2 tensorpipe/transport/shm
tensorpipe/transport/ibv
cc
listener_impl.cc
listener_impl.cc
75:86 
81:92 
view
10 x 2 tensorpipe/transport/shm
tensorpipe/transport/ibv
cc
connection_impl.cc
connection_impl.cc
113:126 
169:182 
view
7 x 2 tensorpipe/python
tensorpipe/python
cc
tensorpipe.cc
tensorpipe.cc
141:148 
160:167 
view
6 x 2 tensorpipe/transport/shm
tensorpipe/transport/ibv
cc
connection_impl.cc
connection_impl.cc
128:137 
184:193 
view
6 x 2 tensorpipe/transport/shm
tensorpipe/transport/ibv
cc
connection_impl.cc
connection_impl.cc
139:148 
195:204 
view
6 x 8 tensorpipe/transport
tensorpipe/transport
tensorpipe/transport
tensorpipe/core
tensorpipe/core
tensorpipe/core
tensorpipe/channel
tensorpipe/channel
connection_impl_boilerplate.h
context_impl_boilerplate.h
listener_impl_boilerplate.h
listener_impl.cc
pipe_impl.cc
context_impl.cc
channel_impl_boilerplate.h
context_impl_boilerplate.h
439:448 
222:231 
251:260 
194:203 
621:630 
225:234 
269:278 
210:219 
view
6 x 2 tensorpipe/transport
tensorpipe/core
context_impl_boilerplate.h
context_impl.cc
165:171 
173:179 
view
6 x 3 tensorpipe/channel/xth
tensorpipe/channel/cma
tensorpipe/channel/cuda_xth
cc
channel_impl.cc
channel_impl.cc
channel_impl.cc
274:282 
279:287 
317:325 
view
6 x 5 tensorpipe/channel/xth
tensorpipe/channel/cuda_ipc
tensorpipe/channel/cuda_gdr
tensorpipe/channel/cma
tensorpipe/channel/cuda_xth
cc
context_impl.cc
context_impl.cc
context_impl.cc
context_impl.cc
context_impl.cc
55:61 
293:299 
668:674 
311:317 
82:88 
view
6 x 2 tensorpipe/channel/cuda_ipc
tensorpipe/channel/cuda_basic
cc
channel_impl.cc
channel_impl.cc
309:317 
318:326 
view
6 x 2 tensorpipe/channel/cuda_ipc
tensorpipe/channel/cuda_basic
cc
channel_impl.cc
channel_impl.cc
469:477 
594:602 
view