| Thread overview | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
November 08, 2015 D for TensorFlow-like library | ||||
|---|---|---|---|---|
| ||||
Google recently announced a distributed computational graph engine called tensorflow (https://www.youtube.com/watch?v=90-S1M7Ny_o). They have written the backend in C++ and have a Python/C++ frontend. I am a D newbie and am reading through Ali's book, but still dont know enough about it, hence the question. Will it be a good idea to develop an opensource implementation in D than C++, if I try to write it ? Since I am reading about D, I would love if I can apply what I learn here. Sorry if the question sounds stupid, I am not a systems programmer and mostly work with Python-Numpy stack. | ||||
November 08, 2015 Re: D for TensorFlow-like library | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Muktabh | On Sunday, 8 November 2015 at 13:48:30 UTC, Muktabh wrote:
> Will it be a good idea to develop an opensource implementation in D than C++, if I try to write it?
I mean, you can if you want to, but it would make more sense to just make bindings to library for D. Rewriting everything for a language in that language doesn't scale.
Also, in the future, please post questions like this to the "Learn" page. Thanks.
| |||
November 08, 2015 Re: D for TensorFlow-like library | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Jack Stouffer | On Sunday, 8 November 2015 at 16:31:44 UTC, Jack Stouffer wrote:
> On Sunday, 8 November 2015 at 13:48:30 UTC, Muktabh wrote:
>> Will it be a good idea to develop an opensource implementation in D than C++, if I try to write it?
>
> I mean, you can if you want to, but it would make more sense to just make bindings to library for D. Rewriting everything for a language in that language doesn't scale.
>
> Also, in the future, please post questions like this to the "Learn" page. Thanks.
Sorry for posting it in the wrong group, I was not aware about the learn group.
We cannot make D bindings to it because it is a closed source project by Google and only a spec like mapreduce will be released, so I thought maybe I might try and come up with an open source implementation. I was just curious if D would be a good choice language for a library like this instead of C++ which is used by Google.
| |||
November 08, 2015 Re: D for TensorFlow-like library | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Muktabh | On Sunday, 8 November 2015 at 17:47:33 UTC, Muktabh wrote:
> We cannot make D bindings to it because it is a closed source project by Google and only a spec like mapreduce will be released, so I thought maybe I might try and come up with an open source implementation. I was just curious if D would be a good choice language for a library like this instead of C++ which is used by Google.
Well, if you are going to write it yourself i see no reason why D would be any worse a language the C++. You can get the same speed, interface with the GPU in pretty much the same way etc. You could probably do a lot in compile time to simplify writing kernels in D. From my point of view D is simpler than C++ as-well so that should help implementation. (no headers, sane meta programming etc.)
It does seem to be a huge undertaking however since tensorflow seems to be a very complex library. But if you feel confident in this domain then I would say go for it. It would be very cool to have something like this in D.
| |||
November 08, 2015 Re: D for TensorFlow-like library | ||||
|---|---|---|---|---|
| ||||
Posted in reply to TheFlyingFiddle | On Sunday, 8 November 2015 at 18:06:00 UTC, TheFlyingFiddle wrote:
> On Sunday, 8 November 2015 at 17:47:33 UTC, Muktabh wrote:
>> We cannot make D bindings to it because it is a closed source project by Google and only a spec like mapreduce will be released, so I thought maybe I might try and come up with an open source implementation. I was just curious if D would be a good choice language for a library like this instead of C++ which is used by Google.
>
> Well, if you are going to write it yourself i see no reason why D would be any worse a language the C++. You can get the same speed, interface with the GPU in pretty much the same way etc. You could probably do a lot in compile time to simplify writing kernels in D. From my point of view D is simpler than C++ as-well so that should help implementation. (no headers, sane meta programming etc.)
>
> It does seem to be a huge undertaking however since tensorflow seems to be a very complex library. But if you feel confident in this domain then I would say go for it. It would be very cool to have something like this in D.
Thanks for your answer.
It is a huge task and I am not going to achieve it all alone myself. I will start it alone but if my startup (which works on Deep Learning) scales up, we might work on it as a team.
| |||
November 08, 2015 Re: D for TensorFlow-like library | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Muktabh | On 11/08/2015 01:36 PM, Muktabh wrote:
> It is a huge task and I am not going to achieve it all alone myself. I
> will start it alone but if my startup (which works on Deep Learning)
> scales up, we might work on it as a team.
If you have an edge regarding design ideas for such an engine, that would be a task well worth tackling, and D is a great language for rapid development of efficient numeric code. I recommend securing the help of D experts here to get you started - e.g. share your code here early and often for feedback. Good luck! -- Andrei
| |||
January 12, 2016 Re: D for TensorFlow-like library | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Muktabh | I could perhaps help out in making this library. I was just looking for machine learning libraries for D, in particular for doing deep learning, but it doesn't seem like there are any since this thread came up at top when I search for it at Google. Or are there? Also, if the library is going to support GPU acceleration, which it has if it is to be at least somewhat competitive, it would be great if it could use OpenCL to support non-NVIDIA graphics cards, since I only have an Intel graphics controller... In fact, it might even become the *only* deep leaning library that supports non-NVIDIA GPUs natively (by judging from this thread: https://community.amd.com/thread/170336), which would be really nice :) Did you start any development on it? | |||
January 12, 2016 Re: D for TensorFlow-like library | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Muktabh | On Sunday, 8 November 2015 at 17:47:33 UTC, Muktabh wrote: > > We cannot make D bindings to it because it is a closed source project by Google and only a spec like mapreduce will be released, so I thought maybe I might try and come up with an open source implementation. The github repository looks pretty open-source to me: https://github.com/tensorflow/tensorflow | |||
January 13, 2016 Re: D for TensorFlow-like library | ||||
|---|---|---|---|---|
| ||||
Posted in reply to jmh530 | On Tuesday, 12 January 2016 at 23:18:08 UTC, jmh530 wrote:
> The github repository looks pretty open-source to me: https://github.com/tensorflow/tensorflow
Hm, maybe making D bindings to an already existing library wouldn't be such a bad idea. But how do one create such bindings? Anyone knows of any good resource, like a tutorial, explaining how to do it?
Otherwise I thought it could be nice to create a new library in D, partly for myself to practice D programming and partly to bring more people into the D community and make it grow faster. But maybe that's naïve?
| |||
January 13, 2016 Re: D for TensorFlow-like library | ||||
|---|---|---|---|---|
| ||||
Posted in reply to krikru | On Wednesday, 13 January 2016 at 15:10:13 UTC, krikru wrote:
>
> Hm, maybe making D bindings to an already existing library wouldn't be such a bad idea. But how do one create such bindings? Anyone knows of any good resource, like a tutorial, explaining how to do it?
It looks like TensorFlow is C++ with a Python front-end. The first thing I would try is using PyD to call the python TensorFlow library. There's work being done on calling C++ libraries from D, but I don't have any experience with it.
I just read the Learning D book's section on C bindings. I found it advanced, but a good read. There are some tools that help transforming .h files to .d files (htod and dstep).
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply