alpaka icon indicating copy to clipboard operation
alpaka copied to clipboard

Support aligned buffer allocations

Open bernhardmgruber opened this issue 2 years ago • 2 comments

The current buffer allocation API's allow to specify the size of the requested block of memory, but the alignment of the memory block is unspecified. Internally, we rely on the default alignment of the underlying backend. For the CPU backend, we choose the alignment based on the available vectorization width during compilation.

Having the right alignment is relevant for e.g. vectorization or optimizing memory access patterns.

I would like to propose to add support for explicitely specifying an alignment when allocating a buffer. Furthermore, we might consider documenting the default alignment, if no alignment is specified.

bernhardmgruber avatar Apr 12 '22 08:04 bernhardmgruber

This is a generalization of #1686.

bernhardmgruber avatar Apr 12 '22 08:04 bernhardmgruber

It turns out I would need this in LLAMA as well.

bernhardmgruber avatar Jun 10 '22 18:06 bernhardmgruber