OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.

cache prefetch

Fu_J_Intel
Employee
565 Views

does openCL support cache prefetch?

0 Kudos
3 Replies
Robert_I_Intel
Employee
565 Views

In a sense, yes: if something was pulled into LLC$ or L3$, when you access it again, if it wasn't replaced it still be there.

0 Kudos
Fu_J_Intel
Employee
565 Views

thanks, Robert.

I wonder if it is possible to EXPLICITLY prefetch data in OCL,  such as using some built-in kernel function ?

0 Kudos
Robert_I_Intel
Employee
565 Views

Well, there is a block read extension (see Well, there are block reads: https://www.khronos.org/registry/cl/extensions/intel/cl_intel_subgroups.txt ), but that pulls the data all the way to registers. We don't have anything that forces block prefetches into L3$ or LLC$ except that the data is fetched in 64 byte cache lines, so if you touch even one byte, you get the whole cacheline - so that is sort of prefetch, right?

0 Kudos
Reply