Rust Deep Learning Framework


#1

Hi, I want to create a deep learning framework in Rust that supports training, probabilistic programming (For example, variational inference) and graph networks.
I don’t know if I can do it, but I’ll try.

I found a training section in version 0.6 roadmap. Is training support coming soon?

@ehsanmok & @nhynes, would a Rust DL framework be on top of your work or are you doing it?
How can I help? There are no Rust tutorials.


#2

Hey @sherif7810,

Glad to hear that you want to make a Rust DL framework!

I found a training section in version 0.6 roadmap. Is training support coming soon?

Yes, training is coming soon! @jroesch and @MarisaKirisame can comment more on that.

would a Rust DL framework be on top of your work

It’d be on top. There are actually two Rust runtimes: one that binds to the TVM C++ libraries and one that’s written in pure Rust. If you need to use an accelerator (e.g., GPU), that’s only supported by the bindings currently, but it’s definitely on the roadmap to add GPU support to the Rust runtime. I could prioritize bringing that up if you wanted to use it.

There are no Rust tutorials

Ah, yes that’s a bit unfortunate. The best examples are in the tests, for now.


#3

We are working on training rn! The AD algorithm is ready half a year ago, it is just that it need insane engineering effort to make it happend.

We are also thinking about graph neural network, probabilistic programming and named tensor.
RN we have lots of idea and dont know what is the best design. So it is good to diversify!
Something to look at is An Array-Oriented Language with Static Rank Polymorphism
, algebraic graphs with classes, Practical Probabilistic Programming with Monads.

Another option will be to work on relay and help push training.
As a PL person, I understand the hate toward C++. However, I find most of my time working on relay is thinking in my head, learning and designing, and only a minority of my time is spend on my editor. In addition, relay also have plan to move away from C++ and to Rust.
Joining effort will be another option as we are looking at pretty similar things. But both are good options.


#4

IMO, I can not find any significant advantages using Rust. Almost of all IoT ecosystem are built on C/C++, even restrict version of compiler. I understand the hate / personal view on C++, but we must consider the practical industry deployment. Like on Car, on Phone. We should also need to consider many unpopular systems (maybe compared with Linux / Windows / MacOS, for example QNX, AliOS and so on. Don’t have a hope they could have Rust compiler in a short term time, because their ecosystem all are built on C/C++). If we decide to make Relay from C++ to Rust, we should be better to send an RFC, list the affect and solutions of all conditions of we should consider (even the development threshold, we must admit C++ developers group is larger than Rust developers and many deep learning framework developers are familiar with C++ / Python, but not Rust), we also should listen all voices from many aspects / fields, like university / open source community member / industry developers and so on.

Just kind suggestion. I don’t want to let you think I express any prejudice on Rust / programming language.


#5

Thanks for replying. :smile:
I want to help on the Rust side. I know Rust and Python. I used C++ few times years ago, so I’m not good at it.
May you guide me where I should contribute? May you explain this folder to help me get started? Which topics should I try to implement?
It’s my first time contributing to an open source project. I hope I’d be helpful.

There’s the Rust ML WG. I tried to advocate using TVM. If you can convince them, we’ll have more help.