libhsakmt: Fix improper usage of hsaKmtRegisterMemoryToNodes
It's unnecessary to register non-userptr. Change-Id: Iefd329578365e036e2fe7e4d5c9c0c3d0976f67c Signed-off-by: Lang Yu <Lang.Yu@amd.com> Signed-off-by: Chris Freehill <cfreehil@amd.com>
Этот коммит содержится в:
коммит произвёл
Chris Freehill
родитель
5eb2a2660c
Коммит
a7a712fb36
@@ -363,11 +363,16 @@ void *allocate_exec_aligned_memory_gpu(uint32_t size, uint32_t align, uint32_t g
|
||||
|
||||
if (NodeId != 0) {
|
||||
uint32_t nodes_array[1] = {NodeId};
|
||||
HsaMemMapFlags map_flags = {0};
|
||||
HSAKMT_STATUS result;
|
||||
|
||||
if (hsaKmtRegisterMemoryToNodes(mem, size, 1, nodes_array) != HSAKMT_STATUS_SUCCESS) {
|
||||
result = hsaKmtMapMemoryToGPUNodes(mem, size, &gpu_va, map_flags, 1, nodes_array);
|
||||
if (result != HSAKMT_STATUS_SUCCESS) {
|
||||
hsaKmtFreeMemory(mem, size);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return mem;
|
||||
}
|
||||
|
||||
if (hsaKmtMapMemoryToGPU(mem, size, &gpu_va) != HSAKMT_STATUS_SUCCESS) {
|
||||
|
||||
Ссылка в новой задаче
Block a user