Calyx bindings to CIRCT dialects #967
mikeurbach
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There has been some effort in the Moore compiler to add CIRCT bindings in Rust, and then to layer on top of those bindings in a way that makes sense for Moore: fabianschuiki/moore#234.
It would be great to a) upstream the core, boilerplate, unopinionated bindings into CIRCT, and b) provide a layer within Calyx that makes sense to Calyx, so it can start interacting with the CIRCT infrastructure in a deep way from Rust.
Basic IR construction and traversal should be possible with the kind of bindings done in Moore. More advanced use cases involving mutation (i.e. writing passes over CIRCT IRs in Rust) may be much more tricky. This has been my experience in Python, at least.
Getting the Rust lifetime semantics aligned with MLIR in a neat, safe way is an open question, and my general impression is that is a ~thesis amount of work, if it is possible at all. The existing Rust forays into the MLIR ecosystem have been (to my knowledge) unsafe, and ok with that.
Beta Was this translation helpful? Give feedback.
All reactions