Using clEnqueueMapBuffer Mali-T880

Hi everyone,

I'd like to know what happens when I use the command clEnqueueMapBuffer to the hardware level.

All the buffer at CPU-side cache is invalidated?

And when I use the command clEnqueueUnmapMemObject,

All the buffer at GPU-side cache is invalidated?

Thanks!

Parents
  • Hi rafaelsousa,

    In the Mali driver the memory gets mapped on allocation and remains mapped for the entire lifetime of the allocation, therefore you are right: when clEnqueueMapBuffer gets executed the CPU caches gets invalidated and the same happens when Unmapping.

    Note: unless the Map is a blocking map the cache maintenance will actually happen when the command queue gets flushed not when this command gets enqueued.

    Hope this helps,

    Thanks,

    Anthony

  • Anthony Barbier,

    When I do clEnqueueMapBuffer, only the data set that was modified at GPU is invalidated at the CPU?

    There is one list that maintain all the address of the data set that was modified?

    For example, supose one vector of 1000 elements, the CPU modify the first 100 elements, and then call the clEnqueueUnmapBuffer. It  means that only that 100 positions will be invalidated at the GPU-cache?

    Thanks!!

Reply
  • Anthony Barbier,

    When I do clEnqueueMapBuffer, only the data set that was modified at GPU is invalidated at the CPU?

    There is one list that maintain all the address of the data set that was modified?

    For example, supose one vector of 1000 elements, the CPU modify the first 100 elements, and then call the clEnqueueUnmapBuffer. It  means that only that 100 positions will be invalidated at the GPU-cache?

    Thanks!!

Children
More questions in this forum