Set NUMA region to 0 when using GTTAccess flag

When allocating memory for MES AQL queue structure, the PreferredNode
is set to the device index of GPU to hint the location where the BO
needs to be created. But we need to ignore the device index when calling
bind_mem_to_numa.

Change-Id: Iae69fe02bfd48c5a3bd495319f6f2706d6e8aea2


[ROCm/ROCR-Runtime commit: 541d0dbbae]
Этот коммит содержится в:
David Yat Sin committed 2024-03-29 17:17:56 +00:00
1 родитель 69c283ef3d
Коммит 78ad630632
1 file changed
+2 -2
+2 -2
Просмотреть файл
@@ -161,8 +161,8 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtAllocMemory(HSAuint32 PreferredNode,
if (zfb_support && gpu_id && MemFlags.ui32.NonPaged == 1)
MemFlags.ui32.CoarseGrain = 1;
*MemoryAddress = fmm_allocate_host(gpu_id, PreferredNode, *MemoryAddress,
SizeInBytes, MemFlags);
*MemoryAddress = fmm_allocate_host(gpu_id, MemFlags.ui32.GTTAccess ? 0 : PreferredNode,
*MemoryAddress, SizeInBytes, MemFlags);
if (!(*MemoryAddress)) {
pr_err("[%s] failed to allocate %lu bytes from host\n",