- 
                Notifications
    You must be signed in to change notification settings 
- Fork 57
Migrate to stablehlo #1921
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
Migrate to stablehlo #1921
Conversation
| I'm opening CI to check the build system. As of this commit (ee515f5), everything should succeed up until the python tests (i.e. everything should succeed up until  I'm still building stablehlo in embedded mode instead of external mode, but the strange logic in stablehlo's cmakelists makes it seem impossible to use their external mode. Embedded mode, aka building the  I will now move on to check the missing passes. We can revisit build mode later. | 
| 
 Thanks @paul0403! What happened to the stdlib error? | 
| 
 The error message is from cpp20. I downgraded to cpp17 and it went away. This is not ideal but at least this frees me up to investigate the passes for now. | 
This is needed for `stablehlo-aggressive-simplification`, which contains the lowering for stablehlo::ReduceOp
| Needs to wait on llvm update (#1916).  | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't believe it finally happened 😍
| Regarding the current build wheels errors: 
 | 
| 
 The current failures are caused by github mac runner images being upgraded to macos 15. We are handling it in #1986 | 
Context:
Migrate to stablehlo.
Catalyst depends on the stablehlo dialect because that is what jax lowers classical primitives (additions, jnp array ops, linalg ops, etc) to. The stablehlo dialect was pulled in from the tensorflow/mlir-hlo repo, but that repo is slated for deletion .
They suggest users to migrate to the stablehlo repo.
Description of the Change:
Use the stablehlo version of the mhlo operations, dialects and passes we are currently using.
Remove mhlo build system from regular makefiles and CI scripts.
Remove mhlo patches.
Benefits:
No longer depending on a sunsetting external project.
[sc-96641]