Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can the harness produce intermediate compilation IRs in separate files? #93

Closed
giuseros opened this issue Dec 8, 2021 · 2 comments
Closed

Comments

@giuseros
Copy link
Collaborator

giuseros commented Dec 8, 2021

This stemmed from the discussion here: #83 (comment)

The idea is to optionally save each pass result in a separate file, mainly for ease of use. Also each file should contain (as a comment) the entire mlir-proto-opt command to reproduce the IR

@ftynse
Copy link
Contributor

ftynse commented Dec 8, 2021

It should be easy to have a Transformation subclass that is parameterized by the filename at creation time and just prints the module to that file without transforming it. Then mimic the print_ir helper to inject such transformations in any existing pipeline if desired. This has the extra benefit of being able to add such a transformation at selected points instead of all-or-nothing behavior.

I am wary of adding this to the harness itself, similarly to (now not) having the three "print IR" flags, as it will likely lead to a behemothic configuration mechanism instead of a simple tool.

@giuseros
Copy link
Collaborator Author

I added this, closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants