Add hsa_amd_memory_lock_to_pool.

Makes malloc memory accessible to GPUs so that the memory has the
capabilities of the pool it is locked to.
This admits fine grained locked memory and reserves API space for any future
special CPU pools.

Change-Id: If8c3dd8582a43f19d3d36b3763c1a688cc419ef0


[ROCm/ROCR-Runtime commit: a535e18cc1]
This commit is contained in:
Sean Keely
2019-03-26 02:06:21 -05:00
parent f819304f49
commit 59e91f0be8
9 changed files with 120 additions and 30 deletions
@@ -1015,6 +1015,14 @@ hsa_status_t HSA_API hsa_amd_memory_lock(void* host_ptr, size_t size,
host_ptr, size, agents, num_agent, agent_ptr);
}
// Mirrors Amd Extension Apis
hsa_status_t HSA_API hsa_amd_memory_lock_to_pool(void* host_ptr, size_t size, hsa_agent_t* agents,
int num_agent, hsa_amd_memory_pool_t pool,
uint32_t flags, void** agent_ptr) {
return amdExtTable->hsa_amd_memory_lock_to_pool_fn(host_ptr, size, agents, num_agent, pool, flags,
agent_ptr);
}
// Mirrors Amd Extension Apis
hsa_status_t HSA_API hsa_amd_memory_unlock(void* host_ptr) {
return amdExtTable->hsa_amd_memory_unlock_fn(host_ptr);