Skip to content

Commit

Permalink
SWDEV-368819 - Adding more info for hip memory APIs
Browse files Browse the repository at this point in the history
Change-Id: Ia1ab540580cd8a2967263adcb23c888007a22ac6
  • Loading branch information
jujiang-del committed Nov 3, 2023
1 parent 2c8337f commit d1d95ca
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions include/hip/hip_runtime_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -2925,7 +2925,12 @@ hipError_t hipMalloc(void** ptr, size_t size);
* @param[in] size Requested memory size
* @param[in] flags Type of memory allocation
*
* If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.
* If requested memory size is 0, no memory is allocated, *ptr returns nullptr, and #hipSuccess
* is returned.
*
* The memory allocation flag should be either #hipDeviceMallocDefault,
* #hipDeviceMallocFinegrained, #hipDeviceMallocUncached, or #hipMallocSignalMemory.
* If the flag is any other value, the API returns #hipErrorInvalidValue.
*
* @return #hipSuccess, #hipErrorOutOfMemory, #hipErrorInvalidValue (bad context, null *ptr)
*
Expand Down Expand Up @@ -3058,7 +3063,8 @@ hipError_t hipMemPrefetchAsync(const void* dev_ptr,
* range starting from the pointer address devPtr, with the size of count bytes.
* The memory range must refer to managed memory allocated via the API hipMallocManaged, and the
* range will be handled with proper round down and round up respectively in the driver to
* be aligned to CPU page size.
* be aligned to CPU page size, the same way as corresponding CUDA API behaves in CUDA version 8.0
* and afterwards.
*
* @note This API is implemented on Linux and is under development on Windows.
*/
Expand Down

0 comments on commit d1d95ca

Please sign in to comment.