Use posix_memalign for network buffer allocation on host memory (#221)
* Use posix_memalign for network buffer allocation on host memory * ib-test: add ability to specify run iterations * ib-test: define iterations as multiple of default cycles * Add checking to posix_memalign return value
This commit is contained in:
1 parent
dc739c4e70
commit
0eb19a563a
6 files changed
+82
-12
No files matched your search
@@ -20,6 +20,7 @@
|
||||
#endif
|
||||
#include "xml.h"
|
||||
#include "cpuset.h"
|
||||
#include <numa.h>
|
||||
|
||||
#define BUSID_SIZE (sizeof("0000:00:00.0"))
|
||||
#define BUSID_REDUCED_SIZE (sizeof("0000:00"))
|
||||
@@ -733,6 +734,11 @@ ncclResult_t ncclTopoSetAffinity(struct ncclTopoSystem* system, int rank) {
|
||||
NCCLCHECK(ncclCpusetToStr(&finalMask, affinityStr));
|
||||
INFO(NCCL_INIT, "Setting affinity for GPU %d to %s", gpu->gpu.dev, affinityStr);
|
||||
SYSCHECK(sched_setaffinity(0, sizeof(cpu_set_t), &finalMask), "sched_setaffinity");
|
||||
int ret = numa_run_on_node(cpu->id);
|
||||
if (ret != 0)
|
||||
INFO(NCCL_INIT, "Failed to run on numa node %ld", cpu->id);
|
||||
else
|
||||
INFO(NCCL_INIT, "Thread is set to run on numa node %ld", cpu->id);
|
||||
}
|
||||
return ncclSuccess;
|
||||
}
|
||||
Reference in new issue
Block a user