[PATCH v1 3/3] gpu/cuda: mem alloc aligned memory

Stephen Hemminger stephen at networkplumber.org
Mon Jan 3 19:17:41 CET 2022


On Mon, 3 Jan 2022 18:15:11 +0000
Elena Agostini <eagostini at nvidia.com> wrote:

> > Alignment only makes sense if power of two. The code should check that and optimize
> > for that.
> >  
> 
> The alignment value is checked in the gpudev library before
> passing it to the driver.
> 
> Adding this kind of checks in the driver has been rejected in the past because it was
> considered dead code (the library was already checking input parameters).
> 
> Let me know what are the preferred options.

Driver could use the mask instead of slow divide operation.


More information about the dev mailing list