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 support #39

Open
NHQ opened this issue May 25, 2018 · 1 comment
Open

GPU support #39

NHQ opened this issue May 25, 2018 · 1 comment

Comments

@NHQ
Copy link

NHQ commented May 25, 2018

tensorflow is now available in a javascript flavour, only supporting browsers via webGL rn, but with intents to run out of node.js too (altho only for CUDA? 👃 )

how regal it would be if the ndarray module complex had a GPU backend!

@rreusser
Copy link
Member

rreusser commented May 25, 2018

@NHQ Indeed, it would be very regal!

First, a few links that might be interesting: weblas is pretty neat. Also regl-cnn is an experiment in CNNs in webgl (by the same author as this module). Finally, I know @kgryte is definitely interested in building out long-term infrastructure for this sort of thing in stdlib. (See: @stdlib/ndarray/ctor).

A webgl-ndarray interface would be awesome, but it's pretty challenging. For a start, I'd encourage thinking about this ndarray module as a thin wrapper that just layers some striding and organization onto the underlying data. In that sense, ndarray doesn't really do anything except help you interpret an array of data—I mean which is extremely useful, just that it's good to think of it as interpretation that's merely a (great!) convenience.

So in this sense the biggest challenge would just be creating a workalike interface that knows how to apply and maintain this interpretation to resources on the GPU—because you definitely don't want to shuffle data back and forth between javascript and the GPU if you don't have to…

FWIW, I think WebGL 1 would be pretty annoying to try to generalize in this area due to some things like data types and texture sizes. WebGL would probably make life somewhat easier…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants