OpenCL vector types use SIMD

I currently have a large array of floats that I process in my OpenCL core. I am wondering if I am dividing this array and instead using an array of OpenCL types if this speeds up the process. Basically, if I had an array of 4,800 floats, I would split it into an array of 300 float16 vectors. Will it use SIMD?

+7
source share
2 answers

Intel actually describes what their OpenCL SDK does: see Writing Optimal OpenCL ™ Code Using the Intel® OpenCL SDK . You might want to check this out as an addition to benchmarking. The interesting part begins in chapter 2.3.

To answer your question: yes, he will use SIMD. But in order to “maximize the use of CPU vector blocks using vector data types”, you should really read this document.

+7
source

Maybe not. It depends on the OpenCL implementation and the hardware your program runs on.

The only way to make sure that it provides improvement is by comparing on platforms and implementations of interest - for a range of vector sizes (e.g., comparing 1 (scalar), 2, 4, 8, and 16).

0
source

All Articles