Comments (6)
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.
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.
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.
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.
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.
Closing this as for now we want to experiment rather than something actionable.
from nx.
Related Issues (20)
- Remove xla compiler_mode
- Use regions when compiling `if` in MLIR HOT 1
- Quantization via MLIR
- Import and export of MLIR modules
- function Torchx.__jit__/5 is undefined or private HOT 2
- Geometric / Clifford algebra in arbitrary dimensions HOT 4
- Automatically track which variables are inside if/cond/while
- Data Loaders in Nx? HOT 6
- Cannot transform dummy columns to Nx Tensors via Nx.stack HOT 3
- Scholar.Neigbors.KDTree.predict fails when using EXLA as backend HOT 1
- Scholar.Neighbors.NNDescent.fit creashes livebook when using EXLA backend HOT 1
- Nx.slice/3 lengths parameter fails inside defn while HOT 2
- Investigate jax-metal integration
- Investigate IREE integration HOT 1
- Problem with `Nx.LinAlg.norm`'s `axes` option
- EXLA Failed to load NIF library HOT 7
- Default integers to 32-bit precision
- Remove Nx.map/2
- XLA_FLAGS for dumping not returning HLO HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nx.