소스 검색

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))
 	{