Open eddy16112 opened 4 years ago
Yes, it looks like hipMalloc
has some sort of memory tracking capabilities.
So if you use a pre-allocated memory pool the tracking is not aware of how your pool was chunked and cannot retrieve the size of the buffer.
Correct. I think it is better to support memory pool as many people use it to reduce the cost of malloc. By the way, I think there is a performance issue about dPrior, as it is allocated by hipMalloc and freed later every time.
In https://github.com/ROCmSoftwarePlatform/hipDNN/blob/master/library/src/hcc_detail/hipdnn_miopen.cpp#L105
If the dData is not directly allocated by hipMalloc, instead, it is part of a pre-allocated memory pool, the dPriorSize obtained is not correct. I think the implementation of SaveAsPriorBuffer only works if dData is allocated by hipMalloc.