Explorar o código

Even if CUDA is installed on the machine, there may be no GPU available.

Cédric Augonnet %!s(int64=15) %!d(string=hai) anos
pai
achega
c2393291f1
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/core/topology.c

+ 1 - 0
src/core/topology.c

@@ -175,6 +175,7 @@ static void _starpu_initialize_workers_gpuid(int use_explicit_workers_gpuid, int
 	else
 	{
 		/* by default, we take a round robin policy */
+		if (nhwgpus > 0)
 		for (i = 0; i < STARPU_NMAXWORKERS; i++)
 			workers_gpuid[i] = (unsigned)(i % nhwgpus);