浏览代码

Avoid making hwloc load PCI topology when CUDA is not enabled

It is very costly to initialize GPUs if they are not in persistent mode,
while we don't actually use them...

(cherry picked from commit 43b3ddd80a90243ea69a7a4cfd86e817f70de52d)
Samuel Thibault 6 年之前
父节点
当前提交
53a575d4d6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/perfmodel/perfmodel_bus.c

+ 1 - 1
src/core/perfmodel/perfmodel_bus.c

@@ -2762,7 +2762,7 @@ static void write_bus_platform_file_content(int version)
 	}
 #endif
 
-#if defined(HAVE_DECL_HWLOC_CUDA_GET_DEVICE_OSDEV_BY_INDEX) && HAVE_DECL_HWLOC_CUDA_GET_DEVICE_OSDEV_BY_INDEX && defined(STARPU_HAVE_CUDA_MEMCPY_PEER)
+#if defined(HAVE_DECL_HWLOC_CUDA_GET_DEVICE_OSDEV_BY_INDEX) && HAVE_DECL_HWLOC_CUDA_GET_DEVICE_OSDEV_BY_INDEX && defined(STARPU_USE_CUDA) && defined(STARPU_HAVE_CUDA_MEMCPY_PEER)
 	/* If we have enough hwloc information, write PCI bandwidths and routes */
 	if (!starpu_get_env_number_default("STARPU_PCI_FLAT", 0))
 	{