pytorch / xla
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 403 files with 35,965 lines of code.
    • 4 very long files (8,155 lines of code)
    • 9 long files (6,811 lines of code)
    • 18 medium size files (5,195 lines of codeclsfd_ftr_w_mp_ins)
    • 26 small files (3,727 lines of code)
    • 346 very small files (12,077 lines of code)
22% | 18% | 14% | 10% | 33%
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
cpp33% | 19% | 12% | 7% | 27%
py0% | 21% | 27% | 27% | 23%
h0% | 17% | 4% | 7% | 70%
yaml0% | 0% | 81% | 0% | 18%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
torch_xla/csrc27% | 18% | 11% | 7% | 35%
torch_xla/core0% | 46% | 35% | 8% | 8%
torch_xla/distributed0% | 38% | 39% | 15% | 6%
ROOT0% | 0% | 100% | 0% | 0%
torch_xla/utils0% | 0% | 30% | 23% | 45%
scripts0% | 0% | 0% | 66% | 33%
torch_xla/debug0% | 0% | 0% | 57% | 42%
contrib/scripts0% | 0% | 0% | 100% | 0%
torch_xla/amp0% | 0% | 0% | 0% | 100%
torch_xla0% | 0% | 0% | 0% | 100%
docker0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
aten_xla_type.cpp
in torch_xla/csrc
3152 296
tensor_methods.cpp
in torch_xla/csrc
2517 323
tensor.cpp
in torch_xla/csrc
1379 110
init_python_bindings.cpp
in torch_xla/csrc
1107 45
tensor_util.cpp
in torch_xla/csrc
950 56
tensor.h
in torch_xla/csrc
942 4
ops.cpp
in torch_xla/csrc/ops
884 59
xla_op_builder.cpp
in torch_xla/csrc
813 62
xla_lower_util.cpp
in torch_xla/csrc
789 38
xla_builder.py
in torch_xla/core
643 125
pooling.cpp
in torch_xla/csrc
621 28
helpers.cpp
in torch_xla/csrc
592 44
xla_dist.py
in torch_xla/distributed
577 20
xla_model.py
in torch_xla/core
494 59
reduction.cpp
in torch_xla/csrc
479 28
data_ops.cpp
in torch_xla/csrc
436 26
xla_native_functions.yaml
in root
334 -
cluster.py
in torch_xla/distributed
329 22
index_ops.cpp
in torch_xla/csrc/ops
285 16
aten_xla_bridge.cpp
in torch_xla/csrc
276 29
xla_multiprocessing.py
in torch_xla/distributed
268 30
convolution.cpp
in torch_xla/csrc
252 10
setup.py
in root
249 12
helpers.h
in torch_xla/csrc
246 18
elementwise.cpp
in torch_xla/csrc
233 22
ir_dump_util.cpp
in torch_xla/csrc
230 14
ir.cpp
in torch_xla/csrc
228 24
tensor_ops.cpp
in torch_xla/csrc
225 10
utils.py
in torch_xla/utils
216 37
nms_op.cpp
in torch_xla/csrc
214 4
view.cpp
in torch_xla/csrc
201 7
op_by_op_executor.cpp
in torch_xla/csrc
195 7
debug_run.py
in scripts
193 24
random.cpp
in torch_xla/csrc
187 7
ir.h
in torch_xla/csrc
180 13
cross_replica_reduces.cpp
in torch_xla/csrc
170 9
gcsfs.py
in torch_xla/utils
167 37
metrics_compare.py
in scripts
163 15
lowering_context.cpp
in torch_xla/csrc
162 12
layout_manager.cpp
in torch_xla/csrc
161 10
model_comparator.py
in torch_xla/debug
161 11
grab_graphs.py
in scripts
153 9
nll_loss.cpp
in torch_xla/csrc
153 5
ops.h
in torch_xla/csrc/ops
142 6
grab_metrics.py
in scripts
133 10
tensor_impl.cpp
in torch_xla/csrc
131 21
aten_autograd_ops.cpp
in torch_xla/csrc
128 5
env-setup.py
in contrib/scripts
126 8
matrix.cpp
in torch_xla/csrc
126 8
parallel_loader.py
in torch_xla/distributed
126 18
Files With Most Units (Top 20)
File# lines# units
tensor_methods.cpp
in torch_xla/csrc
2517 323
aten_xla_type.cpp
in torch_xla/csrc
3152 296
xla_builder.py
in torch_xla/core
643 125
tensor.cpp
in torch_xla/csrc
1379 110
xla_op_builder.cpp
in torch_xla/csrc
813 62
ops.cpp
in torch_xla/csrc/ops
884 59
xla_model.py
in torch_xla/core
494 59
tensor_util.cpp
in torch_xla/csrc
950 56
init_python_bindings.cpp
in torch_xla/csrc
1107 45
helpers.cpp
in torch_xla/csrc
592 44
xla_lower_util.cpp
in torch_xla/csrc
789 38
gcsfs.py
in torch_xla/utils
167 37
utils.py
in torch_xla/utils
216 37
xla_multiprocessing.py
in torch_xla/distributed
268 30
aten_xla_bridge.cpp
in torch_xla/csrc
276 29
reduction.cpp
in torch_xla/csrc
479 28
pooling.cpp
in torch_xla/csrc
621 28
data_ops.cpp
in torch_xla/csrc
436 26
debug_run.py
in scripts
193 24
ir.cpp
in torch_xla/csrc
228 24
Files With Long Lines (Top 5)

There are 5 files with lines longer than 120 characters. In total, there are 8 long lines.

File# lines# units# long lines
metrics_compare_utils.py
in torch_xla/debug
101 6 4
cloudbuild.yaml
in docker
43 - 1
debug_cloudbuild.yaml
in docker
33 - 1
setup.py
in root
249 12 1
xrt_run_server.py
in torch_xla/core
64 2 1