Преглед на файлове

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 преди 7 години
родител
ревизия
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
 #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 we have enough hwloc information, write PCI bandwidths and routes */
 	if (!starpu_get_env_number_default("STARPU_PCI_FLAT", 0))
 	if (!starpu_get_env_number_default("STARPU_PCI_FLAT", 0))
 	{
 	{