From 3a4dc328ac13d458590286f6d90c686098226543 Mon Sep 17 00:00:00 2001
From: Nikola Vukobrat <124874832+nvukobratTT@users.noreply.github.com>
Date: Mon, 4 Nov 2024 09:56:20 +0100
Subject: [PATCH] [Docs] TT-Forge-FE compiler architecture overview (#571)
- 3 images outline:
- TT-Forge general overview
- TT-TVM zoom-in overview
- TT-Forge-FE zoom-in overview
In upcoming PRs, we'll push content for sub-sections as well. For now,
this is an initial push to cover the initial structure and enable
parallel
work for remaining sections.
Solves #570
---
docs/src/SUMMARY.md | 1 +
docs/src/architecture_overview.md | 110 ++++++++++++++++++
docs/src/build.md | 2 +
.../imgs/compiler_arch/forge-fe_overview.svg | 10 ++
.../imgs/compiler_arch/tt-forge_overview.svg | 10 ++
.../imgs/compiler_arch/tt-tvm_overview.svg | 10 ++
6 files changed, 143 insertions(+)
create mode 100644 docs/src/architecture_overview.md
create mode 100644 docs/src/imgs/compiler_arch/forge-fe_overview.svg
create mode 100644 docs/src/imgs/compiler_arch/tt-forge_overview.svg
create mode 100644 docs/src/imgs/compiler_arch/tt-tvm_overview.svg
diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md
index 0b81cc1bd..b84d5f570 100644
--- a/docs/src/SUMMARY.md
+++ b/docs/src/SUMMARY.md
@@ -2,6 +2,7 @@
# Introduction
- [Introduction](./introduction.md)
+- [Architecture Overview](./architecture_overview.md)
# Project setup
- [Building](./build.md)
diff --git a/docs/src/architecture_overview.md b/docs/src/architecture_overview.md
new file mode 100644
index 000000000..2ae5ed274
--- /dev/null
+++ b/docs/src/architecture_overview.md
@@ -0,0 +1,110 @@
+# Architecture Overview
+
+TT-Forge is a comprehensive compiler designed to facilitate the development and optimization of machine learning models. It encompasses various components, each serving a specific purpose in the compiling and running machine learning pipelines. This document provides an overview of the key components with focus on [TT-Forge-FE](https://github.com/tenstorrent/tt-forge-fe).
+
+### Table of contents
+- [TT-Forge Overview](#tt-forge-overview)
+- [TT-TVM Overview](#tt-tvm-overview)
+ - [TVM IR](#tvm-ir)
+ - [TVM Compile](#tvm-compile)
+ - [Relay Compile Passes](#relay-compile-passes)
+ - [Forge Compile Passes](#forge-compile-passes)
+ - [Partition Graph](#partition-graph)
+ - [Construct Inputs, Constants and Ops](#construct-inputs-constants-and-ops)
+ - [Generate Forge-FE Module](#generate-forge-fe-module)
+ - [Standalone Forge-FE Module](#standalone-forge-fe-module)
+- [TT-Forge-FE Overview](#tt-forge-fe-overview)
+ - [Initialize Compile](#initialize-compile)
+ - [Generate Initial Graph (TT-TVM)](#generate-initial-graph-tt-tvm)
+ - [Post Initial Graph passes](#post-initial-graph-passes)
+ - [Consteval](#consteval)
+ - [Autograd](#autograd)
+ - [Post Autograd](#post-autograd)
+ - [Pre Lowering](#pre-lowering)
+ - [Graph Split](#graph-split)
+ - [Compiler TTIR](#compiler-ttir)
+ - [Output Binary](#output-binary)
+
+## TT-Forge Overview
+
+![TT-Forge Overview](imgs/compiler_arch/tt-forge_overview.svg "TT-Forge Overview")
+
+## TT-TVM Overview
+
+![TT-TVM Overview](imgs/compiler_arch/tt-tvm_overview.svg "TT-TVM Overview")
+
+### TVM IR
+
+Coming soon!
+
+### TVM Compile
+
+Coming soon!
+
+#### Relay Compile Passes
+
+Coming soon!
+
+#### Forge Compile Passes
+
+Coming soon!
+
+### Partition Graph
+
+Coming soon!
+
+### Construct Inputs, Constants and Ops
+
+Coming soon!
+
+### Generate Forge-FE Module
+
+Coming soon!
+
+### Standalone Forge-FE Module
+
+Coming soon!
+
+## TT-Forge-FE Overview
+
+![Forge-FE Overview](imgs/compiler_arch/forge-fe_overview.svg "Forge-FE Overview")
+
+### Initialize Compile
+
+Coming soon!
+
+### Generate Initial Graph (TT-TVM)
+
+Coming soon!
+
+### Post Initial Graph passes
+
+Coming soon!
+
+### Consteval
+
+Coming soon!
+
+### Autograd
+
+Coming soon!
+
+### Post Autograd
+
+Coming soon!
+
+### Pre Lowering
+
+Coming soon!
+
+### Graph Split
+
+Coming soon!
+
+### Compiler TTIR
+
+Coming soon!
+
+### Output Binary
+
+Coming soon!
diff --git a/docs/src/build.md b/docs/src/build.md
index 5167a15b1..c830d0217 100644
--- a/docs/src/build.md
+++ b/docs/src/build.md
@@ -98,6 +98,8 @@ mdbook serve build/docs
> **Note:** `mdbook serve` will by default create a local server at `http://localhost:3000`.
+> **Note:** For custom port, just specify `-p` attribute.
E.g. `mdbook serve build/docs -p 5005`, and visit `http://localhost:5005`.
+
## Build Cleanup
To ensure a clean build environment, follow these steps to remove existing build artifacts:
diff --git a/docs/src/imgs/compiler_arch/forge-fe_overview.svg b/docs/src/imgs/compiler_arch/forge-fe_overview.svg
new file mode 100644
index 000000000..62e01335c
--- /dev/null
+++ b/docs/src/imgs/compiler_arch/forge-fe_overview.svg
@@ -0,0 +1,10 @@
+
diff --git a/docs/src/imgs/compiler_arch/tt-forge_overview.svg b/docs/src/imgs/compiler_arch/tt-forge_overview.svg
new file mode 100644
index 000000000..d65b313a2
--- /dev/null
+++ b/docs/src/imgs/compiler_arch/tt-forge_overview.svg
@@ -0,0 +1,10 @@
+
diff --git a/docs/src/imgs/compiler_arch/tt-tvm_overview.svg b/docs/src/imgs/compiler_arch/tt-tvm_overview.svg
new file mode 100644
index 000000000..ff3211506
--- /dev/null
+++ b/docs/src/imgs/compiler_arch/tt-tvm_overview.svg
@@ -0,0 +1,10 @@
+