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

PDL API #260

Open
raviqqe opened this issue Jul 21, 2023 · 3 comments
Open

PDL API #260

raviqqe opened this issue Jul 21, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@raviqqe
Copy link
Owner

raviqqe commented Jul 21, 2023

Problem

  • We don't have the PDL API.
    • PDL dialect is not implemented yet.
    • But it should be available and easy to implement through the usual operation construction API.

Solution

Proposing the C API for PDL

Extending mlir-sys

TBD

References

@raviqqe raviqqe added the enhancement New feature or request label Jul 21, 2023
@Danacus
Copy link
Contributor

Danacus commented Jul 21, 2023

We don't really need PDL dialect constructors, since PDL patterns can be written in PDLL and can be converted to the PDL dialect with mlir-pdll.

I think we should either request additions to the C API upstream in MLIR, or implement them in a separate crate with API extensions.

Some additional considerations:

  • How expressive is the pdl dialect (or pdl-interp)? Are there patterns that can only be expressed using C++ RewritePatterns? If so, would it be useful to be able to write such patterns in Rust?
  • Would it be useful to expose an API in MLIR to compile PDLL and avoid needing to run the mlir-pdll command?

@Danacus
Copy link
Contributor

Danacus commented Jul 22, 2023

I've submitted a revision to LLVM: https://reviews.llvm.org/D156021

@raviqqe
Copy link
Owner Author

raviqqe commented Jul 22, 2023

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants