Add retain handle and get allocation properties

Support function to retain allocation handle for memory mappings.
The get allocation properties function will return the current
allocation properties for existing memory mappings.

This is part of patch series for Virtual Memory API.

Change-Id: I0a53a11b6efc2b5bf9d463512a489a2abd812551


[ROCm/ROCR-Runtime commit: 687eb043d4]
This commit is contained in:
David Yat Sin
2022-12-19 00:09:08 +00:00
parent 0bcc573ed7
commit bf41567189
9 changed files with 124 additions and 0 deletions
@@ -1281,6 +1281,17 @@ hsa_status_t HSA_API hsa_amd_vmem_import_shareable_handle(int dmabuf_fd,
return amdExtTable->hsa_amd_vmem_import_shareable_handle_fn(dmabuf_fd, handle);
}
hsa_status_t HSA_API hsa_amd_vmem_retain_alloc_handle(hsa_amd_vmem_alloc_handle_t* handle,
void* addr) {
return amdExtTable->hsa_amd_vmem_retain_alloc_handle_fn(handle, addr);
}
hsa_status_t HSA_API hsa_amd_vmem_get_alloc_properties_from_handle(
hsa_amd_vmem_alloc_handle_t alloc_handle, hsa_amd_memory_pool_t* pool,
hsa_amd_memory_type_t* type) {
return amdExtTable->hsa_amd_vmem_get_alloc_properties_from_handle_fn(alloc_handle, pool, type);
}
// Tools only table interfaces.
namespace rocr {