mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-10 11:22:07 -05:00
Updates all remaining files with correct module assignments: - DataLoader = 05, Autograd = 06, Optimizers = 07, Training = 08 - Foundation Tier = 01-08, Architecture Tier = 09-13 Fixed files: - Paper diagrams: module_flow.dot, module_flow_horizontal.tex - Paper references: paper.tex (multiple instances) - Site TITO: milestones.md command examples - Tests: run_training_milestone_tests.py, test_user_journey.py, test_training_flow.py - Milestones: 02_xor_solved.py, 02_rosenblatt_trained.py, 02_rumelhart_mnist.py, XOR ABOUT.md - Source: 17_acceleration.py prerequisites - Tools: fix_mermaid_diagrams.py, fix_about_titles.py module mappings
96 lines
2.5 KiB
Plaintext
96 lines
2.5 KiB
Plaintext
// TinyTorch Module Dependency Graph
|
|
// Render with: dot -Tpdf module_flow.dot -o module_flow.pdf
|
|
// Or: dot -Tpng module_flow.dot -o module_flow.png
|
|
|
|
digraph TinyTorch {
|
|
// Global settings
|
|
rankdir=LR;
|
|
splines=ortho;
|
|
nodesep=0.4;
|
|
ranksep=0.6;
|
|
node [shape=box, style="rounded,filled", fontsize=10, fontname="Helvetica"];
|
|
edge [arrowsize=0.7];
|
|
|
|
// === FOUNDATION TIER (01-08) ===
|
|
subgraph cluster_foundation {
|
|
label="FOUNDATION (01-08)";
|
|
labelloc=t;
|
|
style="dashed,rounded";
|
|
color=blue;
|
|
fontcolor=blue;
|
|
fontsize=11;
|
|
|
|
node [fillcolor="#bbdefb", color="#1976d2"];
|
|
|
|
T [label="01\nTensor"];
|
|
A [label="02\nActivations"];
|
|
L [label="03\nLayers"];
|
|
Loss [label="04\nLosses"];
|
|
Data [label="05\nDataLoader"];
|
|
Auto [label="06\nAutograd"];
|
|
Opt [label="07\nOptimizers"];
|
|
Train [label="08\nTraining"];
|
|
|
|
T -> A -> L -> Loss -> Data -> Auto -> Opt -> Train;
|
|
}
|
|
|
|
// === ARCHITECTURE TIER (09-13) ===
|
|
subgraph cluster_architecture {
|
|
label="ARCHITECTURE (09-13)";
|
|
labelloc=t;
|
|
style="dashed,rounded";
|
|
color=purple;
|
|
fontcolor=purple;
|
|
fontsize=11;
|
|
|
|
node [fillcolor="#e1bee7", color="#7b1fa2"];
|
|
|
|
// Vision path
|
|
Spatial [label="09\nCNNs"];
|
|
|
|
// Language path
|
|
Tok [label="10\nTokenization"];
|
|
Emb [label="11\nEmbeddings"];
|
|
Att [label="12\nAttention"];
|
|
Trans [label="13\nTransformers"];
|
|
|
|
Tok -> Emb -> Att -> Trans;
|
|
}
|
|
|
|
// Connections from Foundation to Architecture
|
|
Train -> Spatial;
|
|
Train -> Tok;
|
|
|
|
// === OPTIMIZATION TIER (14-19) ===
|
|
subgraph cluster_optimization {
|
|
label="OPTIMIZATION (14-19)";
|
|
labelloc=t;
|
|
style="dashed,rounded";
|
|
color=orange;
|
|
fontcolor=orange;
|
|
fontsize=11;
|
|
|
|
node [fillcolor="#ffe0b2", color="#f57c00"];
|
|
|
|
Prof [label="14\nProfiling"];
|
|
Quant [label="15\nQuantization"];
|
|
Comp [label="16\nCompression"];
|
|
Accel [label="17\nAcceleration"];
|
|
Memo [label="18\nMemoization"];
|
|
Bench [label="19\nBenchmarking"];
|
|
|
|
Prof -> Quant -> Comp -> Bench;
|
|
Prof -> Accel -> Memo -> Bench;
|
|
}
|
|
|
|
// === CAPSTONE (20) ===
|
|
Cap [label="20\nCapstone", fillcolor="#fff59d", color="#f9a825"];
|
|
|
|
// === CROSS-TIER CONNECTIONS ===
|
|
Train -> Data;
|
|
Spatial -> Prof;
|
|
Trans -> Prof;
|
|
Bench -> Cap;
|
|
|
|
}
|