Git Product home page Git Product logo

Comments (16)

mtrofin avatar mtrofin commented on May 2, 2024 1

An end-to-end demo - i.e. how to collect a corpus, how to train, etc - is given here. The training driver is this one.

from ml-compiler-opt.

yundiqian avatar yundiqian commented on May 2, 2024 1

Hi Amir,

Our to-be-published paper might be the best resources for RL details. We are prioritizing it and will publish it hopefully next week. Before that, the end-to-end demo Mircea mentioned may be the best resources to look at

from ml-compiler-opt.

mtrofin avatar mtrofin commented on May 2, 2024 1

https://arxiv.org/abs/2101.04808 for the paper.

from ml-compiler-opt.

yundiqian avatar yundiqian commented on May 2, 2024 1

For TF and TF-Agents versions, we just updated it to the latest. There is no specific feature we need from the latest version, so an earlier version may also work.

from ml-compiler-opt.

mtrofin avatar mtrofin commented on May 2, 2024 1

Fuchsia is just used as a project to extract a corpus from. You can replace it with anything else that's clang-based, so you can extract a compilation database, from which you then extract the IR corpus. We liked Fuchsia because it yields a reasonably sized IR corpus, and it's open source; and we've been working with them because they were interested in size reduction, so a good part of the demo was basically ready-written.

We'll clarify that in the demo, reading it again, I see that Fuchsia is sprung up rather surprisingly.

Let us know if you run into any trouble trying it out with a clang-based project.

from ml-compiler-opt.

mtrofin avatar mtrofin commented on May 2, 2024

from ml-compiler-opt.

amirjamez avatar amirjamez commented on May 2, 2024

Thanks. We will be interested in citing the work sometime soon. It would be great to have an official paper to refer to for numbers and methodology.

Sure. I'd appreciate if you provide details on training the RL. Believe should be this file ? Also, I noticed you changed the TF version to a latest nightly version. Was it because of using a latest TF framework for RL?

Regards,
-- Amir

from ml-compiler-opt.

mtrofin avatar mtrofin commented on May 2, 2024

Re. TF version, it was about a TFAgents dependency. @ebrevdo @yundiqian @jaingaurav for TFAgents details.

from ml-compiler-opt.

amirjamez avatar amirjamez commented on May 2, 2024

@mtrofin Thanks for the paper.

Looking at the demo tutorial, I don't seem to understand the role of Fushsia in training RL. Can the training driver be used without the Fuchsia OS?

from ml-compiler-opt.

amirjamez avatar amirjamez commented on May 2, 2024

Thanks. One small thing is compiler_opt/tools/generate_tfrecord.py, has been renamed to generate_default_trace.py, you might wanna revise the demo.md as well.

from ml-compiler-opt.

mtrofin avatar mtrofin commented on May 2, 2024

Thanks - fixed!

from ml-compiler-opt.

TH3CHARLie avatar TH3CHARLie commented on May 2, 2024

Fuchsia is just used as a project to extract a corpus from. You can replace it with anything else that's clang-based, so you can extract a compilation database, from which you then extract the IR corpus. We liked Fuchsia because it yields a reasonably sized IR corpus, and it's open source; and we've been working with them because they were interested in size reduction, so a good part of the demo was basically ready-written.

We'll clarify that in the demo, reading it again, I see that Fuchsia is sprung up rather surprisingly.

Let us know if you run into any trouble trying it out with a clang-based project.

Hi, thanks for the demo and the great paper! I am a liitle bit confused about what you mean by "clang-based`, is that this method cannot be applied to standard C++ codebase?

from ml-compiler-opt.

mtrofin avatar mtrofin commented on May 2, 2024

"clang-based" refers to the target project needing to be compiled with clang. That's not a comment about C++ standard compliance, just to the practical realities of C++ projects - switching compilers (e.g. gcc -> clang) is non-trivial, so the comment underlines the fact that, as long as a project is already using clang, one should be able to use this work.

For more context: our work is about replacing the internals of the compiler (starting with inlining decision heuristics) with a learned policy. The work is done in the LLVM (hence clang) repo (llvm-project/llvm). This repo here (google/ml-compiler-opt) handles the training side, which happens offline, outside of the compiler. In addition, our goal is productization. For this latter reason, we're keeping our focus to LLVM, which may impact assumptions in this (google/ml-compiler-opt) repo.

Probably the ideas can be applied elsewhere, and likely those assumptions I mentioned aren't many and the work in this repo can be generalized to handle training data from other compilers, but that's not within the scope of our work. Having said that, if there's strong interest to extend this project, we'd be happy to set it up for contribution and welcome patches!

from ml-compiler-opt.

TH3CHARLie avatar TH3CHARLie commented on May 2, 2024

from ml-compiler-opt.

mtrofin avatar mtrofin commented on May 2, 2024

Sorry, I saw the comment go, so I deleted mine, too, figuring maybe there was a mistake :)

Looking forward to collaborating on learned loop transforms, should you decide to apply to GSoC - let us know if you need more info meanwhile, too!

Also, there's this monthly meeting (described here) - feel free to join! Perhaps a reasonable topic for the agenda for the April meeting should be the related GSoC projects.

from ml-compiler-opt.

TH3CHARLie avatar TH3CHARLie commented on May 2, 2024

Thanks! This would be super useful and I am looking forward to next month's meeting. I am already drafting my purpose for the project and it would be great if you can take a look. Any feedbacks would be helpful!

from ml-compiler-opt.

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.