瀏覽代碼

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

Cédric Augonnet 15 年之前
父節點
當前提交
c2393291f1
共有 1 個文件被更改,包括 1 次插入0 次删除
  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);