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

Understanding the differences between headless-gl? #1

Open
transitive-bullshit opened this issue Nov 1, 2018 · 4 comments
Open

Understanding the differences between headless-gl? #1

transitive-bullshit opened this issue Nov 1, 2018 · 4 comments

Comments

@transitive-bullshit
Copy link

First off, I love seeing that Google is contributing in this space 👍

Like many Node.js devs, I'm currently a heavy user of headless-gl.

I was wondering if you could break down the differences in project aim, scope, and implementation between these two related projects?

Thanks!

@transitive-bullshit transitive-bullshit changed the title Understanding the difference between headless-gl? Understanding the differences between headless-gl? Nov 1, 2018
@nkreeger
Copy link
Contributor

nkreeger commented Nov 1, 2018

Sure -

So some background - I currently work primarily on TensorFlow.js. Outside of our current offerings for accelerated math/learning (browser: WebGL, node: TensorFlow C library) we've been evaluating alternatives. One alternative is to offer our WebGL accelerated "headless" for Node users. This enables some flexibility w/ desktop deployment (i.e. Electron) and provides some opportunity for running the platform on IOT-like devices (i.e. Raspberry Pi) and maybe even stretch this for some mobile options (REACT-native)

This project was created outside of headless-gl for a few reasons:

  • To enable the platform for TensorFlow.js to run headless-GL operations and provide a newer solution for the Node community
  • Use the latest binding API in Node (N-API) - this provides a new platform for binding development. The headless-gl package uses the older NAN api.
  • Use newer versions of ANGLE: headless-gl relies on an old version of ANGLE that still uses node-gyp. We'll be supplying pre-built binaries of the latest ANGLE cuts similiar to how TensorFlow libraries are supplied for tfjs-node
  • To enable future GL-compute opportunities for TensorFlow.js and the Node community - specifically Compute Shaders (maybe OpenCL APIs)
  • Also, headless-gl is no longer being developed and targets an older WebGL spec (1.0.3). For TensorFlow.js - we prefer WebGL 2.0 and higher.

There are a bunch of things on my TODO-list to that might help (I'll file tickets when I have cycles)

  • Auto-generate all binding code from the Khronos IDL files (I hand-implemented the GL methods we need for tfjs).
  • Roll in and integrate the WebGL test suite from Khronos and run those tests through Jasmine + CI

Hope this helps - we don't have a package published yet. I was mostly focused on getting this code open-sourced to help speed development for myself and the community. I'll be putting together PRs to make this happen over the next couple of weeks.

@transitive-bullshit
Copy link
Author

Thanks so much for that detailed breakdown @nkreeger. It all makes a lot of sense.

I've been looking forward to stackgl/headless-gl#109 resolving (adding WebGL 2.0 support to headless-gl) for a long time. Maybe it would make sense to think about this project as the spiritual successor of headless-gl?

Would love to hear from @mikolalysenko / @dhritzkiv / @mikeseven to get their thoughts on this.

Really excited to see all of this come to fruition! 💯

@mikolalysenko
Copy link

If google wants to make their own officially-branded node-webgl bindings and maintain them then that's great. They're better positioned to do all this since they own the lower parts of the stack anyway (like ANGLE/v8/etc.).

@DavidPeicho
Copy link

I was planning on starting back this project for WebGL2. I think I get quite well how the stack works, but if someone with strong v8 internals skills could do it that would even be better. The work everyone provided here is anyway amazing! Thanks a lot!

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

4 participants