diff --git a/src/header/TransferBench.hpp b/src/header/TransferBench.hpp index 9f4589c..34511ba 100644 --- a/src/header/TransferBench.hpp +++ b/src/header/TransferBench.hpp @@ -1548,7 +1548,10 @@ namespace { if (IsCpuMemType(memType)) { // Set NUMA policy prior to call to hipHostMalloc - numa_set_preferred(deviceIdx); + // Skip memory-less NUMA nodes to avoid set_mempolicy EINVAL + if (deviceIdx < 0 || numa_bitmask_isbitset(numa_get_mems_allowed(), deviceIdx)) { + numa_set_preferred(deviceIdx); + } // Allocate host-pinned memory (should respect NUMA mem policy) int flags = 0;