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

Refactor module builder and fix issue 41 #87

Merged
merged 1 commit into from
Nov 28, 2024
Merged

Conversation

mrakitaTT
Copy link
Contributor

@mrakitaTT mrakitaTT commented Nov 26, 2024

Fixes #41 by adding -vhlo-to-version pass before -vhlo-legalize-to-stablehlo in order to update VHLO to latest version. That converts v1 ops to v2 ops, and then -vhlo-legalize-to-stablehlo successfully converts vhlo.dot_general_v2.

Refactored module builder in the process:

  • Reorganized code into multiple functions
  • Moved dialects and passes registration into constructor so it is done only once and not during every compile
  • Changed module builder to return PJRT status instead of throwing errors, previous error messages are now logged and status is reported from api_impl.cc::ClientInstance::Compile function
  • Removed unnecessary includes and sorted them

@mrakitaTT
Copy link
Contributor Author

FYI @vladimirjovanovicTT

Copy link
Contributor

@kmitrovicTT kmitrovicTT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So neat and readable. Kudos!

src/common/module_builder.h Show resolved Hide resolved
src/common/module_builder.cc Show resolved Hide resolved
src/common/module_builder.cc Show resolved Hide resolved
@mrakitaTT mrakitaTT merged commit 39812db into main Nov 28, 2024
6 checks passed
@mrakitaTT mrakitaTT deleted the mrakita/issue_41 branch November 28, 2024 08:58
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.

Fix the failing tests after tt-mlir uplift
2 participants