3 ms·
Surprised nobody has mentioned this, but it looks like it implements the render kernels in ISPC^, which is a tool that exposes a CUDA-like SPMD model that runs
by daniel-thompson 4y ago
Surprised nobody has mentioned this, but it looks like it implements the render kernels in ISPC^, which is a tool that exposes a CUDA-like SPMD model that runs over the vector lanes in the CPU.
ISPC is also used by Disney's Hyperion renderer, see https://www.researchgate.net/publication/326662420_The_Design_and_Evolution_of_Disney%27s_Hyperion_Renderer https://www.researchgate.net/publication/326662420_The_Desig...
Neat!
^ https://ispc.github.io/ https://ispc.github.io/
- xmcqdpt2 4y agoNeat! Vectorization is the best part of writing Fortran. This looks like it makes it possible to write fortran-like code in C. I wonder how it compares to ifort / openMP?
- daniel-thompson 4y agoOpenMP starts with a serial model, the programmer tags the loop they want to run in parallel with a directive, and the compiler tries to vectorize the loop. This can always fail, since it relies on a computer program reasoning about an arbitrary block of code. So you have to really dig into the SIMD directives and understand their limitations in order to write performant code that actually does get vectorized. ISPC starts with an SPMD programming model, and exposes only operations that conform to the model. "Vectorization" is performed by the developer - it's up to them to figure out how to map their algorithm or problem to the vector lanes (just like in CUDA or OpenCL). So there's no unexpectedly falling off the vectorization path - you start on it, and you can only do stuff that stays on it, by design.
- xmcqdpt2 4y agoSpecifically I meant OMP workshare which parallelizes vector operations in Fortran, https://www.openmp.org/spec-html/5.0/openmpsu39.html https://www.openmp.org/spec-html/5.0/openmpsu39.html sorry should have been more specific.
- ykl 4y agoHyperion does not use ISPC. Source: I am one of the Hyperion developers.
- daniel-thompson 4y agoI thought I saw somewhere it did; I must have misread. Thanks for the clarification!
- Tunabrain 4y agoOh wow, I bump into you everywhere!