Improve vol2 Fleet Stack: subtitles, Part labels, Distribution icon, line wraps

This commit is contained in:
Vijay Janapa Reddi
2026-02-21 19:34:05 -05:00
parent f44ead20bf
commit f0ddc607d6

View File

@@ -1326,7 +1326,7 @@ align=right,font={\fontsize{40pt}{40}\selectfont}]
}
% =============================================================================
% ML SYSTEMS STACK DIAGRAM (REUSABLE MACRO)
% ML SYSTEMS STACK DIAGRAM (VOLUME 1 — REUSABLE MACRO)
% =============================================================================
% Renders a vertical stack of 7 layers with configurable shading (0-100).
% Used in "Purpose" sections to show which layers a chapter touches.
@@ -1720,11 +1720,15 @@ align=right,font={\fontsize{40pt}{40}\selectfont}]
\draw (-0.15, 0.11) -- (0.05, 0.11);
\draw (-0.15, -0.11) -- (0.05, -0.11);
},
% Parallelism: Three parallel arrows
% Distribution: Connected cluster (nodes in mesh topology)
icon_fleet_parallel/.pic={
\draw[thick, ->] (-0.25, 0.12) -- (0.25, 0.12);
\draw[thick, ->] (-0.25, 0) -- (0.25, 0);
\draw[thick, ->] (-0.25, -0.12) -- (0.25, -0.12);
\fill (-0.18, 0.18) circle (0.04);
\fill (0.18, 0.18) circle (0.04);
\fill (-0.18, -0.18) circle (0.04);
\fill (0.18, -0.18) circle (0.04);
\draw[thick] (-0.18, 0.18) -- (0.18, 0.18) -- (0.18, -0.18) -- (-0.18, -0.18) -- cycle;
\draw[thick] (-0.18, 0.18) -- (0.18, -0.18);
\draw[thick] (0.18, 0.18) -- (-0.18, -0.18);
},
% Communication: Signal waves (broadcast pattern)
icon_fleet_comm/.pic={
@@ -1825,12 +1829,13 @@ align=right,font={\fontsize{40pt}{40}\selectfont}]
minimum width=4.2cm, minimum height=2.2cm,
anchor=south west, rounded corners=0pt, inner sep=0pt
] (box) at (0,#1) {};
% Title and subtitle — spread for 2.2cm height (matches vol1 stacklayerfull style)
\node[anchor=west, text=\textcol, font=\sffamily\scriptsize\bfseries]
at ($(box.west)+(0.2,0.28)$) {#2};
at ($(box.west)+(0.2,0.45)$) {#2};
\node[anchor=west, text=\textcol,
font=\sffamily\fontsize{4.5}{5.5}\selectfont, opacity=0.8,
text width=2.9cm]
at ($(box.west)+(0.2,-0.02)$) {#3};
font=\sffamily\fontsize{5}{6}\selectfont, opacity=0.9,
text width=3.2cm, align=left]
at ($(box.west)+(0.2,-0.35)$) {#3};
\path (box.east) +(-0.7,0)
pic[scale=0.78, draw=\textcol, fill=\textcol, text=\textcol] {#6};
}
@@ -1845,17 +1850,17 @@ align=right,font={\fontsize{40pt}{40}\selectfont}]
\begin{tikzpicture}
% 4 layers at 1.0cm each = 4.0cm total (matches Vol1 stack layer height)
% Part IV: Governance (top) — Red
\fleetstacklayernostub{3.0}{Governance}{#4}{fleetgov}{icon_fleet_governance}
% Part IV: Governance (top) — ETH Zurich Blue intensity
\fleetstacklayernostub{3.0}{Governance}{#4}{accentcolor}{icon_fleet_governance}
% Part III: Serving — Green
\fleetstacklayernostub{2.0}{Serving}{#3}{fleetserve}{icon_fleet_serve}
% Part III: Serving — ETH Zurich Blue intensity
\fleetstacklayernostub{2.0}{Serving}{#3}{accentcolor}{icon_fleet_serve}
% Part II: Distribution — Blue
\fleetstacklayernostub{1.0}{Distribution}{#2}{fleetdist}{icon_fleet_parallel}
% Part II: Distribution — ETH Zurich Blue intensity
\fleetstacklayernostub{1.0}{Distribution}{#2}{accentcolor}{icon_fleet_parallel}
% Part I: Infrastructure (bottom) — Brown
\fleetstacklayernostub{0.0}{Infrastructure}{#1}{fleetinfra}{icon_fleet_infra}
% Part I: Infrastructure (bottom) — ETH Zurich Blue intensity
\fleetstacklayernostub{0.0}{Infrastructure}{#1}{accentcolor}{icon_fleet_infra}
% --- Upward constraint arrows (left side) ---
% ETH Zurich Blue (accentcolor) for left-side elements
@@ -1890,40 +1895,27 @@ align=right,font={\fontsize{40pt}{40}\selectfont}]
\begin{tikzpicture}
% 4 layers at 2.2cm each = 8.8cm total
% Part IV: Governance
\fleetstacklayerfull{6.60}{Governance}{Security, robustness, sustainability, responsibility}{#4}{fleetgov}{icon_fleet_governance}
% Part IV: Governance — ETH Zurich Blue intensity
\fleetstacklayerfull{6.60}{Governance}{Security, robustness,\\sustainability, responsibility}{#4}{accentcolor}{icon_fleet_governance}
% Part III: Serving
\fleetstacklayerfull{4.40}{Serving}{Inference, performance, edge, operations}{#3}{fleetserve}{icon_fleet_serve}
% Part III: Serving — ETH Zurich Blue intensity
\fleetstacklayerfull{4.40}{Serving}{Inference, performance,\\edge, operations}{#3}{accentcolor}{icon_fleet_serve}
% Part II: Distribution
\fleetstacklayerfull{2.20}{Distribution}{Training, communication, fault tolerance, orchestration}{#2}{fleetdist}{icon_fleet_parallel}
% Part II: Distribution — ETH Zurich Blue intensity
\fleetstacklayerfull{2.20}{Distribution}{Training, communication,\\fault tolerance, orchestration}{#2}{accentcolor}{icon_fleet_parallel}
% Part I: Infrastructure
\fleetstacklayerfull{0.0}{Infrastructure}{Compute, network, data storage}{#1}{fleetinfra}{icon_fleet_infra}
% Part I: Infrastructure — ETH Zurich Blue intensity
\fleetstacklayerfull{0.0}{Infrastructure}{Compute, network,\\data storage}{#1}{accentcolor}{icon_fleet_infra}
% --- Upward constraint arrows (left side) — ETH Zurich Blue ---
\begin{scope}[on background layer]
\draw[-{Triangle[width=8pt,length=5pt]}, line width=4pt,
accentcolor!60, opacity=0.6]
(-0.2, 2.05) -- (-0.2, 2.35);
\draw[-{Triangle[width=8pt,length=5pt]}, line width=4pt,
accentcolor!60, opacity=0.6]
(-0.2, 4.25) -- (-0.2, 4.55);
\draw[-{Triangle[width=8pt,length=5pt]}, line width=4pt,
accentcolor!60, opacity=0.6]
(-0.2, 6.45) -- (-0.2, 6.75);
\end{scope}
% --- Part number labels (left accent) — ETH Zurich Blue ---
% --- Part labels (left accent) — ETH Zurich Blue ---
\node[font=\sffamily\fontsize{6}{7}\selectfont\bfseries,
text=accentcolor, opacity=0.75, rotate=90] at (-0.45, 1.1) {I};
text=accentcolor, opacity=0.75, rotate=90] at (-0.45, 1.1) {Part~I};
\node[font=\sffamily\fontsize{6}{7}\selectfont\bfseries,
text=accentcolor, opacity=0.75, rotate=90] at (-0.45, 3.3) {II};
text=accentcolor, opacity=0.75, rotate=90] at (-0.45, 3.3) {Part~II};
\node[font=\sffamily\fontsize{6}{7}\selectfont\bfseries,
text=accentcolor, opacity=0.75, rotate=90] at (-0.45, 5.5) {III};
text=accentcolor, opacity=0.75, rotate=90] at (-0.45, 5.5) {Part~III};
\node[font=\sffamily\fontsize{6}{7}\selectfont\bfseries,
text=accentcolor, opacity=0.75, rotate=90] at (-0.45, 7.7) {IV};
text=accentcolor, opacity=0.75, rotate=90] at (-0.45, 7.7) {Part~IV};
\end{tikzpicture}
}