Code Monkey home page Code Monkey logo

Comments (2)

nicolasvasilache avatar nicolasvasilache commented on June 23, 2024

This should be very easy to do today.
We've used https://github.com/google/iree-llvm-sandbox/blob/main/python/examples/core/transforms.py#L60 for the same purpose; you just want the string to be read from a file rather than pasted inline.

f = open ("foo.mlir", "r")
ir = f.readlines()

adding @ftynse to ensure recent refactorings are mindful of Inject / TransformationList interplay.

from iree-llvm-sandbox.

ftynse avatar ftynse commented on June 23, 2024

Test harness is ultimately about running the code, so we cannot just instruct it to produce unrunnable code. If you want human-in-the-loop, you can do something like print(P0.then(P1).then(P2)(your-module)), modify the code manually, parse it back and have an "expert" that does P3.then(P4).then(P5) on it passed to the harness. This should be fine as long as the ABI of the entry point remains the same.

For adventurous ones, it is possible to have a "transform" that prints the IR into a file and then popen's $EDITOR with that file for the user to edit before parsing it back.

from iree-llvm-sandbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.