catalyst
catalyst copied to clipboard
[MLIR, CompileDriver] Run entry point signature detection only if needed
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