PennyLaneAI / PennyLaneAI/catalyst
Support importing MLIR file or stream into Catalyst
Open
Nobody has claimed this yet.
enhancement
frontend
- Dominant language
- Python
- Stars
- 234
- Forks
- 84
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 66
Description
Summary
Catalyst should provide a way to import an MLIR file or stream directly into its workflow. This would enable users to leverage MLIR interoperability by ingesting pre-existing IRs or those generated by other tools.
Motivation
- Enable advanced transformations and analysis before ingestion.
- Improve flexibility for researchers and advanced users.
Expected behavior
- Users can import an MLIR file or provide an MLIR stream (e.g., via stdin, etc.) into Catalyst.
- Need to validate if the MLIR instructions are supported in the backend.
import catalyst.load
program_mlir_str = "MLIR CONTENT"
program_mlir_path = "path to mlir"
qjit_cir_1 = catalyst.load(program_mlir_str)
qjit_cir_2 = catalyst.load(filepath=program_mlir_path)
# Execute the program
qjit_cir_1()
qjit_cir_2()
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the catalyst.load entry point and how Catalyst currently accepts programs. Determine how file paths, streams, MLIR parsing, and backend instruction validation fit into that workflow. Done means both the MLIR string and filepath examples are accepted and executable when their instructions are supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100