Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic Schedule Generation/Explication #17

Open
od0x0 opened this issue Sep 4, 2022 · 0 comments
Open

Automatic Schedule Generation/Explication #17

od0x0 opened this issue Sep 4, 2022 · 0 comments
Labels
core Essential (planned) functionality or maintenance critical enhancement New feature or request

Comments

@od0x0
Copy link
Collaborator

od0x0 commented Sep 4, 2022

The version of caiman with the old scheduling language had a fairly rudimentary and predictable schedule generator that operated by tracking which values were present on which device, and creating a copy somehow as late as possible if it was not present when a computation needed it. I had to disable this when I created the new scheduling language because it was added surface area that needed to change. It's essential for the caiman story that we have a component that can take us from no schedule to some functional (even if not performant) schedule. Partial schedule to full schedule (like the old explicator) would be nice, but is not essential for a 1.0. Optimal schedule generation is a non-goal at this time. Predictability is much more important.

This can be implemented in the caiman backend as a pass before codegen the way the old explicator was, but it could also be implemented external and operate as an IR to IR transform before it gets loaded into caimanc.

For a v1, I would start by having pipeline definitions with the minimal necessary type information at the boundary but no concrete funclets, then generating the implementation via a backwards traversal through the associated value funclets. The algorithm should be very similar to linear scan register allocation (values are traditional SSA registers and slots are basically physical registers/spill slots with extra type checking).

The new scheduling language has timeline and spatial funclets that capture different aspects of the schedule, in addition to the ScheduleExplicit funclets. For a predictable schedule generation from partial schedules in a v2, these would probably need to be combined as a ScheduleImplicit funclet that allows partial specification and explication of all three simultaneously. Alternatively, the explicator could clone/instantiate and explicate the trio of funclets simultaneously.

@od0x0 od0x0 added enhancement New feature or request good first issue Good for newcomers core Essential (planned) functionality or maintenance critical labels Sep 4, 2022
@od0x0 od0x0 added this to the Make Presentable milestone Sep 4, 2022
@od0x0 od0x0 removed the good first issue Good for newcomers label Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Essential (planned) functionality or maintenance critical enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant