Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
22665 Discussions

Two questions on internal cache memory in GPU

JLee146
Beginner
2,383 Views

Hi, I am wondering how the cache works inside the integrated GPU and

whether the integrated GPU provides the instruction to flush out

the cached data from the GPU to system memory (DRAM).

The case that I consider is when the GPU kernel shares the virtual address with CPU

by means of Shared Virtual Memory (SVM).

As far as I know, Intel Integrated GPU (Currently I use the Skylake i7 Processor) has

its internal cache memory to store the fetched data from the system memory (DRAM).

However, I cannot understand how the internal cache mechanism works

inside the Intel Integrated GPU. Also, I would like to know about the the size of the cache,

when the data is cached and evicted, and cache eviction policy in GPU.

Also, as the Intel CPU provides the instruction "clflush" for flushing out the specific data

from the CPU cache, does the intel Integrated GPU provides the same purpose instruction

to flush out GPU internal cache memory?

After I briefly read the GPU programming reference guide, I found the instruction

called MI_FLUSH, but I am not sure how it works and

how can I make the GPU invoke this instruction neither.

It seems that I couldn't program the GPU kernel with asm keyword

which may mean no assembly support in GPU kernel compiler.

Thanks in advance

Best regards

Jaehyuk

0 Kudos
3 Replies
idata
Employee
1,434 Views

Hello Jae.Lee,

Thank you for joining the Graphics community.

Please let me double check your inquiry, I will update thread as soon as possible.

Regards,

Amy.

0 Kudos
RonaldM_Intel
Moderator
1,434 Views

Hi Jaehyuk,

You've asked some good, low-level questions, but hopefully I can help by redirecting you a bit...

If you're interested in writing an SVM application, I believe you'd want to use the OpenCL 2.0 API.

Since your Skylake supports OpenCL 2.0's Fine-Grained Buffer SVM, no explicit GPU cache flushing is necessary (i.e. all involved caches are coherent). Whereas if you want more explicit flushing control, you can instead use their Coarse-Grained Buffer SVM.

Hopefully this article can help you get up to speed on these concepts: https://software.intel.com/en-us/articles/opencl-20-shared-virtual-memory-overview OpenCL™ 2.0 Shared Virtual Memory Overview | Intel® Software

Best Regards.

Ronald M.

0 Kudos
idata
Employee
1,434 Views

/thread/114293 Jae.Lee, hope the information posted above helped you.

If you need further assistance let us know.

Regards,

Amy C.

0 Kudos
Reply