Add pointer attributes API

Add two pointer attributes APIs:
hsaKmtQueryPointerInfo - allow the user to query the memory information
    using a pointer. This pointer can point to any address inside the
    range known to HSA.
hsaKmtSetMemoryUserData - allow the user to attach data to a pointer to
    add memory tracking information. This pointer must match the start
    address of a memory allocation or registration.
TODO: This patch implements support on dGPU. Needs to add APU.

Change-Id: I4711809274248434901f0794f50ebfa13a7371a8


[ROCm/ROCR-Runtime commit: 51e4d27c37]
This commit is contained in:
Amber Lin
2016-09-01 23:25:42 -04:00
parent cba37c251c
commit 8a1cef5fbb
6 changed files with 294 additions and 40 deletions
+20
View File
@@ -661,6 +661,26 @@ hsaKmtGetTileConfig(
HsaGpuTileConfig* config // IN & OUT
);
/**
Returns information about pointers
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtQueryPointerInfo(
const void * Pointer, //IN
HsaPointerInfo * PointerInfo //OUT
);
/**
Associates user data with a memory allocation
*/
HSAKMT_STATUS
HSAKMTAPI
hsaKmtSetMemoryUserData(
const void * Pointer, //IN
void * UserData //IN
);
#ifdef __cplusplus
} //extern "C"
#endif