hipDNN icon indicating copy to clipboard operation
hipDNN copied to clipboard

SaveAsPriorBuffer is not working if dData is offset of hipMalloced buffer

Open eddy16112 opened this issue 6 years ago • 2 comments

In https://github.com/ROCmSoftwarePlatform/hipDNN/blob/master/library/src/hcc_detail/hipdnn_miopen.cpp#L105

    CHECK_HIP(hipMemPtrGetInfo(
        dData, &dPriorSize));  // Get the info of the gradient dx size

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.

eddy16112 avatar Aug 12 '19 23:08 eddy16112