Giter VIP home page Giter VIP logo

Comments (6)

seanmor5 avatar seanmor5 commented on June 3, 2024

Axon marks each layer with :op as :metadata, which means that you a compiler could replace operations with a better one depending on what it is. Plus one from me

from nx.

polvalente avatar polvalente commented on June 3, 2024

Should we also add a compiler callback for divulging which custom operation nodes are available?
Or should we just set as a best practice that we should document this in the docs for the specific compiler?

from nx.

josevalim avatar josevalim commented on June 3, 2024

I struggle to see how it would work in practice. If EXLA has to match on the metdata, then it requires EXLA itself to know about the operation, and in that case we should just expose the operation in Nx+EXLA themselves.

So for this to work as desired, we would need to make EXLA itself extensible. Custom calls are one mechanism to achieve this. Then someone could truly write extension nodes without ever touch Nx/EXLA itself. But it is yet unclear to me the relationship between custom calls and MLIR. Can we have custom MLIR code in our definitions? Or they must all go through custom calls?

from nx.

polvalente avatar polvalente commented on June 3, 2024

We could implement the operation node either as MLIR instructions or as a custom call. Both would be feasible, I believe.

Maybe EXLA could provide this functionality itself, then we don't have to worry about changing Nx and how to make it so other compilers know about it.

Nx.Defn.Expr is a public module, so there's no harm in making this part of EXLA only.

I'm almost sure we could also make it so people could provide their own symbols as a dynamically linked library for EXLA to link against and load the custom callbacks!

from nx.

polvalente avatar polvalente commented on June 3, 2024

Let's experiment a bit with the format I used with matching on :metadata for now, with implicit coupling between Axon/Bumblebee and EXLA, so we can start exploring this domain

from nx.

josevalim avatar josevalim commented on June 3, 2024

Closing this as for now we want to experiment rather than something actionable.

from nx.

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.