From a4248a94f6c07877144a821b60ec51faafdd04ab Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 10 May 2024 14:18:56 +0200 Subject: [PATCH] Fix build without hwloc --- src/drivers/cuda/driver_cuda.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/drivers/cuda/driver_cuda.c b/src/drivers/cuda/driver_cuda.c index a7f2c55013..7b6f273167 100644 --- a/src/drivers/cuda/driver_cuda.c +++ b/src/drivers/cuda/driver_cuda.c @@ -280,6 +280,7 @@ void _starpu_cuda_discover_devices(struct _starpu_machine_config *config) #endif } +#ifdef STARPU_HAVE_HWLOC #ifdef STARPU_HAVE_NVML_H static int _starpu_cuda_direct_link(struct _starpu_machine_config *config, unsigned devid1, unsigned devid2) { @@ -377,6 +378,7 @@ static int _starpu_cuda_direct_link(struct _starpu_machine_config *config, unsig return 0; } #endif +#endif static void _starpu_initialize_workers_cuda_gpuid(struct _starpu_machine_config *config) { @@ -629,6 +631,7 @@ void _starpu_cuda_init_worker_memory(struct _starpu_machine_config *config, int _starpu_cuda_bus_ids[devid2+STARPU_MAXNUMANODES][devid+STARPU_MAXNUMANODES] = bus21; _starpu_cuda_bus_ids[devid+STARPU_MAXNUMANODES][devid2+STARPU_MAXNUMANODES] = bus12; #ifndef STARPU_SIMGRID +#ifdef STARPU_HAVE_HWLOC #ifdef STARPU_HAVE_NVML_H if (_starpu_cuda_direct_link(config, devid, devid2)) { @@ -636,6 +639,7 @@ void _starpu_cuda_init_worker_memory(struct _starpu_machine_config *config, int starpu_bus_set_ngpus(bus12, 1); } else +#endif #endif { #if HAVE_DECL_HWLOC_CUDA_GET_DEVICE_OSDEV_BY_INDEX