Comments (3)
After thinking more about this, I suggest for us to start with while
only and make it clear it is a sequential construct. We can explore something like for
in the future.
from nx.
I am a fan of futhark so I think adding their style of looping is definitely an interesting idea. In terms of adding map
, map_with_index
, reduce
and reduce_with_index
, I am confident in being able to do that with EXLA.
Understanding that the for+:reduce
concept might be foreign/unfamiliar to new users, I am curious if maybe it's a good idea to include both options for users who want their code to be closer to what a normal Elixir program might support?
from nx.
@seanmor5 that's a good question. I went back to Furhark code and I realized the support two looping constructs: for and while:
loop x while x >= 1
loop x for y in expr
If we want to support both loops, then it means this is not quite the same as for+:reduce
. I think we can support while loops like this:
loop x, x >= 0 do
x - 1
end
So I would rather proceed with loop
and then if people think this is a good idea, we can even consider having it as part of Elixir?
from nx.
Related Issues (20)
- Issue with using vectorized tensor in a function
- Issue with broadcast and vectorized axes on v0.6.4 HOT 1
- Convert Nx.LinAlg.lu to optional callback HOT 2
- EXLA/MLIR: Add missing Nx.LinAlg operations HOT 2
- EXLA/MLIR: run Nx and Nx.LinAlg doctests
- Convert Nx.LinAlg.eigh to optional callback
- Convert Nx.LinAlg.qr to optional callback HOT 1
- Convert Nx.LinAlg.cholesky to optional callback
- Fix sign of zero values in Nx.ceil and Nx.conjugate HOT 1
- Add executable-level caching to Nx.Defn in EXLA HOT 1
- Nx.LinAlg.solve/2 with Nx.BinaryBackend returns tensor with wrong state HOT 6
- Nx.all_close not working with EXLA HOT 13
- How to Set XLA log level?? HOT 2
- could not compile dependency :exla HOT 3
- Implement Nx.stack as a default callback
- Expand docs for the :axes option in Nx.gather/3 HOT 2
- Remove xla compiler_mode
- Use regions when compiling `if` in MLIR HOT 1
- Quantization via MLIR
- Special node acceleration via metadata HOT 6
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.