Skip to content

Avoid building an ISL AST for illegal schedules - #59

Merged
Mascinissa merged 4 commits into
Tiramisu-Compiler:mainfrom
Mascinissa:ast-gen-skip
Aug 9, 2026
Merged

Avoid building an ISL AST for illegal schedules#59
Mascinissa merged 4 commits into
Tiramisu-Compiler:mainfrom
Mascinissa:ast-gen-skip

Conversation

@Mascinissa

Copy link
Copy Markdown
Collaborator

Companion server changes: TiraLibCpp PR #11 .

Some legality checks returned false quickly, then spent most of their time in gen_isl_ast(). Building an AST for a rejected schedule is unnecessary, and for some invalid transformed domains it can take hours or use excessive memory.

The Python compilation path now returns (False, None) as soon as legality fails. Schedule.is_legal() keeps the last valid tree in that case. Legal schedules still return an AST and update the tree as before; tree refresh remains immediate.

This also fixes duplicate computation targets during replay. A computation may appear in more than one ISL AST branch, and a serialized schedule may list the same target more than once. Tree reconstruction and schedule parsing now keep the first occurrence only.
When the first listed computation does not expose the requested loop level, the parser uses another listed computation that does.

Tests cover legal and illegal server results, preservation of the last valid tree, and repeated computations in an ISL AST.

@Mascinissa
Mascinissa merged commit 679fd12 into Tiramisu-Compiler:main Aug 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant