|
15 | 15 | Specialized FIFO subclasses (composable over :class:`ObjectFifo`): |
16 | 16 |
|
17 | 17 | - :class:`CascadeFifo` -- first-class cascade-stream ObjectFifo subclass. |
18 | | -- :class:`PacketFifo` -- variable-rate ObjectFifo + pktMerge / TLAST / OoO BD. |
| 18 | +- :class:`PacketFifo` -- packet-switched ObjectFifo + pktMerge / TLAST / OoO BD. |
19 | 19 | - :class:`AccumFifo` -- FP32 accumulator inter-tile state passing. |
20 | 20 | - :class:`SparseFifo` -- on-the-fly N:M sparsity decompression on S2MM. |
21 | 21 | - :class:`MemtileAggregator` -- memtile-mediated fan-in helper. |
22 | | -
|
23 | | -These are reservation stubs raising :class:`NotImplementedError` until the |
24 | | -matching primitive lands; subsequent commits in this PR replace each stub |
25 | | -with the real class. |
| 22 | +- :class:`VariableRateFifo` -- producer-side conditional-forward FIFO. |
26 | 23 | """ |
27 | 24 |
|
28 | 25 | from .buffer import Buffer |
|
49 | 46 | ) |
50 | 47 |
|
51 | 48 |
|
52 | | -# --------------------------------------------------------------------------- |
53 | | -# T1.2: pre-staged Wave 2 primitive export stubs. |
54 | | -# |
55 | | -# Each stub raises NotImplementedError until its owning Wave 2 task replaces |
56 | | -# it with a real implementation. The reservation slots exist so that Wave 2 |
57 | | -# tasks (T2.1 .. T2.6) executing in parallel never collide on this file: |
58 | | -# each task swaps in ONE class definition + one `from .module import Class` |
59 | | -# line at its reserved slot, never editing another task's slot. |
60 | | -# |
61 | | -# Per the Phase 2 plan's "Wave 2 fork-task serialization rule": adding the |
62 | | -# real class is one substitution; adding the import alongside it is the |
63 | | -# other. Conflicts on this file are mechanical (different lines). |
64 | | -# --------------------------------------------------------------------------- |
65 | | - |
66 | | - |
67 | | -# T2.1: CascadeFifo reservation slot replaced by real implementation |
68 | | -# (`from .cascade import CascadeFifo` above). The class lives in |
69 | | -# `python/iron/cascade.py`. See its module docstring for the AM020 |
70 | | -# Ch. 4 p. 67 cascade-stream architectural reference. |
71 | | - |
72 | | - |
73 | | -# T2.2: PacketFifo reservation slot replaced by real implementation. |
74 | | -# The class lives in `python/iron/packet.py` (sibling to `accum.py` / |
75 | | -# `dataflow/objectfifo.py`). Variable-rate packet-switched stream |
76 | | -# primitive exposing pktMerge N:1 (AM020 Ch. 2 Figure 17), |
77 | | -# finish-on-TLAST (Ch. 2 p. 27), and out-of-order BD processing |
78 | | -# (Ch. 5 p. 74). Closes G-T6.2-001 + G-T6.4-101 + G-T7.4-200. |
79 | | -from .packet import PacketFifo, PacketFifoHandle # noqa: E402 (reserved slot) |
80 | | - |
81 | | - |
82 | | -# T2.3: AccumFifo reservation slot replaced by real implementation. |
83 | | -# The class lives in `python/iron/accum.py` (sibling to `dataflow/objectfifo.py`). |
84 | | -# Persists 512-bit BM (accumulator) state across timesteps within a tile |
85 | | -# (BM-to-BM register move; AM020 Ch. 4 p. 67) AND across tiles |
86 | | -# (cascade-stream BM transfer). Closes G-T6.4-100. |
87 | | -from .accum import AccumFifo, AccumFifoHandle # noqa: E402 (reserved slot) |
88 | | - |
89 | | - |
90 | | - |
91 | | - |
92 | | -# G-T3.2-007: VariableRateFifo — producer-side conditional-forward |
93 | | -# FIFO. Closes the single-producer / conditional-forward half of |
94 | | -# G-T6.2-001 + G-T7.4-200 (the N:1 multi-producer fan-in half is |
95 | | -# closed by PacketFifo above). The class lives in |
96 | | -# ``python/iron/variable_rate.py`` (sibling to ``packet.py`` / |
97 | | -# ``sparse.py``); uses the same discardable-attr-on-ObjectFifo |
98 | | -# pattern SparseFifo uses, plus a corresponding lowering-pass change |
99 | | -# in ``AIEObjectFifoStatefulTransform.cpp`` to skip variable-rate |
100 | | -# fifos from LCM-based loop unrolling. |
101 | | -from .variable_rate import ( # noqa: E402 |
102 | | - VariableRateFifo, |
103 | | - VariableRateFifoHandle, |
104 | | -) |
| 49 | +from .packet import PacketFifo, PacketFifoHandle # noqa: E402 |
| 50 | +from .accum import AccumFifo, AccumFifoHandle # noqa: E402 |
| 51 | +from .variable_rate import VariableRateFifo, VariableRateFifoHandle # noqa: E402 |
105 | 52 |
|
106 | 53 |
|
107 | 54 | __all__ = [ |
108 | | - # Existing IRON primitives. |
109 | 55 | "Buffer", |
110 | 56 | "ExternalFunction", |
111 | 57 | "Kernel", |
|
126 | 72 | "zeros_like", |
127 | 73 | "set_tensor_class", |
128 | 74 | "get_current_device", |
129 | | - # Wave 2 reservation slots (T1.2 stubs, replaced by T2.1..T2.6). |
130 | 75 | "CascadeFifo", |
131 | 76 | "PacketFifo", |
132 | | - "PacketFifoHandle", # T2.2 |
| 77 | + "PacketFifoHandle", |
133 | 78 | "AccumFifo", |
134 | | - "AccumFifoHandle", # T2.3 |
| 79 | + "AccumFifoHandle", |
135 | 80 | "SparseFifo", |
136 | 81 | "MemtileAggregator", |
137 | | - # G-T3.2-007: VariableRateFifo (producer-side conditional forward; |
138 | | - # sibling to PacketFifo for the single-producer half of |
139 | | - # G-T6.2-001 + G-T7.4-200). |
140 | 82 | "VariableRateFifo", |
141 | 83 | "VariableRateFifoHandle", |
142 | 84 | ] |
0 commit comments