From ee73fc046e4a614a233349739b774470da965997 Mon Sep 17 00:00:00 2001 From: tiancyin Date: Thu, 13 Feb 2025 10:57:42 +0800 Subject: [PATCH] wsl/hsakmt: set to system domain when cpu want to access the buffer Reviewed-by: Flora Cui Signed-off-by: tiancyin --- memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memory.cpp b/memory.cpp index f044ef6aac..79e8f1276a 100644 --- a/memory.cpp +++ b/memory.cpp @@ -177,7 +177,7 @@ HSAKMT_STATUS hsaKmtAllocMemoryAlignInternal(HSAuint32 PreferredNode, create_info.alignment = Alignment; create_info.va_hint = reinterpret_cast(*MemoryAddress); - if ((PreferredNode == 0 && !MemFlags.ui32.NonPaged) + if ((PreferredNode == 0 && MemFlags.ui32.HostAccess) || zfb_support || MemFlags.ui32.GTTAccess) { if (SizeInBytes > max_single_alloc_size) return HSAKMT_STATUS_NO_MEMORY;