3 ms·
Matt Pharr wrote a series of posts telling the story of ispc: https://pharr.org/matt/blog/2018/04/18/ispc-origins.html https://pharr.org/matt/blog/2018/04/18/is
by rrss 7y ago
Matt Pharr wrote a series of posts telling the story of ispc: https://pharr.org/matt/blog/2018/04/18/ispc-origins.html https://pharr.org/matt/blog/2018/04/18/ispc-origins.html
I found them extremely interesting - highly recommended.
- joe_the_user 7y agoThat is an interesting read - compiler writers got hung up on creating auto-vectorization where Cuda is essentially manual vectorization. And that's the thing. Once you find ways that writing a massively vectorized program on a GPU makes sense, why would you write a program where you had to hope your program gets vectorized? That said, as I understand things, vectorization can fail with Cuda if you allocate more kernels than exist on the chip, in which case the chip may run the kernels in serial, producing surprising results.
- rrss 7y agoThat isn't really a failure case in cuda (or opencl). It's very common to launch more blocks/workgroups than can be resident simultaneously on the GPU.
- joe_the_user 7y agoNeither autovectorization-fail nor Cuda executing kernels in serial is a "fail-fail", both are fall-back actions that accomplish a given task in a bit longer than the explicit instructions imply. That said, executing kernels in serial can supposedly create problems if a programmer creates logic that assumes kernels are always moving in lock-step.
- Fronzie 7y agoAfter reading, I do wonder, though: If one would work out the 'packet' datatype of the Eigen (http://eigen.tuxfamily.org/index.php?title=Main_Page http://eigen.tuxfamily.org/index.php?title=Main_Page) library, wouldn't that give the same kind of parallelism? Together with a parallel-for from, for example, Intel's TBB library would make it parallel. Making a new language imposes a huge development cost. Code will have to be adjusted. Although the story is interesting, especially with notes on company politics, it is a bit one-sided on the technical side. The compiler-chiefs might have had a point that went beyond 'politics'.
- marmaduke 7y agoIt's a variation on Clang, so calling it a new language seems overkill. It adds the OpenGL notion of uniform and varying variables, so that you can be explicit about SIMD without it being awkward (pragmas, compiler flags, prayers, assembly readings). I rewrote some OpenCL kernels for ISPC and it was a great experience. The resulting shared object could just be loaded and called from ctypes in Python, where OpenCL requires a lot of rituals.