PennyLaneAI / PennyLaneAI/catalyst
[MLIR, CompileDriver] Run entry point signature detection only if needed
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 234
- Forks
- 84
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 66
Description
Currently compile driver always attempts to detect the entry point signature (see getJITFunction) and prints messages if it can't find one, which is is only relevant for IR string input. Usually we compile Python functions where we already know signatures by design. The suggestions are:
- Change the compiler driver API so we can explicitly ask it to run the inference, and only run it if asked
- Maybe find a better name for this function (JIT used to be the prefix of our entry points, but we changed this)
- Maybe also unify the verbose printing mechanisms, namely
emitDIag/emitRemarkof MLIR and our own CO_MSG macros. Note, that we might want to keep CO_MSG becauseemit*s alone get overly verbose when stack traces are enabled. Ref https://github.com/PennyLaneAI/catalyst/pull/317
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 with getJITFunction in mlir/lib/Driver/CompilerDriver.cpp and the CompilerDriver API in mlir/include/Driver/CompilerDriver.h. Determine how callers can explicitly request signature inference and how the diagnostic paths should relate to CO_MSG. Done means inference is conditional for IR string input and unnecessary messages are no longer emitted for Python compilation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100