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

Evaluate numba-mlir and related passes for a more principled frontend #1394

Open
j2kun opened this issue Feb 11, 2025 · 0 comments
Open

Evaluate numba-mlir and related passes for a more principled frontend #1394

j2kun opened this issue Feb 11, 2025 · 0 comments

Comments

@j2kun
Copy link
Collaborator

j2kun commented Feb 11, 2025

In a pair programming session today, we discovered numba-mlir https://github.com/numba/numba-mlir a proof of concept to replace numba's current LLVM backend with an MLIR-based backend. This is not necessarily usable as-is, but it's interesting because they have MLIR passes that we might one day be able to adapt to our purposes, some of which have been upstreamed.

For example, lift-cf-to-scf and the underlying CFGtoSCF could be something we use to avoid having to recognize and emit loops in the frontend. I.e., we could emit cf dialect ops to MLIR, and then call that pass to lift to scf, and then call a polygeist-inspired pass to lift scf to affine, or else support scf in our pipelines directly.

I think that would be a nice way to do it in the long term, though it would take some extra infrastructure to manage since the lift-cf-to-scf doesn't seem to recognize static loop bounds, which is critical for us in FHE.

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

No branches or pull requests

1 participant