[libre-riscv-dev] L1 cache and GPU workloads

Jacob Lifshay programmerjake at gmail.com
Tue Jun 16 01:20:05 BST 2020

On Sun, Jun 14, 2020, 21:04 Luke Kenneth Casson Leighton <lkcl at lkcl.net>

> <snip>
> to explain (summarising detailed and indepth discussions that have taken
> place over the past year and a half, learning from many different people):
> because we are splitting into twin L1 caches, and because GPU parallel
> non-overlapping workloads (particularly texture data) make ineffective use
> of L1 caches, expanding the tag size may not be of as much value as might
> otherwise be expected.
> it would be much more useful to add "cache line pinning" such that a GPU
> workload only uses a fractional percentage of the cache.
> this would stop a massively parallel non-overlapping workload from flooding
> the L1 Cache with data that is neverrrr going to be referred to agai.

Do note that a lot of a GPU workload will be rewriting a memory chunk over
and over again because of triangles being drawn on top of other triangles,
as well as using several potentially-colliding memory buffers and textures,
where it's quite common to load from the same section of texture
repeatedly, since each texture sampling operation will read a potentially
large group of adjacent pixels (called a footprint) in order to interpolate
between them.

Also, we want our processor to be good at CPU tasks as well, so having a L1
cache with more than 2 sets is advantageous.


More information about the libre-riscv-dev mailing list