File Complexity Overall
  • There are 36 files with units, with 11,055 lines of code.
    • 0 very complex files (McCabe index sum 251+; 0 lines of code)
    • 1 complex files (McCabe index sum 126-250; 1,440 lines of code)
    • 3 medium complex files (McCabe index sum 51-125; 3,321 lines of code)
    • 5 slightly complex files (McCabe index sum 26-50; 2,293 lines of code)
    • 27 simple files (McCabe index sum 1-25; 4,001 lines of code)
  • 61 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system0% | 13% | 30% | 20% | 36%
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
h0% | 58% | 0% | 9% | 32%
hpp0% | 0% | 47% | 29% | 23%
cpp0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
csrc0% | 13% | 31% | 21% | 33%
flash_mla0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 36)

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
kernel_body.h
in csrc/ascend_kernels/prefill/sparse
1440 16 196 14 108
sm100_fmha_bwd_kernel_tma_warpspecialized.hpp
in csrc/cuda_kernels/sm100/prefill/dense/kernel
1416 16 108 8 35
sm100_fmha_bwd_mla_kernel_tma_warpspecialized.hpp
in csrc/cuda_kernels/sm100/prefill/dense/kernel
1414 16 107 8 35
sm100_fmha_fwd_kernel_tma_warpspecialized.hpp
in csrc/cuda_kernels/sm100/prefill/dense/kernel
491 11 82 17 60
fmha_fusion.hpp
in csrc/cuda_kernels/sm100/prefill/dense/collective
277 21 47 17 8
sm100_fmha_mla_fwd_mainloop_tma_warpspecialized.hpp
in csrc/cuda_kernels/sm100/prefill/dense/collective
814 20 41 5 3
sm100_fmha_fwd_mainloop_tma_warpspecialized.hpp
in csrc/cuda_kernels/sm100/prefill/dense/collective
805 20 40 5 3
common.h
in csrc/api
223 14 35 16 8
pipeline_mla.hpp
in csrc/cuda_kernels/sm100/prefill/dense/common
174 12 28 16 7
462 6 24 5 16
common_subroutine.h
in csrc/cuda_kernels/sm100
168 5 23 14 10
fmha_kernel_bwd_convert.hpp
in csrc/cuda_kernels/sm100/prefill/dense/kernel
100 8 18 18 6
396 9 17 4 6
fmha_kernel_bwd_sum_OdO.hpp
in csrc/cuda_kernels/sm100/prefill/dense/kernel
106 7 17 16 10
195 6 15 8 10
sm100_fmha_mla_load_tma_warpspecialized.hpp
in csrc/cuda_kernels/sm100/prefill/dense/collective
220 5 13 6 4
sm100_fmha_fwd_epilogue_tma_warpspecialized.hpp
in csrc/cuda_kernels/sm100/prefill/dense/collective
148 6 12 8 3
321 11 12 4 2
fmha_common.hpp
in csrc/cuda_kernels/sm100/prefill/dense/collective
84 5 11 13 5
sm100_fmha_load_tma_warpspecialized.hpp
in csrc/cuda_kernels/sm100/prefill/dense/collective
205 4 11 5 4
config.h
in csrc/cuda_kernels/sm100/prefill/sparse/fused_norm_rope_attn_rope_cast_fwd/core_attn
198 4 11 6 5
fmha_causal_tile_scheduler.hpp
in csrc/cuda_kernels/sm100/prefill/dense/kernel
117 8 10 9 2
fmha_tile_scheduler.hpp
in csrc/cuda_kernels/sm100/prefill/dense/kernel
96 8 9 9 2
helpers.h
in csrc/cuda_kernels/sm100
196 9 9 5 1
45 2 9 20 7
fmha.hpp
in csrc/cuda_kernels/sm100/prefill/dense/device
168 3 8 5 4
gather_tensor.hpp
in csrc/cuda_kernels/sm100/prefill/dense/common
142 3 7 5 4
kv_cache_format.h
in csrc/cuda_kernels
45 2 6 13 3
utils.h
in csrc/cuda_kernels
37 4 4 11 1
pow_2.hpp
in csrc/cuda_kernels/sm100/prefill/dense/common
45 3 4 9 2
fast_div_mod.h
in csrc/ascend_kernels/prefill/sparse
28 2 4 14 3
77 4 4 5 1
fmha_device_bwd.hpp
in csrc/cuda_kernels/sm100/prefill/dense/device
237 3 3 1 1
config.h
in csrc/ascend_kernels/prefill/sparse
139 1 2 1 2
dense_fwd.cpp
in csrc/api
13 1 1 8 1
dense_bwd.cpp
in csrc/api
13 1 1 8 1
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...