Ok that is good to hear. I imagined redefining the
+ operator would be quite a fundamental change.
Ok that is good to hear. I imagined redefining the
I wish it was named TNT (e.g. this new thing from Jose’s benchmark) and it would boom like TNT too
Yup, here’s a quick example:
as you can see the implementation is quite straightforward!
A great summary was already posted above. Additionally adding a story.
After looking at the benchmarks, A person guessed they are doing it on GPU, sshhh keep it secret… then he was invited to the project!
I am SUPER excited about Nx I feel that Elixir is a great language in which to express numerical computation of the sort that is done in machine learning, just we didn’t have the right low-level support for it. That is, until Nx!
Does it work only on Nvidia GPUs or also on AMD ones?
Afaik most tooling in machine learning does work with CUDA, so Nvidia GPUs.
XLA has a ROCm backend targeting AMD GPUs so the XLA Nx backend will support AMD. I’ve tested most of the project on an AMD GPU and it works, but we primarily test on Nvidia GPUs so there may be more issues when working with AMD GPUs. I also know there are only a few ROCm enabled AMD GPUs, but I’m not as familiar with the ecosystem.
I was actually recently thinking about the same thing. Thanks to Elixir macros power it would be not that hard.
I am more interested in CoreAI and Apple M1 Neural cores. This may be interesting stuff.
apple recently did an optimized tensorflow 2.4 Accelerating TensorFlow Performance on Mac — The TensorFlow Blog - so believe those changes should be upstreaming next few months…
And you can now rent those on the cloud by the way: M1 Mac mini in the cloud now available for 12 cents/hour - 9to5Mac
I really enjoyed listening
- Project Nx looks awesome
- Great to see José still excited about Elixir (anyone else think the man is a machine? )
- Well done @seanmor5 for helping bring the idea to life and @zacky1972 for helping prove it’s possible with Pelemay
- Well done PragProg for continually supporting and helping push the community forward
- Well done everyone else who worked on it all or helped make it all possible
- Well done Thinking Elixir - I don’t think I’ve listened to any of your podcasts before (I am terrible at multitasking so don’t get a chance to listen to any these days) but I love your vibe!
- And of course well done all of you for keeping us entertained with your guesses and of course all your enthusiasm
I think some homage to Pelemay is due too, The team at Fukuoka University has been working on similar ideas for a while.
Definitely Kip! In fact I recently created a Pelemay group here on the forum
I’m not sure why but I thought Pelemay was primarily intended to make use of GPUs in a more general context - to give Elixir an overall speed-boost since GPUs have a ton of cores, but I see now it is ML focused too. I wonder what the differences are between Nx and Pelemay, and whether there might be a collaboration of sorts in the future (I’ve updated my post above btw )
Admittedly I was half asleep and slightly distracted when listening to the Nx podcast too, and thought it was more a general speed up of number crunching operations as well (in my defence I didn’t get any sleep last night )
Is it automatic differentiation in elixir
These cores are, however, not suited to perform more generic operations, and thus giving Elixir “overall speed-boost” is not something that happens automagically. It’s not going to speed up string concatenations, I/O, regexp, JSON parsing, data serialization and things like that. And this is bulk of operations your traditional CRUD web app does. The GPU may have a ton of cores, but they can’t do any of these things, at least not in performant manner.
But what you can do is optimize certain algorithms, hashing algorithms, cryptographic ones, any signal processing (image/audio included), a lot of numerical methods and of course machine learning / AIs.
I had always thought that with Erlang processes being so lightweight they could take more advantage of GPU cores than the other languages that use much larger threads for parallelism and concurrency etc.
That’s still a nice win and out of curiosity, would this be the same then for any language that has some sort of GPU adaptation? Or are there any unique advantages to Erlang/Elixir (because Erlang processes are so small for instance).
I would actually think more in terms of data processing pipelines that can be orchestrated very well in Elixir. Think Streams or GenStages that do things and some of these things could benefit from being executed on GPU… Think there’s a medical system that does take in files from some scanning machine, runs them by auto cropping, then detects cancer cells, then produces enhanced version then uploads to some repository for doctors to analyse. Some of these steps can be accelerated by GPU some don’t, but having it all in the same nice Stream or GenStage pipeline is definitely making lifes of programmers easier.
That’s me actually guessing how this can be used. I am yet to look into details into Nx when the source code drops.