Browse Source

src/core/perfmodel/perfmodel_bus.c:replacing cudaGetDeviceCount by _starpu_get_cuda_device_count

We will not use too many CUDA devices any more.
Cyril Roelandt 14 years ago
parent
commit
b29709b352
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/core/perfmodel/perfmodel_bus.c

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

@@ -434,7 +434,7 @@ static void benchmark_all_gpu_devices(void)
 	/* TODO: measure bandwidth between GPU-GPU */
 
 #ifdef STARPU_USE_CUDA
-        cudaGetDeviceCount(&ncuda);
+	ncuda = _starpu_get_cuda_device_count();
 	for (i = 0; i < ncuda; i++)
 	{
 		fprintf(stderr," CUDA %d...", i);
@@ -513,7 +513,7 @@ static void load_bus_affinity_file_content(void)
         int gpu;
 
 #ifdef STARPU_USE_CUDA
-        cudaGetDeviceCount(&ncuda);
+	ncuda = _starpu_get_cuda_device_count();
 	for (gpu = 0; gpu < ncuda; gpu++)
 	{
 		int ret;
@@ -1022,7 +1022,7 @@ static void check_bus_config_file()
                 // Loading current configuration
                 ncpus = _starpu_topology_get_nhwcpu(config);
 #ifdef STARPU_USE_CUDA
-                cudaGetDeviceCount(&ncuda);
+		ncuda = _starpu_get_cuda_device_count();
 #endif
 #ifdef STARPU_USE_OPENCL
                 nopencl = _starpu_opencl_get_device_count();