The function cuda/hipGteMemInfo is not returning a precise amount of memory that can be allocated within one big contigous chunk.
The fix is reducing the amount of memory we try to allocate until a valid amount is found.
Additionally, this fix removes a magic number (16 MiB) which was used to work around the unprecise amount of memory return by cuda/hipGetMemInfo.
Pointers required to hold required pointers for the device will now be allocated before the amount of free memory is queried.
In cases where the memory allocation is not using the full memory a warning will be shown
WARNING: driver reported at least 68701650944 bytes are free but largest possible allocation is 68667047936 bytes.
cuda/hipGteMemInfo
is not returning a precise amount of memory that can be allocated within one big contigous chunk. The fix is reducing the amount of memory we try to allocate until a valid amount is found.cuda/hipGetMemInfo
.In cases where the memory allocation is not using the full memory a warning will be shown