-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
WebGPU support #7380
Comments
WebGPU was recently added to Deno, opening up i.e. usage of GPU accelerated ML frameworks like tensorflow.js server-side. Would be cool to be able to do such things with bun as well. |
There is an implementation of webgpu in webkit now. Ref: https://webkit.org/blog/14879/webgpu-now-available-for-testing-in-safari-technology-preview/ |
We are unlikely to add WebGPU support to Bun in any official capacity until WebGPU is far more widely used. This is a great usecase for napi. |
WebLLM uses wasm combined with webgpu. I’m not sure a node napi would suffice, but it might… I’ll have to see how they connect them. Generally speaking, I think if bun had great ai primitives (or direct support for those that do) it would be a force multiplier. |
WebGPU is not a great AI primitive, imo. It happens to work for that usecase, but it is not designed for that usecase. It would be better to support something designed for AI/LLMs, but it's unclear what that is right now |
AI aside, it would be very relevant for server side rendering of webgpu still, such as unit testing for maplibre-gl, which currently has jest tests with webgl rendering (through headless-gl) |
I'd love to see this in Bun too, at least once WebGPU ships unflagged in Webkit like it did in Chrome last year. This would be perfect for headless automated testing of 3D applications, e.g. ones that use Three.js or Babylon.js with WebGPU backend. Examples of how this is used in Deno for reference: https://github.com/denoland/webgpu-examples/ |
What is the problem this feature would solve?
Unit testing / server rendering of webgpu canvas
What is the feature you are proposing to solve the problem?
I propose for bun to use an off-the-shelf webgpu implementation (like wgpu or dawn), to provide access to a DOM / canvas Web API.
What alternatives have you considered?
The alternative would be from bun to spawn playwright/puppeteer browser, inject the code there to run it in chromium, and then try to exact it into bun and use it in the bun test.
The text was updated successfully, but these errors were encountered: