4 ms·
I'd say being able to program GPUs as general purpose compute devices & general SIMD vectorization in high level language is pretty significant. it has opened u
by DesiLurker 5y ago
I'd say being able to program GPUs as general purpose compute devices & general SIMD vectorization in high level language is pretty significant. it has opened up many applications like machine learning previously unavailable.
IMO some C++20 features like coroutines rank pretty high in introducing new ways of programming.
- ColinWright 5y agoI have a question about that, and despite asking in several places, and reading lots of documents, I've ever been able to find an answer that makes sense. Maybe you can help me. I have an algorithm that I used to run on a SIMD machine. It's a single, simple algorithm that I want to run on lots of different inputs. How can I run this on a GPU? From what I read about GPUs it should be possible, but nothing I've read has made any sense about how to do it. Can you point me in a suitable direction? My contact details are in my profile if you'd like to email to ask for more information. Thanks.
- emllnd 5y agoHi Colin. A few ways to go about it, requires getting some initial tedium done to get started. I would recommend the course https://ppc.cs.aalto.fi/ https://ppc.cs.aalto.fi/ as a resource, goes through specifics of implementing an example data-crunching program using both a vectorized/SIMD CPU approach (ch1-2) and a GPU approach (ch4, using Nvidia Cuda specifically). Another approach would be to upload data to GPU in dx/vulkan/metal/opengl buffers or textures and run shaders on them, plenty of resouces out there but I understand it’s tricky to find a suitable one. Happy to discuss more
- DesiLurker 5y agoI think you'd be better served by using something like OpenCL. especially if it was already running on simd core then it should be relatively straightforward to port to openCL. the mental model to follow would be to think of a gpu as a collection of identical simd machines that are programmed in simplified version of C. thinking further, if you have never programmed gpgpu processors you may be better off porting your code using NVIDIA CUDA (assuming you are targeting desktop graphics). it had better tools and overall a better ecosystem.