Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPU.js Adoption #30

Open
christianechevarria opened this issue Apr 24, 2019 · 16 comments
Open

GPU.js Adoption #30

christianechevarria opened this issue Apr 24, 2019 · 16 comments
Assignees
Labels
✨ enhancement Something could be better 👀 high priority Prioritized item 🕰️ long term Something that is going to take a minute

Comments

@christianechevarria
Copy link
Member

Screenshot 2019-04-24 at 7 41 34 PM

@dan-ryan
Copy link

Crazy suggestion, you could build on top of Tensorflow.js like what Ml5.js has done. You would get GPU browser support, and fast Node.js support (with CUDA). But that would be a large rewrite :)

@luiscarbonell
Copy link
Member

@dan-ryan I'm crazy enough to explore the possibility; but I really would like to keep the API as simple as in-humanely possible (i.e. "teach a year old, in 20 minutes").

I would love to create "plug-gable" "firmware" layer where we could support different computational unit (e.g. CPU, GPU, TPU, etc.) automatically without off-loading the "figure it out" part on someone.

I'll have to take some time next week to really tackle some solid architect-ing; but I would love to, ideally, be a zero dependency library with just some simple C++ bindings to CUDA core support.

The phrase "strong defaults" comes to mind.

I'll have to give this a deeper look - maybe do it in parts, or on a contiguous roadmap (avoid Angular v1 to v2 scenario).

@dan-ryan
Copy link

dan-ryan commented Apr 25, 2019

Well since you said you were crazy enough to explore... :)

Tensorflow seems to be the standard low-level neuro-network library on the desktop. Tensorflow.js has only been around a year before that it was called DeepLearn.js. I see Tensorflow.js becoming the standard on browsers. It's pushed by Google and they have the money.
It's quite difficult to learn and they mention they won't do anything high level like neuro-evolution. Ml5.js is built on top of Tensorflow.js and makes everything easy, but they are only focused on already trained models, like image classification. While awesome for images and videos, it is limited on what you can do.

Carrot could be rewritten on top of Tensorflow.js like what M15.js has done, and we would get all the low-level advantages with that. The strengths Carrot could have that it has a simple API and we support high-level algorithms.

There are also many other libraries that would give us GPU support.
Synaptic 2.0 discussions brought up a lot of ideas:
cazala/synaptic#140

@christianechevarria christianechevarria added the ✨ enhancement Something could be better label Apr 27, 2019
@dan-ryan
Copy link

Neataptic had this issue with ideas:
wagenaartje/neataptic#49

@robertleeplummerjr
Copy link

Guys, GPU.js now runs on node, and I believe v2 rc14 will be out soon. Perhaps tomorrow.

@luiscarbonell
Copy link
Member

@robertleeplummerjr I'm playing around with gpu.js right now - fun stuff!

All good so far - I did note a small kink (gpujs/gpu.js#478), but otherwise working like a charm right now. I'll keep you posted.

@robertleeplummerjr
Copy link

How is implementation going?

@luiscarbonell
Copy link
Member

Really well so far; but I hit an impasse (unrelated).

We've been trying to clean up the code base, standardize it, and write test to clean a little bit of the technical debt we were carrying and help speed up the feature unit economics on the project.

I'm waiting to get some motherboards for a handful of NVIDIA Tesla v100's that I have at home so I can a better testing environment than simulating a GPU - it keeps eating up my Chromebook (🔥).

I'm talking to a friend of mine in a small IT startup right now who has a few laying around - so I'll like "Frankenstein" a rig for model development and testing grounds for gpu.js adoption.

In the meantime, I'm going to focus on adding streaming to the library.

@robertleeplummerjr
Copy link

Cool! If you need a sponsored + hosted GPU's, I know a guy...

@luiscarbonell
Copy link
Member

External Response

That would be super cool! ...email (luis@liquidcarrot.io)?

Inner Thoughts

@robertleeplummerjr
Copy link

Details sent.

@christianechevarria christianechevarria added the 🕰️ long term Something that is going to take a minute label Aug 20, 2019
@christianechevarria christianechevarria added the 👀 high priority Prioritized item label Aug 20, 2019
@robertleeplummerjr
Copy link

For those following this, things with GPU sponsor have been going nicely on all fronts.

@luiscarbonell
Copy link
Member

@robertleeplummerjr The introduction was awesome! 👌 Will begin testing as soon as we get setup.

@robertleeplummerjr
Copy link

What I really need from you and others is benchmark data, if you have a chance. Also if you find any bugs.

@luiscarbonell
Copy link
Member

I'll shoot you over a more detailed report later, but "off-the-cuff" GPU.js starts outpacing CPU on my modified Chromebok (4 Core - 1.4GHz) around 1300 paramaters (i.e matrix multiplications of at least 1300x1 * 1300x1) - after that it scales REALLY well. But creating the kernel has some overhead initially - which totally makes sense.

I haven't really found any strong bugs yet more like "little quirks", but I'll shoot them over to your issues threads as I start noting them a little more concretely. 👍

@robertleeplummerjr
Copy link

Ty! Also, video element will be a valid input for GPU.js v2. Which will be released today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement Something could be better 👀 high priority Prioritized item 🕰️ long term Something that is going to take a minute
Projects
None yet
Development

No branches or pull requests

4 participants