libhsakmt: correct number of NUMA nodes calculation
numa_max_node() return the highest node number available on the current
system, number of NUMA nodes should be numa_max_node() + 1.
Change-Id: I20a6c17af071e73e853cb5ea6d0304c8aca52681
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
[ROCm/ROCR-Runtime commit: 71cf3cf5d3]
This commit is contained in:
@@ -1468,7 +1468,7 @@ static int bind_mem_to_numa(uint32_t node_id, void *mem,
|
||||
if (numa_available() == -1)
|
||||
return 0;
|
||||
|
||||
num_node = numa_max_node();
|
||||
num_node = numa_max_node() + 1;
|
||||
|
||||
/* Ignore binding requests to invalid nodes IDs */
|
||||
if (node_id >= (unsigned)num_node) {
|
||||
|
||||
Reference in New Issue
Block a user