|
@@ -386,8 +386,9 @@ static size_t _starpu_cuda_get_global_mem_size(unsigned devid)
|
|
|
|
|
|
unsigned _starpu_get_cuda_device_count(void)
|
|
unsigned _starpu_get_cuda_device_count(void)
|
|
{
|
|
{
|
|
|
|
+ int cnt;
|
|
#ifdef STARPU_SIMGRID
|
|
#ifdef STARPU_SIMGRID
|
|
- return _starpu_simgrid_get_nbhosts("CUDA");
|
|
|
|
|
|
+ cnt = _starpu_simgrid_get_nbhosts("CUDA");
|
|
#else
|
|
#else
|
|
int cnt;
|
|
int cnt;
|
|
|
|
|
|
@@ -395,6 +396,7 @@ unsigned _starpu_get_cuda_device_count(void)
|
|
cures = cudaGetDeviceCount(&cnt);
|
|
cures = cudaGetDeviceCount(&cnt);
|
|
if (STARPU_UNLIKELY(cures))
|
|
if (STARPU_UNLIKELY(cures))
|
|
return 0;
|
|
return 0;
|
|
|
|
+#endif
|
|
|
|
|
|
if (cnt > STARPU_MAXCUDADEVS)
|
|
if (cnt > STARPU_MAXCUDADEVS)
|
|
{
|
|
{
|
|
@@ -402,7 +404,6 @@ unsigned _starpu_get_cuda_device_count(void)
|
|
cnt = STARPU_MAXCUDADEVS;
|
|
cnt = STARPU_MAXCUDADEVS;
|
|
}
|
|
}
|
|
return (unsigned)cnt;
|
|
return (unsigned)cnt;
|
|
-#endif
|
|
|
|
}
|
|
}
|
|
|
|
|
|
void _starpu_init_cuda(void)
|
|
void _starpu_init_cuda(void)
|