Forráskód Böngészése

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 éve
szülő
commit
53a575d4d6
1 módosított fájl, 1 hozzáadás és 1 törlés
  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))
 	{