Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

MM_PREFETCH re REAL data

jimdempseyatthecove
Honored Contributor III
267 Views

In the IVF documentation, Intrinsic subroutine, MM_PREFETCH

In descriptions

hint = 0 ... Use this for integer data
hint = 1 ... Use this for REAL data

The compiler directive PREFETCH does not have this description. Examples seem to indicate fetching REALs to L1 may be effective.

Does this mean that MM_PREFETCH-ing of REALs to L1 is not (generally) effective? .OR. implies that the VPU does not fetch from L1?

Please explain.

Jim Dempsey

0 Kudos
2 Replies
TimP
Honored Contributor III
267 Views
As you mention VPU, I'll try to answer about MIC KNC. For that platform, typical strategy is to prefetch first to L2 then to L1. There might be cases where hardware prefetch takes care of L2 and explicit prefetch to L1 works well to position data for VPU. For other platforms, these distinctions shouldn't be as important, or the platform may over-ride the hints.
0 Kudos
jimdempseyatthecove
Honored Contributor III
267 Views

Thanks Tim,

I am targeting/using KNL. I experimented with prefetching into L2. This did not help, and had a very small detrimental effect. So it appears that the hardware prefetcher may have prefetched into L2 (or there were excessive TLB misses), but I did not experiment with prefetching only to L1 (which is counter-productive when the data is not present in L2).

Jim Dempsey

0 Kudos
Reply