pytorch / functorch
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 75 files with 12,229 lines of code.
    • 0 very long files (0 lines of code)
    • 5 long files (2,996 lines of code)
    • 16 medium size files (4,975 lines of codeclsfd_ftr_w_mp_ins)
    • 19 small files (2,956 lines of code)
    • 35 very small files (1,302 lines of code)
0% | 24% | 40% | 24% | 10%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
cpp0% | 33% | 45% | 14% | 5%
py0% | 13% | 31% | 41% | 13%
h0% | 0% | 44% | 13% | 41%
cfg0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
functorch/csrc0% | 30% | 45% | 14% | 9%
functorch/_src0% | 21% | 40% | 37% | <1%
benchmarks0% | 0% | 46% | 35% | 18%
benchmarks/transformer_fusion_patterns0% | 0% | 0% | 84% | 15%
codegen0% | 0% | 0% | 73% | 26%
op_analysis0% | 0% | 0% | 100% | 0%
notebooks/_src0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
functorch0% | 0% | 0% | 0% | 100%
functorch/compile0% | 0% | 0% | 0% | 100%
functorch/experimental0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
BatchRulesNorm.cpp
in functorch/csrc
720 15
top_operators_github_usage.py
in functorch/_src
610 1
PointwiseOperatorCompileCache.cpp
in functorch/csrc
584 28
BatchingRegistrations.cpp
in functorch/csrc
565 35
DynamicLayer.cpp
in functorch/csrc
517 29
BatchRulesScatterOps.cpp
in functorch/csrc
462 8
aot_autograd.py
in functorch/_src
430 28
eager_transforms.py
in functorch/_src
386 29
operator_authoring.py
in functorch/_src
360 24
BatchRulesConvolution.cpp
in functorch/csrc
347 4
BatchRulesHelper.h
in functorch/csrc
347 11
BatchRulesViews.cpp
in functorch/csrc
329 1
BatchRulesModules.cpp
in functorch/csrc
324 2
BatchRulesBinaryOps.cpp
in functorch/csrc
314 4
BatchedFallback.cpp
in functorch/csrc
276 12
BatchRulesReduceOps.cpp
in functorch/csrc
262 13
BatchRulesLoss.cpp
in functorch/csrc
249 6
CustomFunction.cpp
in functorch/csrc
242 12
operator_authoring.py
in benchmarks
220 11
BatchRulesDecompositions.cpp
in functorch/csrc
214 3
init.cpp
in functorch/csrc
213 24
decompositions.py
in functorch/_src
187 33
fx_minifier.py
in functorch/_src
187 6
make_functional.py
in functorch/_src
187 24
compilers.py
in functorch/_src
186 11
codegen_outofplacebatching.py
in codegen
185 19
CompileCache.cpp
in functorch/csrc
175 13
VmapTransforms.cpp
in functorch/csrc
173 14
pointwise_scorecard.py
in benchmarks
171 37
python_key.py
in functorch/_src
168 13
PyTorchOperatorHacks.cpp
in functorch/csrc
157 8
vmap.py
in functorch/_src
155 11
TensorWrapper.cpp
in functorch/csrc
154 13
BatchRulesLinearAlgebra.cpp
in functorch/csrc
149 4
gen_data.py
in op_analysis
141 8
benchmark.py
in benchmarks/transformer_fusion_patterns
124 8
BatchedTensorImpl.cpp
in functorch/csrc
124 10
benchmark_helper.py
in benchmarks/transformer_fusion_patterns
115 3
BatchRulesUnaryOps.cpp
in functorch/csrc
111 -
BatchingMetaprogramming.h
in functorch/csrc
107 1
setup.py
in root
99 3
BatchRulesHelper.cpp
in functorch/csrc
97 10
VmapModeRegistrations.cpp
in functorch/csrc
85 2
per_sample_grads.py
in benchmarks
71 3
BatchedTensorImpl.h
in functorch/csrc
71 7
__init__.py
in functorch
71 4
plot_jacobians_and_hessians.py
in notebooks/_src
66 3
plot_per_sample_gradients.py
in notebooks/_src
62 6
BatchRulesFactory.cpp
in functorch/csrc
58 1
BatchRulesPooling.cpp
in functorch/csrc
57 1
Files With Most Units (Top 20)
File# lines# units
pointwise_scorecard.py
in benchmarks
171 37
BatchingRegistrations.cpp
in functorch/csrc
565 35
decompositions.py
in functorch/_src
187 33
DynamicLayer.cpp
in functorch/csrc
517 29
eager_transforms.py
in functorch/_src
386 29
PointwiseOperatorCompileCache.cpp
in functorch/csrc
584 28
aot_autograd.py
in functorch/_src
430 28
init.cpp
in functorch/csrc
213 24
operator_authoring.py
in functorch/_src
360 24
make_functional.py
in functorch/_src
187 24
codegen_outofplacebatching.py
in codegen
185 19
BatchRulesNorm.cpp
in functorch/csrc
720 15
VmapTransforms.cpp
in functorch/csrc
173 14
CompileCache.cpp
in functorch/csrc
175 13
TensorWrapper.cpp
in functorch/csrc
154 13
BatchRulesReduceOps.cpp
in functorch/csrc
262 13
python_key.py
in functorch/_src
168 13
CustomFunction.cpp
in functorch/csrc
242 12
BatchedFallback.cpp
in functorch/csrc
276 12
operator_authoring.py
in benchmarks
220 11
Files With Long Lines (Top 18)

There are 18 files with lines longer than 120 characters. In total, there are 52 long lines.

File# lines# units# long lines
BatchRulesNorm.cpp
in functorch/csrc
720 15 15
BatchRulesViews.cpp
in functorch/csrc
329 1 7
BatchRulesConvolution.cpp
in functorch/csrc
347 4 6
BatchRulesHelper.h
in functorch/csrc
347 11 3
BatchingRegistrations.cpp
in functorch/csrc
565 35 3
aot_autograd.py
in functorch/_src
430 28 3
CustomFunction.cpp
in functorch/csrc
242 12 2
BatchRulesScatterOps.cpp
in functorch/csrc
462 8 2
VmapModeRegistrations.cpp
in functorch/csrc
85 2 2
BatchRulesDecompositions.cpp
in functorch/csrc
214 3 1
BatchRulesModules.cpp
in functorch/csrc
324 2 1
BatchRulesLinearAlgebra.cpp
in functorch/csrc
149 4 1
PyTorchOperatorHacks.cpp
in functorch/csrc
157 8 1
BatchedTensorImpl.h
in functorch/csrc
71 7 1
init.cpp
in functorch/csrc
213 24 1
BatchRulesReduceOps.cpp
in functorch/csrc
262 13 1
BatchRulesBinaryOps.cpp
in functorch/csrc
314 4 1
decompositions.py
in functorch/_src
187 33 1