wsl/hsakmt: add supporting contiguous memory allocation

Reviewed-by: Longlong Yao <Longlong.Yao@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
This commit is contained in:
tiancyin authored and Frank Min committed 2025-11-05 18:53:35 +08:00
1 parent 4b9ef909b4
commit 0fae2bb262
5 files changed
+32 -20

No files matched your search

+3 -3
View File
@@ -99,11 +99,11 @@ HSAKMTAPI int amdgpu_bo_import(amdgpu_device_handle dev,
enum amdgpu_bo_handle_type type,
uint32_t shared_handle,
struct amdgpu_bo_import_result *output) {
void *MemoryAddress = nullptr;
HSAKMT_STATUS ret = hsaKmtImportDMABufHandle(shared_handle, &MemoryAddress);
HsaGraphicsResourceInfo GraphicsResourceInfo;
HSAKMT_STATUS ret = hsaKmtImportDMABufHandle(shared_handle, &GraphicsResourceInfo);
if (ret == HSAKMT_STATUS_SUCCESS) {
//use GpuMemory object's address as drm buf handle
output->buf_handle = reinterpret_cast<amdgpu_bo_handle>(MemoryAddress);
output->buf_handle = reinterpret_cast<amdgpu_bo_handle>(GraphicsResourceInfo.MemoryAddress);
return 0;
} else {
return -1;