File Complexity Overall
  • There are 57 files with units, with 10,143 lines of code.
    • 1 very complex files (McCabe index sum 251+; 568 lines of code)
    • 3 complex files (McCabe index sum 126-250; 2,061 lines of code)
    • 7 medium complex files (McCabe index sum 51-125; 2,380 lines of code)
    • 6 slightly complex files (McCabe index sum 26-50; 1,333 lines of code)
    • 40 simple files (McCabe index sum 1-25; 3,801 lines of code)
  • 6 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system5% | 20% | 23% | 13% | 37%
Legend:
251+
126-250
51-125
26-50
1-25


explore: grouped by folders | grouped by complexity
File Complexity per Extension
251+
126-250
51-125
26-50
1-25
hpp6% | 15% | 23% | 16% | 37%
py0% | 41% | 22% | 0% | 36%
cpp0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
csrc17% | 0% | 0% | 20% | 62%
deep_gemm0% | 31% | 30% | 10% | 27%
scripts0% | 0% | 100% | 0% | 0%
Most Complex Files (Top 50)

The McCabe index of a file grows with its size: per 100 lines tells a large but plain file from a dense one, and most complex unit whether the complexity sits in one unit or is spread over many.

File# lines# unitsMcCabe index
(sum)
per 100
lines
most complex
unit
heuristics.hpp
in csrc/jit_kernels
568 15 263 46 80
bench.py
in deep_gemm/testing
779 59 232 30 20
mega_moe.hpp
in deep_gemm/include/deep_gemm
913 8 167 18 57
fp8_dequant_gemm.hpp
in deep_gemm/include/deep_gemm
369 3 136 37 128
generate_pyi.py
in scripts
248 16 121 49 25
mqa_logits.hpp
in deep_gemm/include/deep_gemm
648 12 104 16 64
fp8_gemm.hpp
in deep_gemm/include/deep_gemm
234 1 103 44 103
transform_sf.hpp
in deep_gemm/include/deep_gemm
562 15 101 18 35
copy.hpp
in deep_gemm/include/deep_gemm/ascend
357 21 65 18 22
bf16_gemm.hpp
in deep_gemm/include/deep_gemm
158 1 61 39 61
msprof_mega_moe.py
in scripts/profiling
173 3 52 30 35
gemm.hpp
in csrc/apis
482 11 45 9 22
mega_moe.hpp
in deep_gemm/include/deep_gemm/comm
224 9 42 19 21
layout.hpp
in csrc/utils
180 10 37 21 11
paged_mqa_logits_metadata.hpp
in deep_gemm/include/deep_gemm/scheduler
158 7 35 22 15
scheduler.hpp
in deep_gemm/include/deep_gemm
161 11 34 21 13
paged_mqa_logits.hpp
in deep_gemm/include/deep_gemm/scheduler
128 14 28 22 7
einsum.hpp
in csrc/apis
142 5 21 15 6
__init__.py
in deep_gemm/mega
146 10 21 14 5
common.hpp
in deep_gemm/include/deep_gemm
141 15 20 14 3
transform_sf.hpp
in csrc/jit_kernels
92 1 19 21 19
sync.hpp
in deep_gemm/include/deep_gemm/ascend
66 10 19 29 2
mega_moe.hpp
in deep_gemm/include/deep_gemm/scheduler
90 4 19 21 15
disable_fallback.py
in deep_gemm/testing
56 3 18 32 10
aclnn.hpp
in csrc/apis
195 4 17 9 6
layout.hpp
in csrc/apis
99 5 17 17 6
epilogue_class.hpp
in csrc/jit_kernels
80 13 17 21 4
mega_moe.hpp
in deep_gemm/include/deep_gemm/simd
161 3 17 11 9
jit.hpp
in csrc/jit
71 12 16 23 2
mega_moe.hpp
in deep_gemm/include/deep_gemm/layout
192 13 15 8 2
operators.hpp
in deep_gemm/include/deep_gemm/epilogue
128 6 15 12 5
epilogue.hpp
in deep_gemm/include/deep_gemm
93 4 15 16 9
mega_moe.hpp
in csrc/apis
198 6 14 7 4
gemm_config.hpp
in csrc/jit_kernels
122 5 14 11 4
attention.hpp
in csrc/apis
195 5 13 7 6
mqa_logits.hpp
in csrc/jit_kernels
178 4 12 7 5
tile_ptr.hpp
in deep_gemm/include/deep_gemm/ascend
77 12 12 16 1
mqa_logits.hpp
in deep_gemm/include/deep_gemm/scheduler
66 8 11 17 3
par_compile.py
in deep_gemm/testing
32 2 9 28 8
hccl.hpp
in csrc/backends
182 2 8 4 5
fp8_gemm.hpp
in csrc/jit_kernels
140 2 8 6 4
hc_prenorm.py
in deep_gemm/tilelang_ops
333 3 8 2 4
sym_buffer.hpp
in deep_gemm/include/deep_gemm/layout
36 4 7 19 3
envs.py
in deep_gemm/testing
38 3 6 16 3
fp8_dequant_gemm.hpp
in csrc/jit_kernels
78 1 5 6 5
locality_domain.py
in deep_gemm
11 5 5 45 1
runtime.hpp
in csrc/apis
62 1 4 6 4
math.hpp
in deep_gemm/include/deep_gemm/utils
18 1 4 22 4
bf16_gemm.hpp
in csrc/jit_kernels
70 1 3 4 3
sleep.hpp
in deep_gemm/include/deep_gemm
12 1 3 25 3
About This Analysis
  • File complexity is the sum of the McCabe indexes (conditional complexity) of the units (methods, functions...) in a file.
  • Files are classified in five categories based on that sum: 1-25 (simple files), 26-50 (slightly complex files), 51-125 (medium complex files), 126-250 (complex files), 251+ (very complex files). The default bands are five times the unit complexity bands, as a file is a group of units.
  • Only main code files with units are classified. Files without units (languages without unit analysis, or files without functions) have no complexity to measure and are left out rather than counted as simple.
  • A very complex file holds many decisions, which often means it has too many responsibilities: a candidate to split, and a place where changes need more testing.
Learn more...