File Complexity Overall
  • There are 62 files with units, with 10,108 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 1 complex files (McCabe index sum 126-250; 618 lines of code)
    • 4 medium complex files (McCabe index sum 51-125; 1,725 lines of code)
    • 9 slightly complex files (McCabe index sum 26-50; 1,762 lines of code)
    • 48 simple files (McCabe index sum 1-25; 6,003 lines of code)
  • 66 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 6% | 17% | 17% | 59%
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
py0% | 31% | 18% | 12% | 37%
hpp0% | 0% | 16% | 18% | 64%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
scripts0% | 63% | 36% | 0% | 0%
csrc0% | 0% | 16% | 18% | 64%
deep_gemm0% | 0% | 0% | 24% | 75%
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
generate_pyi.py
in scripts
618 19 203 33 40
runtime_utils.hpp
in csrc/jit_kernels/impls
352 19 83 24 8
gemm.hpp
in csrc/apis
806 29 77 10 9
360 11 66 18 11
sm100.hpp
in csrc/jit_kernels/heuristics
207 8 60 29 35
sm90.hpp
in csrc/jit_kernels/heuristics
166 6 42 25 24
einsum.hpp
in csrc/apis
241 8 40 17 9
math.py
in deep_gemm/utils
136 15 37 27 6
smxx_layout.hpp
in csrc/jit_kernels/impls
255 7 32 13 11
attention.hpp
in csrc/apis
389 10 31 8 10
bench.py
in deep_gemm/testing
102 6 31 30 23
layout.hpp
in csrc/utils
138 12 30 22 8
mega_gate.hpp
in csrc/jit_kernels/heuristics
146 7 29 20 15
mega_moe.hpp
in csrc/jit_kernels/heuristics
189 7 28 15 11
127 17 25 20 3
epilogue_class.hpp
in csrc/jit_kernels/impls
89 20 23 26 4
__init__.py
in deep_gemm/mega
179 8 23 13 7
smxx_cublaslt.hpp
in csrc/jit_kernels/impls
181 8 21 12 5
sm100_sparse_mqa_logits.hpp
in csrc/jit_kernels/impls
183 4 21 11 13
layout.hpp
in csrc/apis
108 4 20 19 9
sm100_mqa_logits.hpp
in csrc/jit_kernels/impls
314 12 19 6 4
a_fused_m_grouped_gemm.py
in deep_gemm/legacy
73 3 19 26 13
a_fused_k_grouped_gemm.py
in deep_gemm/legacy
73 2 18 25 13
b_fused_k_grouped_gemm.py
in deep_gemm/legacy
72 2 18 25 13
config.hpp
in csrc/jit_kernels/heuristics
155 9 17 11 3
m_grouped_gemm.py
in deep_gemm/legacy
68 3 17 25 10
mlopart.py
in deep_gemm/utils
97 10 17 18 4
mega_mhc.hpp
in csrc/apis
208 3 16 8 13
sm100_fp8_fp4_gemm_1d1d.hpp
in csrc/jit_kernels/impls
501 8 15 3 4
mega_moe.hpp
in csrc/apis
330 5 14 4 6
runtime.hpp
in csrc/runtime
69 8 14 20 3
sm100_mega_mhc.hpp
in csrc/jit_kernels/impls
129 1 12 9 12
sm100_fp8_fp4_mega_moe.hpp
in csrc/jit_kernels/impls
201 1 12 6 12
locality_domain.hpp
in csrc/runtime
87 7 11 13 3
runtime.hpp
in csrc/jit_kernels/heuristics
49 10 11 22 2
sm100_bf16_gemm.hpp
in csrc/jit_kernels/impls
396 7 11 3 4
sm90_bf16_gemm.hpp
in csrc/jit_kernels/impls
391 7 11 3 4
dist.py
in deep_gemm/utils
53 3 11 21 6
numeric.py
in deep_gemm/testing
37 3 10 27 4
48 2 8 17 7
sm100_bf16_mega_moe.hpp
in csrc/jit_kernels/impls
136 1 8 6 8
sm90_fp8_gemm_1d2d.hpp
in csrc/jit_kernels/impls
312 5 8 3 4
utils.hpp
in csrc/jit_kernels/heuristics
23 2 7 30 4
sm100_bf16_mega_gate.hpp
in csrc/jit_kernels/impls
75 1 7 9 7
sm90_fp8_mqa_logits.hpp
in csrc/jit_kernels/impls
205 3 7 3 4
utils.py
in deep_gemm/testing
32 3 6 19 3
mlopart.hpp
in csrc/runtime
29 5 5 17 1
common.hpp
in csrc/jit_kernels/heuristics
45 1 5 11 5
sm100_tf32_hc_prenorm_gemm.hpp
in csrc/jit_kernels/impls
95 1 5 5 5
sm90_fp8_gemm_1d1d.hpp
in csrc/jit_kernels/impls
200 3 5 3 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...