4 ms·
Why do we need such hacks to access basic compute infrastructure?
by amelius 8y ago
Why do we need such hacks to access basic compute infrastructure?
- zapzupnz 8y agoSecurity, not only against bad actors but incompetent programmers having access to the inner workings of other people's machines. The idea is that nothing should normally need to access anything it doesn't actually require; so, in circumstances like this, developers need to go through a few extra hoops to help them engage in safest practices and not blow up other people's machines. Plus, different hardware, different abstractions, and the web has been relatively slow (and rightfully so) to open up access to this level of the computer until fairly recently. Lastly, JavaScript isn't batteries-included, so someone had to come up with this, and apparently it took until today for us to see the fruit of that labour.
- icebraining 8y agoCompiling is a hack now?
- kllrnohj 8y agoThe better question is why would you care? GPGPU has nearly no use outside of HPC applications, and nobody in that world is going to bother trying to make their supercomputer run Chrome. Otherwise for anything "GPGPU" in usage it tends to really just be "GPU" - like applying filters to images. That's just running a shader on a texture, it's something you can do quite naturally in WebGL already. GPGPU had a lot of buzz a few years back, but it's basically just a niche usage these days.
- maeln 8y agoGPGPU is definitely not having "no use outside of HPC". Almost any modern game engine that you use nowadays use GPGPU in some ways (for AI, Physics, some terrain processing, ...). GPGPU is also insanely popular in modern AI these days. Almost any AI framework has backend with CUDA or OpenCL. A lot of Offline renderer also use GPGPU nowadays. And this is just a few example that come to mind. The number of application that benefit from high-latency, high-throughput computations are plenty. Why do you think NVidia is still pushing and updating CUDA ? > Otherwise for anything "GPGPU" in usage it tends to really just be "GPU" It's like saying most turing-complete usage tend to be just "CPU". You can absolutely do GPGPU with just "normal" GPU usage. After-all, what is an array of data if not a texture ? A lot of processing are implemented this way: A texture and a pixel shader. But it doesn't mean that it is not GPGPU. GPGPU means that the GPU doesn't limit us to displaying polygons on the screen.
- kllrnohj 8y ago> Almost any modern game engine that you use nowadays use GPGPU in some ways (for AI, Physics) No, they don't. Those are failed applications. The round-trip time kills it, along with the GPU being generally over-subscribed in the first place while the CPU sits idle. For some stuff like terrain sure, which is why compute shaders exist in directx & vulkan. But it's a rather different usage in practice, and a very different "how you program with it". > Why do you think NVidia is still pushing and updating CUDA ? Because they still sell Tesla cards to the HPC market? Have you not noticed that the GTX cards massively cut CUDA capability because it didn't help games? > GPGPU means that the GPU doesn't limit us to displaying polygons on the screen. OK but that's clearly not what I was talking about? GPGPU in this context was "run non-graphics math written in JS on the GPU". Similar to something like CUDA. Not "here's an actual pixel shader, run it in WebGL". The how matters here. > After-all, what is an array of data if not a texture ? A texture is an array of color channels, and often swizzled by the driver. They are not equivalent to a generic array of data, although if you squint you can get close treating them as similar. But textures are treated differently, which is why actual GPGPU systems exist, because the hack of "treat a texture as an array of data" doesn't really work well.