3 ms·
ISPC vs OpenCL is a very interesting discussion. I think the discussion warrants a bit more introduction. The ideal is to deliver the illusion of true threads
by dragontamer 8y ago
ISPC vs OpenCL is a very interesting discussion. I think the discussion warrants a bit more introduction.
The ideal is to deliver the illusion of true threads to the programmer, where each thread is mapped to a SIMD unit. This is because on x86 systems, an AVX2 SIMD unit (YMM Register) can support 8x 32-bit values (256-bits). That's 16x 32-bit values for ZMM AVX512 registers. So you get a huge boost to parallelism if you treat each SIMD-unit as a separate thread.
In effect: it is far cheaper to make SIMD-"threads", than to make "real threads". So you get Vega64 (4096 Shaders) or NVidia V100 (5120 CUDA Cores). Even on Intel, you effectively get 8x SIMD cores per actual core.
The question is how to deal with this mapping, to keep things efficient and reasonable for the programmer. OpenCL, and ISPC have different strategies for dealing with this abstraction and trying to efficiently map this illusion to the programmer. The general "Thread Group" (OpenCL) and "Wavefront" (CUDA) abstraction seems to primarily capture this SIMD-width question.
But there's one additional thing on GPUs that don't exist on CPUs: and that's the LDS memory (AMD) or Shared memory (NVidia). Shared Memory is effectively a manually-managed L1 cache on GPUs.
GPUs have very weak cache hierarchies. In high-performance GPGPU compute, it is preferred for the programmer to manually manage transfers to and from global RAM to the ~64kB Shared Memory region. And of course, only Wavefronts / Threadgroups are guaranteed to share a portion of shared memory.
Intel systems don't need this abstraction: Intel CPUs have a full and proper cache which is unified with global RAM.
So I guess Intel is "taking a victory lap" with this blog post: noting that all of the complexity of Wavefronts / etc. etc. isn't really necessary on ISPC / Intel systems.
---------
Still, Intel never really achieved the performance that NVidia V100 or AMD Vega64 can achieve. Even Intel's Xeon Phi has far lower raw performance than what NVidia / AMD was able to put out.
Its certainly more difficult to write high-performance code on GPUs. But with so much more raw power on GPUs, many people have been able to extract higher performance in practice.
- marmaduke 8y ago> Intel CPUs have a full and proper cache which is unified with global RAM > more difficult to write high-performance code on GPUs. But with so much more raw power on GPUs This seems two sides of the same coin; of course you can extract higher performance with lower coupling. I don’t think the Xeon Phi was given a fair chance; they did two iterations on the idea before canning it. NVidia has been doing video cards forever.
- bonzini 8y agoXeon Phi's origins are in Larrabee. They sold two iterations, but they had several more in house.
- pjmlp 8y agoI sat on an Intel session at GDCE 2009 about introduction to Larrabee programming and how it would take over the GPU programming world for game developers. Making it a niche product only available to a selected few, instead of mainstream GPGPUs, meant most of us hardly cared about it.