Giter Club home page Giter Club logo

Comments (5)

jmmartinez avatar jmmartinez commented on July 26, 2024

Hi Noa,
Thank you for your interest! The project is on its early-beginning, so the examples are rather small unit tests. I'm currently looking for some real-world cases that I could use as a strong motivation for the project. I've been checking Octave and Pythran. If you have any use case in mind please let me know.

i'm wondering about loop unrolling (e.g. if a vector is the parameter)

I will add a small test covering this case, with a vector trying to trigger loop unrolling depending on the vector's size. Thanks!

or perhaps changing control flow to build expressions

I did not understand. What do you mean? I would like to add a mechanism to specify a function to transform the IR (code below). Is it something like this that you had in mind?

void instrument_edges(TerminatorInst* Term) { /*add instrumentation calls*/ }

easy::jit(foo, _2, _1, 
             easy::after_optimization([](BasicBlock* B) {
                 instrument_edges(B->getTerminator()); 
                 return true; 
             }))

Thanks,
Juan

from easy-just-in-time.

dotnwat avatar dotnwat commented on July 26, 2024

Hi Juan,

It would be great to have the loop unrolling example, thanks!

As for the other example I mentioned, I think I was not very clear at all. Let me give an example:

Let's say that I have a method that iterates over a set of elements:

void apply(...) {
for (auto elem : container)
// do something
}

then I have a set of functions, for example add, subtract, divide. the examples in your jit seems to let me create new functions like add5(x), etc... could I jit a method that had semantics in which, say, 5, was added to each element in the container.

e.g. apply(add5);

?

from easy-just-in-time.

jmmartinez avatar jmmartinez commented on July 26, 2024

I really like this idea. I think I know how to implement it. I will add it to the TODO.md .

from easy-just-in-time.

jmmartinez avatar jmmartinez commented on July 26, 2024

Hello Noah,
I added the test simple/unroll.cpp covering the unroll case.
For some reason, it's not being vectorized. Hope it's ok.

Cheers,
Juan

from easy-just-in-time.

jmmartinez avatar jmmartinez commented on July 26, 2024

The composition of the generated functions is now supported!

Cheers!

from easy-just-in-time.

Related Issues (17)

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.