wsl/hsakmt: implement ipc mem of rocr non-legacy mode
The legacy mode means buffer sharing through KFD, KFD provide a buffer id to exporter, exporter pass it to importer, importer pass buffer id to KFD to query and import this buffer. The non-legcay mode relys on socket to pass dmabuf fd between processes. In hsa-runtime, the legcay mode is the default mode, setting environment variable HSA_ENABLE_IPC_MODE_LEGACY to 0 can force hsa-runtime to new mode code path. Reviewed-by: Flora Cui <flora.cui@amd.com> Reviewed-by: Longlong Yao <Longlong.Yao@amd.com> Signed-off-by: tiancyin <tianci.yin@amd.com>
This commit is contained in:
1 parent
914a8ecbc0
commit
390708c594
4 files changed
+127
-26
No files matched your search
+1
-1
@@ -491,7 +491,7 @@ ErrorCode WDDMDevice::CreateGpuMemory(const GpuMemoryCreateInfo &create_info, Gp
|
||||
*gpu_mem = nullptr;
|
||||
auto mem = new GpuMemory(this);
|
||||
if (create_info.dmabuf_fd > 0)
|
||||
ret = mem->ImportPhysicalHandle(create_info.dmabuf_fd);
|
||||
ret = mem->ImportPhysicalHandle(create_info);
|
||||
else
|
||||
ret = mem->Init(create_info);
|
||||
if (ret == ErrorCode::Success)
|
||||
|
||||
Reference in new issue
Block a user