refactor(schedule): delete the schedule layer and analysis/poly - #136
Merged
Conversation
The `tilefoundry.schedule` package had no calling path: neither compile,
cli, nor passes reached it, and its public `__all__` exported nothing. Its
atom contract also contradicts the design it is being rebuilt against, so
it is deleted outright rather than kept as a compatibility shell.
Removes the package, `target/{cuda,amx}/{schedule,atoms}.py`, the pipeline
and partition Facts projections, and the `Scheduler` / `ScheduleCallable` /
`Target.get_scheduler` public contracts. Target keeps only the five
projections analysis actually reads. `ir/constraints/` and the unrelated
`BufferScheduler` are untouched.
Tests and specs follow: `tests/schedule/`, the five `test_poly_*` files
that lose their subject with render/kernel_schedule, the model corpus's
`schedule` capability, and `docs/spec/schedule.md` are deleted; the
remaining specs and tutorials no longer describe or promise the layer.
…eardown kimi_linear_48b_a3b still described how Schedule selected functions, a contract this branch removed. minicpm3_4b claimed its case is not in `registry.CORPUS`, which is false: `registry.MODELS` names the package and `_cases` puts the case in `CORPUS`. Both now state what is measured today.
…nd core-ir `check_program` is now the gate for analysis alone. Its module docstring, the `performance` checker's note, and the two symbolic-dimension errors a user reads still named scheduling as a second caller. The core-ir clause requiring a published root to declare its target named the deleted public Schedule operation alongside Analyze. No behavior change: only the two error strings are user-visible, and nothing asserts their text.
`extract` had one caller, the schedule pipeline's program view, and `TileGraph` / `TileUnit` had no reader outside it. With that layer gone the subpackage has no consumer, so all of `model`, `extract`, `access`, and `errors` are deleted along with the public surface re-exporting them. `affine.py` is the exception: `analysis/scope.py` and `analysis/footprint.py` are on the real analyze path and read it. It moves to `analysis/affine.py` unchanged, and its two importers follow. Ten symbols leave `analysis.__all__`; `analyze()` is otherwise untouched. The analysis spec loses § Polyhedral model, which leaves the metrics and the composed operation as §1 and §2. That renumber changes the addresses `tilefoundry spec analysis` resolves, so the `analyze --help` pointers and the five specs that linked into the old numbering move with it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
src/tilefoundry/schedule/(5278 lines) had no calling path:compile.py,cli/, andpasses/never reached it, and it exported no symbol from the public__all__. Only thetarget layer's facts and scheduler services held it up.
(
AtomFactis flat MNK plus byte counts, and operands carrying a layout are excludedoutright). The rebuild happens outside this repo, so the old layer is removed rather than
adapted — the replacement lands on empty ground instead of fighting a stale namespace.
analysis/poly/existed only to feed it:extract()had one caller, andTileGraph/TileUnithad no reader outside that caller. With the consumer gone the subpackage isorphaned except for
affine.py, which the live analyze path uses.What
schedulepackage,target/{cuda,amx}/{schedule,atoms}.py, the pipeline andpartition Facts projections, and
Scheduler/ScheduleCallable/Target.get_scheduler.Target keeps the five projections analysis actually reads:
MemoryHierarchyFacts,ThroughputFacts,ParallelCapacityFacts,PerformanceServiceFacts,TopologyLimitFacts.analysis/poly/and movespoly/affine.pytoanalysis/affine.pyunchanged(a 100% rename);
analysis/scope.pyandanalysis/footprint.pyfollow the new path.Ten poly symbols leave
analysis.__all__.tests/schedule/, the fivetest_poly_*files, the model corpus'sschedulecapability and everyschedule=declaration, the vendor NPU provider'sscheduler, and the scheduler cases in the target and analysis suites.
docs/spec/schedule.mdis deleted, andarchitecture,code-organization,target,analysis,core-ir,cli,types,semantic-analysis,visitor-registryplus both tutorial pages no longer describe thelayer. The tutorial stops promising a
tilefoundry schedulecommand that does not exist.being removed. Regression rests on the existing suite and the three spec lints.
Contract
tilefoundry.schedulein full,Scheduler,ScheduleCallable,Target.get_scheduler,candidate_atoms, and the ten poly re-exports fromtilefoundry.analysis. No compatibility shim and no deprecation period — nothing in therepository called any of it.
analysis.affinereplacesanalysis.poly.affineas the import path forloop_affine_term/LoopAffineTerm. The module's contents are byte-identical.analyze()and every analysis family behave exactly as before; they only ever usedaffine.docs/spec/analysis.mdloses its Polyhedral model section, so its metrics and composedoperation become §1 and §2.
tilefoundry spec analysisaddresses move with them(
2.2.1is now1.2.1);analyze --helpand the five specs linking into the oldnumbering were updated.
ir/constraints/andpasses/transforms/bufferize.py'sBufferSchedulerare untouched.The latter is an unrelated buffer-placement hook that only shares the word.
Risk
docs/plans/atom-schedule-search/STANDALONE.md, and will re-take thecandidate_atomsentry point on the target side. Nothing is reserved for it here: the spec is written
fresh when its actual shape is known, rather than left as a placeholder that ages.
emit_scaffoldandbuild_schedule_treeare removed with the layer. They had no calleroutside it; the capability is rebuilt out of tree.