pytorch / FBGEMM
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 923 units with 35,533 lines of code in units (50.1% of code).
    • 6 very complex units (2,297 lines of code)
    • 27 complex units (5,165 lines of code)
    • 66 medium complex units (7,303 lines of code)
    • 98 simple units (5,235 lines of code)
    • 726 very simple units (15,533 lines of code)
6% | 14% | 20% | 14% | 43%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cc7% | 17% | 20% | 15% | 39%
h14% | 13% | 18% | 13% | 39%
cpp0% | 4% | 24% | 13% | 57%
py0% | 0% | 12% | 11% | 75%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src10% | 14% | 17% | 14% | 43%
bench0% | 29% | 32% | 19% | 17%
fbgemm_gpu/codegen0% | 10% | 23% | 4% | 61%
include/fbgemm0% | 14% | 20% | 7% | 57%
fbgemm_gpu/src0% | 0% | 24% | 17% | 57%
fbgemm_gpu/fbgemm_gpu0% | 0% | 8% | 27% | 63%
fbgemm_gpu0% | 0% | 47% | 21% | 31%
fbgemm_gpu/include/fbgemm_gpu0% | 0% | 0% | 17% | 82%
fbgemm_gpu/bench0% | 0% | 0% | 0% | 100%
fbgemm_gpu/bench/scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
413 89 1
354 86 11
463 86 11
265 61 6
400 57 2
402 51 6
258 42 6
268 41 4
222 41 8
223 39 11
223 38 8
238 38 10
623 36 14
114 36 5
124 36 15
213 35 8
199 35 8
74 35 5
187 34 6
142 33 6
148 33 4
205 30 6
162 30 12
206 29 6
104 29 13
182 28 8
255 27 3
85 27 5
324 26 0
44 26 1
104 26 5
118 26 6
120 26 6
104 25 4
101 25 15
98 24 11
106 23 11
388 22 0
127 22 10
164 22 11
206 22 9
128 22 12
72 21 3
163 21 4
150 20 13
76 20 16
114 19 2
75 19 1
285 19 9
137 18 6