tensorflow / swift-apis
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 284 files with 91,298 lines of code.
    • 13 very long files (57,060 lines of code)
    • 13 long files (8,217 lines of code)
    • 41 medium size files (13,098 lines of codeclsfd_ftr_w_mp_ins)
    • 44 small files (6,157 lines of code)
    • 173 very small files (6,766 lines of code)
62% | 9% | 14% | 6% | 7%
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
swift75% | 6% | 10% | 4% | 2%
inc100% | 0% | 0% | 0% | 0%
cc34% | 10% | 33% | 9% | 12%
cpp13% | 27% | 20% | 19% | 18%
h18% | 0% | 33% | 8% | 39%
py0% | 38% | 25% | 20% | 15%
cmake0% | 0% | 0% | 52% | 47%
proto0% | 0% | 0% | 0% | 100%
lds0% | 0% | 0% | 0% | 100%
c0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
Sources/TensorFlow76% | 8% | 8% | 4% | 2%
Sources/x1030% | 10% | 25% | 12% | 19%
Sources/CX1066% | 9% | 17% | 4% | 1%
Sources/Tensor0% | 0% | 100% | 0% | 0%
Sources/CX10Modules0% | 0% | 84% | 0% | 15%
Utilities/ReferenceImplementations0% | 0% | 0% | 63% | 36%
cmake/modules0% | 0% | 0% | 52% | 47%
ROOT0% | 0% | 0% | 0% | 100%
Utilities0% | 0% | 0% | 0% | 100%
Sources/CTensorFlow0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
RawOpsGenerated.swift
in Sources/TensorFlow/Bindings
21198 1
RawOpsDispatching.swift
in Sources/TensorFlow/Bindings
17954 -
xla_tensor_ops_wrapper_generated.cc.inc
in Sources/CX10
3827 304
Math.swift
in Sources/TensorFlow/Operators
1984 28
xrt_computation_client.cc
in Sources/x10/xla_client
1922 78
RawOpsManual.swift
in Sources/TensorFlow/X10/APIs
1742 -
RawOpsManual.swift
in Sources/x10/swift_bindings/apis
1742 -
tensor.cpp
in Sources/x10/xla_tensor
1278 99
RawOpsXLAGenerated.swift
in Sources/TensorFlow/X10
1128 -
RawOpsXLAGenerated.swift
in Sources/x10/swift_bindings
1128 -
aten_compat.h
in Sources/x10/xla_tensor
1077 43
LazyTensorOperation.swift
in Sources/TensorFlow/Core
1056 46
Basic.swift
in Sources/TensorFlow/Operators
1024 26
EagerExecution.swift
in Sources/TensorFlow/Bindings
791 -
NN.swift
in Sources/TensorFlow/Operators
765 22
tensor_util.cpp
in Sources/x10/xla_tensor
764 46
generate_wrappers.py
in Sources/TensorFlow/Bindings
724 40
xla_lower_util.cpp
in Sources/x10/xla_tensor
660 33
ShapedArray.swift
in Sources/TensorFlow/Core
636 9
Convolutional.swift
in Sources/TensorFlow/Layers
627 -
helpers.cpp
in Sources/x10/xla_tensor
574 42
xla_tensor_ops_wrapper.cc
in Sources/CX10
567 55
pooling.cpp
in Sources/x10/xla_tensor
536 24
Recurrent.swift
in Sources/TensorFlow/Layers
535 6
Tensor.swift
in Sources/TensorFlow/Core
521 4
RawOpsAugmented.swift
in Sources/TensorFlow/Bindings
517 -
Image.swift
in Sources/TensorFlow/Operators
478 14
generate_ops.py
in Sources/x10/swift_bindings
475 8
data_ops.cpp
in Sources/x10/xla_tensor
467 30
local_device.cc
in Sources/x10/xla_client
462 28
reduction.cpp
in Sources/x10/xla_tensor
426 26
XLATensor.swift
in Sources/TensorFlow/X10
424 12
XLATensor.swift
in Sources/x10/swift_bindings
424 12
Random.swift
in Sources/Tensor
423 1
Runtime.swift
in Sources/TensorFlow/Core
402 14
xla_tensor_wrapper.h
in Sources/CX10Modules/include
391 3
xla_tensor_wrapper.h
in Sources/CX10
391 3
Sequential.swift
in Sources/TensorFlow/Layers
387 -
MomentumBased.swift
in Sources/TensorFlow/Optimizers
383 -
Initializers.swift
in Sources/TensorFlow
371 -
Algorithms.swift
in Sources/TensorFlow/Epochs
370 11
TensorVisitorPlan.swift
in Sources/x10/swift_bindings/optimizers
348 18
xla_tensor_wrapper.cc
in Sources/CX10
334 26
tensor.h
in Sources/x10/xla_tensor
320 4
ir_dump_util.cpp
in Sources/x10/xla_tensor
313 18
Pooling.swift
in Sources/TensorFlow/Layers
307 -
TensorGroup.swift
in Sources/TensorFlow/Core
307 2
metrics.cc
in Sources/x10/xla_client
297 23
xrt_computation_client.h
in Sources/x10/xla_client
287 5
mesh_service.cc
in Sources/x10/xla_client
286 10
Files With Most Units (Top 20)
File# lines# units
xla_tensor_ops_wrapper_generated.cc.inc
in Sources/CX10
3827 304
tensor.cpp
in Sources/x10/xla_tensor
1278 99
xrt_computation_client.cc
in Sources/x10/xla_client
1922 78
xla_tensor_ops_wrapper.cc
in Sources/CX10
567 55
LazyTensorOperation.swift
in Sources/TensorFlow/Core
1056 46
tensor_util.cpp
in Sources/x10/xla_tensor
764 46
aten_compat.h
in Sources/x10/xla_tensor
1077 43
helpers.cpp
in Sources/x10/xla_tensor
574 42
generate_wrappers.py
in Sources/TensorFlow/Bindings
724 40
xla_lower_util.cpp
in Sources/x10/xla_tensor
660 33
util.h
in Sources/x10/xla_client
276 31
data_ops.cpp
in Sources/x10/xla_tensor
467 30
Math.swift
in Sources/TensorFlow/Operators
1984 28
local_device.cc
in Sources/x10/xla_client
462 28
Basic.swift
in Sources/TensorFlow/Operators
1024 26
reduction.cpp
in Sources/x10/xla_tensor
426 26
xla_tensor_wrapper.cc
in Sources/CX10
334 26
pooling.cpp
in Sources/x10/xla_tensor
536 24
ElementaryFunctions.swift
in Sources/TensorFlow/Core
151 23
metrics.cc
in Sources/x10/xla_client
297 23
Files With Long Lines (Top 3)

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

File# lines# units# long lines
xla_tensor_ops_wrapper_generated.cc.inc
in Sources/CX10
3827 304 3
Recurrent.swift
in Sources/TensorFlow/Layers
535 6 1
generate_ops.py
in Sources/x10/swift_bindings
475 8 1