Browse Source

Fix idleness computation when pipeline length is 0

Samuel Thibault 9 years ago
parent
commit
4084697bc6
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/drivers/cuda/driver_cuda.c
  2. 1 1
      src/drivers/opencl/driver_opencl.c

+ 1 - 1
src/drivers/cuda/driver_cuda.c

@@ -753,7 +753,7 @@ int _starpu_cuda_driver_run_once(struct _starpu_worker_set *worker_set)
 #endif
 #endif
 		}
 		}
 
 
-		if (worker->ntasks < worker->pipeline_length)
+		if (!worker->pipeline_length || worker->ntasks < worker->pipeline_length)
 			idle++;
 			idle++;
 	}
 	}
 
 

+ 1 - 1
src/drivers/opencl/driver_opencl.c

@@ -733,7 +733,7 @@ int _starpu_opencl_driver_run_once(struct _starpu_worker *worker)
 			_STARPU_TRACE_END_EXECUTING();
 			_STARPU_TRACE_END_EXECUTING();
 		}
 		}
 	}
 	}
-	if (worker->ntasks < worker->pipeline_length)
+	if (!worker->pipeline_length || worker->ntasks < worker->pipeline_length)
 		idle++;
 		idle++;
 
 
 #if defined(STARPU_NON_BLOCKING_DRIVERS) && !defined(STARPU_SIMGRID)
 #if defined(STARPU_NON_BLOCKING_DRIVERS) && !defined(STARPU_SIMGRID)