catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

Fix Enzyme pass check and add `replace_ir_from_file` helper

Open tzunghanjuang opened this issue 1 year ago • 2 comments

Context:

In the compiler driver, we only check if there is any GradientOpInterface for enzyme. However, it only works for early mlir levels with replace_ir. This PR moves the check to the llvm level and detects any __enzyme_* functions.

The PR also adds an extra helper replace_ir_from_file to read the replacement ir from file.

tzunghanjuang avatar Oct 11 '24 15:10 tzunghanjuang