4 ms·
Gpu.js: GPU Accelerated JavaScript
- dang 4y agoRelated: Gpu.js – GPU Accelerated JavaScript - https://news.ycombinator.com/item?id=19264154 https://news.ycombinator.com/item?id=19264154 - Feb 2019 (113 comments) Gpu.js – GPU Accelerated JavaScript - https://news.ycombinator.com/item?id=14773964 https://news.ycombinator.com/item?id=14773964 - July 2017 (77 comments)
- tppiotrowski 4y agoThis library transpiles JS to WebGL which allows computations to run in parallel on the GPU instead of one by one on the main JS thread. I used this library to prototype shademap but I think it's no longer maintained. I PRed a fix to correct atan2 over a year ago and no movement [1]. Because this library optimized for simplicity over performance, switching to vanilla WebGL will get you better performance (especially with textures) in the long run. I do highly recommend it if you're a web developer interested in harnessing parallel processing. [1] https://github.com/gpujs/gpu.js/pull/683 https://github.com/gpujs/gpu.js/pull/683
- jagged-chisel 4y agoThe repo shows activity within the last two months. Might need to ping a maintainer with your PR number.
- amelius 4y agoIs there an equivalent for Python? Which one is most widely used?
- ianbutler 4y agoYou can use Numba which is for generic accelerated work, or really any ML library will have math primatives you can use just fine for non ML purposes. That said there are overhead considerations and restrictions compared to normal Python programming for any of these solutions so make sure you really need the GPU.
- mosselman 4y agoAnd how about Ruby anyone?
- hot_gril 4y agoI wish NumPy had it built in.
- Waterluvian 4y agoI assume that any general purpose user should probably begin with web workers? I’m guessing this is very fast for specific kinds of processing tasks?
- zmmmmm 4y agohas someone taken this to its logical conclusion and made a way to run models from PyTorch etc?
- hot_gril 4y agoSo, kinda like CUDA but works in browsers. Cool!