Skip to content

Commit

Permalink
SWDEV-368819 - Update hipMemAdvise API description (#3293)
Browse files Browse the repository at this point in the history
Change-Id: Ibc3a7a39fd2189974e2b07c3896defeef195076c
  • Loading branch information
rocm-ci authored Aug 14, 2023
1 parent 3d5ab76 commit b8965f1
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 @@ -2863,7 +2863,7 @@ hipError_t hipHostMalloc(void** ptr, size_t size, unsigned int flags);
/**
* @brief Allocates memory that will be automatically managed by HIP.
*
* This API is used for managed memory, allows data be shared and accessible to both the CPU and
* This API is used for managed memory, allows data be shared and accessible to both CPU and
* GPU using a single pointer.
*
* The API returns the allocation pointer, managed by HMM, can be used further to execute kernels
Expand Down Expand Up @@ -2902,12 +2902,18 @@ hipError_t hipMemPrefetchAsync(const void* dev_ptr,
* @brief Advise about the usage of a given memory range to HIP.
*
* @param [in] dev_ptr pointer to memory to set the advice for
* @param [in] count size in bytes of the memory range, it should be 4KB alligned.
* @param [in] count size in bytes of the memory range, it should be CPU page size alligned.
* @param [in] advice advice to be applied for the specified memory range
* @param [in] device device to apply the advice for
*
* @returns #hipSuccess, #hipErrorInvalidValue
*
* This HIP advises about the usage to be applied on unified memory allocation in the
* 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.
*
* @note This API is implemented on Linux, under development on Windows.
*/
hipError_t hipMemAdvise(const void* dev_ptr,
Expand Down

0 comments on commit b8965f1

Please sign in to comment.