microsoft / onnxruntime
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 3,423 files with 474,615 lines of code.
    • 51 very long files (88,917 lines of code)
    • 124 long files (85,122 lines of code)
    • 459 medium size files (139,035 lines of codeclsfd_ftr_w_mp_ins)
    • 541 small files (76,893 lines of code)
    • 2,248 very small files (84,648 lines of code)
18% | 17% | 29% | 16% | 17%
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
cc24% | 12% | 30% | 17% | 14%
h18% | 11% | 20% | 15% | 34%
py15% | 14% | 36% | 16% | 16%
proto68% | 6% | 3% | 10% | 10%
cpp13% | 29% | 35% | 9% | 11%
ts19% | 9% | 27% | 23% | 20%
cs40% | 18% | 15% | 10% | 15%
cmake30% | 18% | 23% | 19% | 8%
hpp70% | 0% | 16% | 6% | 6%
asm0% | 57% | 36% | 4% | 1%
S0% | 55% | 36% | 5% | 2%
cu0% | 25% | 34% | 26% | 12%
yml0% | 20% | 25% | 24% | 29%
c0% | 37% | 40% | 8% | 13%
inc0% | 19% | 46% | 18% | 14%
java0% | 17% | 43% | 22% | 16%
cuh0% | 0% | 47% | 31% | 20%
mm0% | 0% | 46% | 43% | 9%
cfg0% | 0% | 100% | 0% | 0%
ps10% | 0% | 0% | 45% | 55%
proj0% | 0% | 0% | 100% | 0%
html0% | 0% | 0% | 100% | 0%
tsx0% | 0% | 0% | 97% | 2%
cmd0% | 0% | 0% | 67% | 32%
hlsl0% | 0% | 0% | 47% | 52%
in0% | 0% | 0% | 0% | 100%
lds0% | 0% | 0% | 0% | 100%
props0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
spec0% | 0% | 0% | 0% | 100%
targets0% | 0% | 0% | 0% | 100%
Dockerfile0% | 0% | 0% | 0% | 100%
xaml0% | 0% | 0% | 0% | 100%
swift0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
onnxruntime20% | 19% | 29% | 14% | 16%
orttraining19% | 10% | 31% | 18% | 20%
js16% | 8% | 28% | 26% | 20%
csharp39% | 17% | 14% | 11% | 17%
cmake32% | 20% | 20% | 16% | 9%
tools10% | 13% | 22% | 27% | 25%
winml5% | 18% | 39% | 14% | 21%
include0% | 42% | 12% | 21% | 24%
java0% | 29% | 39% | 16% | 14%
server0% | 16% | 25% | 23% | 34%
ROOT0% | 0% | 99% | 0% | <1%
objectivec0% | 0% | 34% | 28% | 37%
cgmanifests0% | 0% | 0% | 0% | 100%
package0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
proto
NeuralNetwork.proto
in onnxruntime/core/providers/coreml/mlmodel_format
5706 -
d3dx12.h
in onnxruntime/core/providers/dml/DmlExecutionProvider/src/External/D3DX12
3674 296
graph.cc
in onnxruntime/core/graph
3285 99
training_op_defs.cc
in orttraining/orttraining/core/graph
3159 9
contrib_defs.cc
in onnxruntime/core/graph/contrib_ops
2912 11
ort.fbs.h
in onnxruntime/core/flatbuffers/schema
2645 272
GeneratedSchemaHelpers.h
in onnxruntime/core/providers/dml/DmlExecutionProvider/src/External/DirectMLHelpers
2341 157
DirectMLSchema.h
in onnxruntime/core/providers/dml/DmlExecutionProvider/src/External/DirectMLHelpers
2210 -
ApiTraits.h
in onnxruntime/core/providers/dml/DmlExecutionProvider/src/External/DirectMLHelpers
2182 4
onnxruntime_c_api.cc
in onnxruntime/core/session
2155 32
cuda_execution_provider.cc
in onnxruntime/core/providers/cuda
2150 19
op_builder.cc
in onnxruntime/core/providers/nnapi/nnapi_builtin/builders
2114 74
gsl-lite.hpp
in onnxruntime/gsl
2019 171
cpu_execution_provider.cc
in onnxruntime/core/providers/cpu
1966 8
ort-generated.ts
in js/web/lib/onnxjs/ort-schema
1921 241
rocm_execution_provider.cc
in onnxruntime/core/providers/rocm
1920 16
build.py
in tools/ci_build
1868 44
onnxops.py
in orttraining/orttraining/eager/opgen/opgen
1811 186
inference_session.cc
in onnxruntime/core/session
1790 66
symbolic_shape_infer.py
in onnxruntime/python/tools
1775 106
tensorrt_execution_provider.cc
in onnxruntime/core/providers/tensorrt
1718 27
onnx_converter.cc
in onnxruntime/core/providers/rknpu
1716 34
mlasi.h
in onnxruntime/core/mlas/lib
1658 2
MLOperatorAuthorImpl.cpp
in onnxruntime/core/providers/dml/DmlExecutionProvider/src
1614 76
element_wise_ops.cc
in onnxruntime/core/providers/cpu/math
1527 60
gradient_builder.cc
in orttraining/orttraining/core/graph
1524 2
training_session.cc
in orttraining/orttraining/core/session
1477 53
op_support_checker.cc
in onnxruntime/core/providers/nnapi/nnapi_builtin/builders
1438 75
OperatorHelper.cpp
in onnxruntime/core/providers/dml/OperatorAuthorHelper
1368 73
benchmark.py
in onnxruntime/python/tools/tensorrt/perf
1364 66
onnxruntime_pybind_state.cc
in onnxruntime/python
1343 22
provider_bridge_ort.cc
in onnxruntime/core/session
1300 341
transpose_optimizer.cc
in onnxruntime/core/optimizer/transpose_optimizer
1269 69
data_ops.cc
in onnxruntime/core/providers/openvino/ov_versions
1229 12
OperatorHelper.h
in onnxruntime/core/providers/dml/OperatorAuthorHelper
1223 14
attention_fusion_helper.h
in onnxruntime/core/optimizer
1198 17
pipeline_transformer.cc
in orttraining/orttraining/core/graph
1194 34
glsl-coordinate-lib.ts
in js/web/lib/onnxjs/backends/webgl
1185 61
OnnxruntimeEngine.cpp
in winml/lib/Api.Ort
1150 77
megatron_transformer.cc
in orttraining/orttraining/core/optimizer
1144 13
cmake
onnxruntime_unittests.cmake
in cmake
1138 -
cmake
onnxruntime_providers.cmake
in cmake
1133 -
migraphx_execution_provider.cc
in onnxruntime/core/providers/migraphx
1102 22
tensorprotoutils.cc
in onnxruntime/core/framework
1084 39
snchwc.cpp
in onnxruntime/core/mlas/lib
1069 8
Tensor.shared.cs
in csharp/src/Microsoft.ML.OnnxRuntime/Tensors
1057 47
data_types.cc
in onnxruntime/core/framework
1042 50
training_runner.cc
in orttraining/orttraining/models/runner
1024 19
session_state.cc
in onnxruntime/core/framework
1017 40
LabelMap.cs
in csharp/sample/Microsoft.ML.OnnxRuntime.ResNet50v2Sample
1006 -
Files With Most Units (Top 20)
File# lines# units
provider_bridge_ort.cc
in onnxruntime/core/session
1300 341
d3dx12.h
in onnxruntime/core/providers/dml/DmlExecutionProvider/src/External/D3DX12
3674 296
ort.fbs.h
in onnxruntime/core/flatbuffers/schema
2645 272
ort-generated.ts
in js/web/lib/onnxjs/ort-schema
1921 241
onnxops.py
in orttraining/orttraining/eager/opgen/opgen
1811 186
provider_wrappedtypes.h
in onnxruntime/core/providers/shared_library
783 176
gsl-lite.hpp
in onnxruntime/gsl
2019 171
GeneratedSchemaHelpers.h
in onnxruntime/core/providers/dml/DmlExecutionProvider/src/External/DirectMLHelpers
2341 157
provider_bridge_provider.cc
in onnxruntime/core/providers/shared_library
494 148
onnxruntime_cxx_inline.h
in include/onnxruntime/core/session
972 122
symbolic_shape_infer.py
in onnxruntime/python/tools
1775 106
graph.cc
in onnxruntime/core/graph
3285 99
reduction_ops.h
in onnxruntime/core/providers/cpu/reduction
643 89
element_wise_ops.h
in onnxruntime/core/providers/cpu/math
782 77
OnnxruntimeEngine.cpp
in winml/lib/Api.Ort
1150 77
MLOperatorAuthorImpl.cpp
in onnxruntime/core/providers/dml/DmlExecutionProvider/src
1614 76
op_support_checker.cc
in onnxruntime/core/providers/nnapi/nnapi_builtin/builders
1438 75
op_builder.cc
in onnxruntime/core/providers/nnapi/nnapi_builtin/builders
2114 74
data_types.h
in include/onnxruntime/core/framework
725 73
OperatorHelper.cpp
in onnxruntime/core/providers/dml/OperatorAuthorHelper
1368 73
Files With Long Lines (Top 20)

There are 1079 files with lines longer than 120 characters. In total, there are 10505 long lines.

File# lines# units# long lines
GeneratedSchemaHelpers.h
in onnxruntime/core/providers/dml/DmlExecutionProvider/src/External/DirectMLHelpers
2341 157 726
cuda_execution_provider.cc
in onnxruntime/core/providers/cuda
2150 19 715
rocm_execution_provider.cc
in onnxruntime/core/providers/rocm
1920 16 599
OperatorRegistration.cpp
in onnxruntime/core/providers/dml/DmlExecutionProvider/src/Operators
692 3 326
provider_bridge_ort.cc
in onnxruntime/core/session
1300 341 278
cuda_training_kernels.cc
in orttraining/orttraining/training_ops/cuda
404 1 220
rocm_training_kernels.cc
in orttraining/orttraining/training_ops/rocm
331 1 158
cpu_execution_provider.cc
in onnxruntime/core/providers/cpu
1966 8 154
NativeMethods.shared.cs
in csharp/src/Microsoft.ML.OnnxRuntime
1003 2 144
ApiTraits.h
in onnxruntime/core/providers/dml/DmlExecutionProvider/src/External/DirectMLHelpers
2182 4 125
contrib_defs.cc
in onnxruntime/core/graph/contrib_ops
2912 11 111
cmake
onnxruntime_providers.cmake
in cmake
1133 - 110
reduction_ops.cc
in onnxruntime/core/providers/rocm/reduction
871 7 105
reduction_ops.cc
in onnxruntime/core/providers/cuda/reduction
904 7 102
d3dx12.h
in onnxruntime/core/providers/dml/DmlExecutionProvider/src/External/D3DX12
3674 296 99
DirectMLSchema.h
in onnxruntime/core/providers/dml/DmlExecutionProvider/src/External/DirectMLHelpers
2210 - 98
data_ops.cc
in onnxruntime/core/providers/openvino/ov_versions
1229 12 89
provider_interfaces.h
in onnxruntime/core/providers/shared_library
608 4 89
provider_wrappedtypes.h
in onnxruntime/core/providers/shared_library
783 176 83
windowsai.yml
in tools/ci_build/github/azure-pipelines/nuget/templates
480 - 79