Skip to content

Commit 707a7df

Browse files
author
Matt Davis
committed
[IRON] Strip project-internal task references from __init__.py
1 parent 549d1d0 commit 707a7df

1 file changed

Lines changed: 7 additions & 65 deletions

File tree

python/iron/__init__.py

Lines changed: 7 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,11 @@
1515
Specialized FIFO subclasses (composable over :class:`ObjectFifo`):
1616
1717
- :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.
1919
- :class:`AccumFifo` -- FP32 accumulator inter-tile state passing.
2020
- :class:`SparseFifo` -- on-the-fly N:M sparsity decompression on S2MM.
2121
- :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.
2623
"""
2724

2825
from .buffer import Buffer
@@ -49,63 +46,12 @@
4946
)
5047

5148

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
10552

10653

10754
__all__ = [
108-
# Existing IRON primitives.
10955
"Buffer",
11056
"ExternalFunction",
11157
"Kernel",
@@ -126,17 +72,13 @@
12672
"zeros_like",
12773
"set_tensor_class",
12874
"get_current_device",
129-
# Wave 2 reservation slots (T1.2 stubs, replaced by T2.1..T2.6).
13075
"CascadeFifo",
13176
"PacketFifo",
132-
"PacketFifoHandle", # T2.2
77+
"PacketFifoHandle",
13378
"AccumFifo",
134-
"AccumFifoHandle", # T2.3
79+
"AccumFifoHandle",
13580
"SparseFifo",
13681
"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).
14082
"VariableRateFifo",
14183
"VariableRateFifoHandle",
14284
]

0 commit comments

Comments
 (0)