Open-Source Wikis

/

TensorFlow

/

Lore

tensorflow/tensorflow

Lore

A narrative history of TensorFlow's source tree, derived from git log, release tags, and RELEASE.md. Dates are approximate where exact ones aren't available.

Eras

The graph era (Nov 2015 – Sep 2019)

The first commit is dated 2015-11-06 with the message "TensorFlow: Initial commit of TensorFlow library." TensorFlow 1.x was a static-graph framework: users built a tf.Graph, then ran it inside a tf.Session. The Python API was thin; most logic lived in C++ under tensorflow/core/.

Early milestones:

  • Nov 2015: v0.5.0 — initial public release.
  • Apr 2016: v0.7.0 — distributed runtime (tensorflow/core/distributed_runtime/) introduced.
  • Feb 2017: v1.0.0 — API stability promise; tf.estimator introduced.
  • Nov 2017: TFLite (tensorflow/lite/) lands as tensorflow/contrib/lite/ and is later promoted out of contrib/.
  • Late 2017: XLA bridge (tensorflow/compiler/) becomes increasingly visible — tf2xla, jit, aot.
  • 2017–2018: tensorflow/contrib/ peaks; it housed dozens of community-contributed modules.

The eager-and-2.0 era (Oct 2018 – 2020)

Eager execution was added to TensorFlow 1.5 (Jan 2018) but became the default in TensorFlow 2.0 (Sep 2019). The framework pivoted from "build a graph then run it" to "run ops eagerly, optionally trace into a @tf.function for graph-mode performance."

  • Apr 2019: tf.distribute.Strategy API introduced for multi-device training (tensorflow/python/distribute/).
  • Sep 2019: v2.0.0 — eager-by-default, AutoGraph (tensorflow/python/autograph/) integrated, tf.function, Keras (tf.keras) becomes the recommended high-level API.
  • 2019: tensorflow/contrib/ is deleted in v2.0 — the community-extension dumping ground was the largest single-release deletion in the project's history. The directory of ~700 contrib modules became part of either the core, separate repos under tensorflow/, or third-party projects.
  • 2020: heavy churn in tensorflow/python/keras/ as the bundled Keras code is brought in line with the standalone Keras package; eventually superseded.

The compiler-stack era (2020 – 2023)

The center of gravity moved into the compiler stack. MLIR landed in tensorflow/compiler/mlir/, and gradually most lowering paths route through MLIR dialects (tf, tfl, tf-quant, mhlo, stablehlo).

  • 2020: MLIR adopted (tensorflow/compiler/mlir/). New TFLite converter rewritten on MLIR.
  • 2021: TFRT (tensorflow/core/tfrt/) introduced as an asynchronous runtime fallback.
  • 2022: DTensor (tensorflow/dtensor/) introduced for typed distributed tensors.
  • 2023: XLA is moved out to its own repository (openxla/xla), referenced via third_party/xla in this repo. Most tensorflow/compiler/xla/ source disappears from this tree.
  • 2023: Keras 3 is split out into a separate repo (keras-team/keras); the tensorflow/python/keras/ subtree in this repo enters maintenance mode and is the legacy v2 Keras code.

The post-XLA, StableHLO era (2024 – present)

  • 2024–2025: StableHLO becomes the canonical export format for portable computations; conversions live in tensorflow/compiler/mlir/stablehlo/ and tensorflow/lite/stablehlo/.
  • 2025: heavy work in tensorflow/lite/experimental/ and tensorflow/lite/async/ to support newer mobile accelerators.
  • 2026 (latest commits): ongoing security hardening (tf.data checkpoint validation, ASan memory tweaks for tests), continuous XLA integrations from openxla/xla (e.g., the very recent Integrate StableHLO at openxla/stablehlo@806a6844).

Longest-standing code

These directories have existed since within a few months of the initial commit and are still actively used:

  • tensorflow/core/framework/OpKernel, Tensor, OpDef. Files like op_kernel.h and tensor.h have evolved continuously since 2015.
  • tensorflow/core/kernels/ — many ops have been here from day one (matmul_op.cc, cwise_op_add.cc, conv_ops.cc).
  • tensorflow/core/common_runtime/executor.cc — the executor has been refactored repeatedly but has been called "executor" since 2015.
  • tensorflow/python/framework/ops.py — defines tf.Tensor, tf.Operation, tf.Graph since the start.
  • tensorflow/c/c_api.h — the C ABI; the headline functions (TF_NewSession, TF_Run) have been remarkably stable.

Major rewrites and migrations

  • Eager runtime (2018) — added alongside the graph runtime, then promoted to default in 2.0. Lives in tensorflow/core/common_runtime/eager/ and tensorflow/python/eager/.
  • AutoGraph (2018) — Pythonic control flow → TF control-flow ops. tensorflow/python/autograph/.
  • contrib/ purge (2019) — entire tensorflow/contrib/ directory removed in 2.0.
  • TFLite converter rewrite (2020) — MLIR-based converter (tensorflow/compiler/mlir/lite/) replaced the original TOCO converter (tensorflow/lite/toco/ is still present but largely superseded).
  • XLA extraction (2023) — XLA core moved to openxla/xla; only the bridge, JIT, and AOT remain here.
  • Keras 3 split (2023) — Keras 3 lives in keras-team/keras; this repo retains a frozen v2 copy under tensorflow/python/keras/ so existing tf.keras usage keeps working.

Deprecated/removed features

  • tensorflow/contrib/ — deleted in 2.0 (Sep 2019). Was the home for seq2seq, slim, learn, distributions, etc. Replaced by either standalone projects or core integrations.
  • TF1 graph-collections-and-Sessions style — still importable through tf.compat.v1.* but discouraged. Most MetaGraphDef/Session plumbing in tensorflow/python/training/ is in maintenance mode.
  • tf.estimator — superseded by Keras + tf.distribute. Still present but no longer the recommended API.
  • TOCO (TFLite Converter v1) — tensorflow/lite/toco/ remains for compatibility but the MLIR converter is the default.
  • tf.contrib.tpu and old TPU ops — replaced by tensorflow/python/tpu/ and tensorflow/core/tpu/.

Growth trajectory

  • The repo grew from ~5 000 files in early 2016 to ~20 000+ source files today.
  • Peak commit year: 2019 (~29 000 commits) — driven by the 2.0 rewrite.
  • Recent years have seen lower commit counts but higher per-commit code volume, as Copybara now batches internal changes.
  • Mobile (tensorflow/lite/) has roughly tripled in size since 2019, with most growth in delegates/, experimental/, and kernels/.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Lore – TensorFlow wiki | Factory