pytorch / glow
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 445 files with 136,259 lines of code.
    • 29 very long files (73,734 lines of code)
    • 29 long files (19,501 lines of code)
    • 67 medium size files (20,912 lines of codeclsfd_ftr_w_mp_ins)
    • 89 small files (12,743 lines of code)
    • 231 very small files (9,369 lines of code)
54% | 14% | 15% | 9% | 6%
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
cpp63% | 16% | 11% | 5% | 2%
h22% | 3% | 22% | 25% | 26%
cl68% | 0% | 28% | 0% | 3%
py0% | 18% | 49% | 20% | 11%
c0% | 0% | 93% | 0% | 6%
proto0% | 0% | 100% | 0% | 0%
cmake0% | 0% | 0% | 34% | 65%
cfg0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
lib/Backends60% | 11% | 11% | 7% | 7%
torch_glow/src72% | 11% | 10% | 4% | 1%
lib/Importer92% | 0% | 6% | 0% | <1%
lib/Optimizer88% | 0% | 5% | 2% | 2%
lib/Graph79% | 6% | 9% | 3% | 2%
lib/LLVMIRCodeGen60% | 16% | 14% | 6% | 1%
include/glow25% | 4% | 21% | 26% | 22%
tools/ClassGen63% | 14% | 14% | 6% | <1%
lib/Exporter97% | 0% | 0% | 0% | 2%
lib/Partitioner53% | 27% | 0% | 19% | 0%
lib/Base0% | 68% | 22% | 5% | 3%
lib/Runtime0% | 64% | 30% | 0% | 5%
lib/Quantization0% | 76% | 0% | 23% | 0%
lib/Onnxifi0% | 55% | 23% | 5% | 15%
utils/scripts0% | 35% | 43% | 8% | 12%
lib/Flags0% | 100% | 0% | 0% | 0%
tools/loader0% | 22% | 57% | 9% | 11%
lib/IR0% | 37% | 27% | 25% | 10%
lib/Backend0% | 72% | 0% | 25% | 1%
lib/CodeGen0% | 100% | 0% | 0% | 0%
utils0% | 0% | 63% | 28% | 8%
inference_engines/x-inference-engines0% | 0% | 84% | 0% | 15%
tools/Debugger0% | 0% | 58% | 24% | 16%
torch_glow/utils0% | 0% | 73% | 0% | 26%
lib/ExecutionEngine0% | 0% | 100% | 0% | 0%
lib/Converter0% | 0% | 44% | 26% | 29%
lib/Support0% | 0% | 30% | 43% | 26%
cmake/modules0% | 0% | 0% | 34% | 65%
lib/ExecutionContext0% | 0% | 0% | 100% | 0%
lib/PassManager0% | 0% | 0% | 81% | 18%
torch_glow/torch_glow0% | 0% | 0% | 98% | 1%
torch_glow0% | 0% | 0% | 96% | 3%
tools/png2bin0% | 0% | 0% | 0% | 100%
tools/IncludeBin0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
PyTorchModelLoader.cpp
in torch_glow/src
8144 193
InterpreterNodes.cpp
in lib/Backends/Interpreter
6640 266
GraphOptimizer.cpp
in lib/Optimizer/GraphOptimizer
5576 119
ONNXModelLoader.cpp
in lib/Importer
5298 136
Graph.cpp
in lib/Graph
5267 94
libjit.cpp
in lib/LLVMIRCodeGen/libjit
3266 196
LLVMIRGen.cpp
in lib/LLVMIRCodeGen
3225 39
Importer.cpp
in lib/Backends/NNPI
2727 92
Nodes.cpp
in lib/Graph
2671 181
TFLiteModelLoader.cpp
in lib/Importer
2487 59
Caffe2ModelLoader.cpp
in lib/Importer
2451 21
NNPI.cpp
in lib/Backends/NNPI
2396 32
ShapeInferenceEngine.cpp
in torch_glow/src
2246 35
ONNXModelWriter.cpp
in lib/Exporter
2076 118
OpenCL.cpp
in lib/Backends/OpenCL
1658 31
cl
kernels.cl
in lib/Backends/OpenCL
1630 -
NodeGen.cpp
in tools/ClassGen
1504 1
CommonOperatorLoader.h
in include/glow/Importer
1462 56
Lower.cpp
in lib/Optimizer/Lower
1447 49
Partitioner.cpp
in lib/Partitioner
1334 16
CachingGraphRunner.cpp
in torch_glow/src
1318 20
InstrGen.cpp
in tools/ClassGen
1269 1
Habana.cpp
in lib/Backends/Habana
1192 23
NodeSplitting.cpp
in lib/Optimizer/GraphOptimizer
1138 19
Tensor.h
in include/glow/Base
1107 82
Graph.h
in include/glow/Graph
1086 15
Interpreter.cpp
in lib/Backends/Interpreter
1069 14
IROptimizer.cpp
in lib/Optimizer/IROptimizer
1033 47
GlowCompileSpec.h
in torch_glow/src
1017 54
HostManager.cpp
in lib/Runtime/HostManager
939 22
gen_tflite_models.py
in utils/scripts
910 37
FXIRImporter.cpp
in lib/Backends/NNPI
909 10
Tensor.cpp
in lib/Base
889 33
TorchGlowBackend.cpp
in torch_glow/src
844 22
Flags.cpp
in lib/Flags
783 1
Image.cpp
in lib/Base
756 23
PyTorchCommon.cpp
in torch_glow/src
751 22
Loader.cpp
in tools/loader
721 22
Type.h
in include/glow/Base
702 64
PartitionerUtils.cpp
in lib/Partitioner
697 20
NNPICompiledFunction.cpp
in lib/Backends/NNPI
691 15
Provisioner.cpp
in lib/Runtime/Provisioner
685 11
Quantization.cpp
in lib/Quantization
684 11
BundleSaver.cpp
in lib/LLVMIRCodeGen
656 14
OpenCLDeviceManager.cpp
in lib/Backends/OpenCL
649 21
IR.cpp
in lib/IR
626 48
LLVMBackend.cpp
in lib/LLVMIRCodeGen
626 8
NodeBuilder.cpp
in tools/ClassGen
614 22
TensorLayout.cpp
in lib/Graph
608 30
BackendUtils.cpp
in lib/Backend
564 25
Files With Most Units (Top 20)
File# lines# units
InterpreterNodes.cpp
in lib/Backends/Interpreter
6640 266
libjit.cpp
in lib/LLVMIRCodeGen/libjit
3266 196
PyTorchModelLoader.cpp
in torch_glow/src
8144 193
Nodes.cpp
in lib/Graph
2671 181
ONNXModelLoader.cpp
in lib/Importer
5298 136
GraphOptimizer.cpp
in lib/Optimizer/GraphOptimizer
5576 119
ONNXModelWriter.cpp
in lib/Exporter
2076 118
Graph.cpp
in lib/Graph
5267 94
Importer.cpp
in lib/Backends/NNPI
2727 92
Tensor.h
in include/glow/Base
1107 82
Type.h
in include/glow/Base
702 64
TFLiteModelLoader.cpp
in lib/Importer
2487 59
CommonOperatorLoader.h
in include/glow/Importer
1462 56
GlowCompileSpec.h
in torch_glow/src
1017 54
Lower.cpp
in lib/Optimizer/Lower
1447 49
IR.cpp
in lib/IR
626 48
GlowIValue.cpp
in torch_glow/src
486 48
IROptimizer.cpp
in lib/Optimizer/IROptimizer
1033 47
LLVMIRGen.cpp
in lib/LLVMIRCodeGen
3225 39
gen_tflite_models.py
in utils/scripts
910 37
Files With Long Lines (Top 7)

There are 7 files with lines longer than 120 characters. In total, there are 11 long lines.

File# lines# units# long lines
TorchGlowBackend.cpp
in torch_glow/src
844 22 4
FuseKnownPatterns.cpp
in torch_glow/src
508 17 2
cmake
GlowTestSupport.cmake
in cmake/modules
98 - 1
cmake
GlowExternalBackends.cmake
in cmake/modules
149 - 1
cmake
GlowSerialize.cmake
in cmake/modules
94 - 1
cmake
CoverageSupport.cmake
in cmake/modules
54 - 1
cmake
GlowAddLibjit.cmake
in cmake/modules
161 - 1