This 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.
You 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.
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