wsl/hsakmt: fix gpu_mem handle

Signed-off-by: Flora Cui <flora.cui@amd.com>
Reviewed-by: Tianci Yin <tianci.yin@amd.com>
Part-of: <http://10.67.69.192/wsl/rocr-runtime/-/merge_requests/28>
This commit is contained in:
Flora Cui
2025-01-13 22:07:37 +08:00
committed by Frank Min
vanhempi 5db21f53da
commit f342af52c5
+2 -3
Näytä tiedosto
@@ -110,7 +110,6 @@ HSAKMTAPI int amdgpu_bo_import(amdgpu_device_handle dev,
}
}
HSAKMTAPI int amdgpu_bo_va_op(amdgpu_bo_handle bo,
uint64_t offset,
uint64_t size,
@@ -120,7 +119,7 @@ HSAKMTAPI int amdgpu_bo_va_op(amdgpu_bo_handle bo,
switch(ops) {
case AMDGPU_VA_OP_MAP:
{
wsl::thunk::GpuMemory *gpu_mem = reinterpret_cast<wsl::thunk::GpuMemory *>(bo);
wsl::thunk::GpuMemory *gpu_mem = get_gpu_mem(bo);
assert(gpu_mem != nullptr);
auto code = gpu_mem->MapGpuVirtualAddress(reinterpret_cast<gpusize>(addr), size, offset);
if (code != ErrorCode::Success)
@@ -133,7 +132,7 @@ HSAKMTAPI int amdgpu_bo_va_op(amdgpu_bo_handle bo,
break;
case AMDGPU_VA_OP_UNMAP:
{
wsl::thunk::GpuMemory *gpu_mem = reinterpret_cast<wsl::thunk::GpuMemory *>(bo);
wsl::thunk::GpuMemory *gpu_mem = get_gpu_mem(bo);
assert(gpu_mem != nullptr);
auto code = gpu_mem->UnmapGpuVirtualAddress(reinterpret_cast<gpusize>(addr), size, offset);
if (code != ErrorCode::Success)