Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[WIP] Draft autoscheduler#831

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
mtsokol wants to merge1 commit intomain
base:main
Choose a base branch
Loading
fromms/draft-autoscheduler
Draft

Conversation

mtsokol
Copy link
Collaborator

WIP

@mtsokolmtsokol self-assigned thisJan 7, 2025
@codspeed-hqCodSpeed HQ
Copy link

codspeed-hqbot commentedJan 7, 2025
edited
Loading

CodSpeed Performance Report

Merging#831 willnot alter performance

Comparingms/draft-autoscheduler (3b49c64) withmain (6722b73)

Summary

✅ 340 untouched benchmarks

@mtsokolmtsokolforce-pushed thems/draft-autoscheduler branch from3e5894a to219b11fCompareJanuary 8, 2025 12:12
@hameerabbasi
Copy link
Collaborator

I feel we're implementing a lot of IR pass infrastructure which we don't really need -- IMHO it'd be better to define an IR and do it via egglog or MLIR.

@mtsokol
Copy link
CollaboratorAuthor

mtsokol commentedJan 9, 2025
edited
Loading

I think the only part of pass infrastructure rewritten here isrewrite_tools.py taken from Julia Finch. The rest is scheduler logic (passes, IR).
I used egglog for the first try but using pure Python and its structural pattern matching ended up more convenient for me (I could directly map Julia implementation, I can have side-effects inside matches).

hameerabbasi reacted with thumbs up emoji

@willow-ahrens
Copy link
Collaborator

egglog is overkill for a lot of Finch rewriting (especially since e-graph behavior is unbounded for the rules Finch uses, and deterministic matching works fine). The only time we might want to consider using Egglog would be for the theorem-proving rules. In the past, Jaeyeon has used Z3 for this to great success. However, the use of e-graphs should be considered a research topic for our initial rewriting.

mtsokol reacted with thumbs up emoji

@willow-ahrens
Copy link
Collaborator

as for defining AST's, we might consider using the approach used in EXO:https://github.com/ChezJrk/asdl

@willow-ahrens
Copy link
Collaborator

one last thing: I think the deferred node may change soon, all of the rest of this ast is stable but we may need to change deferred node. I'll try to remind y'all when I make the update.

mtsokol reacted with thumbs up emoji

@willow-ahrens
Copy link
Collaborator

I personally really like that you can use the default python pattern matching here, it's a big benefit for readability and maintainability. I struggled for a long time to teach new users how to use the custom julia rewriting library because julia had no inbuilt pattern matching syntax.

@mtsokol
Copy link
CollaboratorAuthor

as for defining AST's, we might consider using the approach used in EXO:https://github.com/ChezJrk/asdl

I will take a look at it! Here the requirement is that each AST class must be a Python@dataclass tobe used in the pattern matching. Right, pattern matching well suited here.

@willow-ahrens
Copy link
Collaborator

I don't want to push too hard for ASDL,having each ast node be it's own class is simpler and easy to understand.

mtsokol reacted with thumbs up emoji

@hameerabbasi
Copy link
Collaborator

@mtsokol Is this still relevant?

@mtsokol
Copy link
CollaboratorAuthor

@mtsokol Is this still relevant?

I think it is. Once we have Finch in MLIR we might want to first use Python version of the autoscheduler if porting it to MLIR is more time-consuming.

hameerabbasi reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees

@mtsokolmtsokol

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@mtsokol@hameerabbasi@willow-ahrens

[8]ページ先頭

©2009-2025 Movatter.jp