Przeglądaj źródła

reset current_task field when the task is refused by the cuda driver

Olivier Aumage 8 lat temu
rodzic
commit
bc6e66ef68
1 zmienionych plików z 8 dodań i 1 usunięć
  1. 8 1
      src/drivers/cuda/driver_cuda.c

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

@@ -901,7 +901,14 @@ int _starpu_cuda_driver_run_once(struct _starpu_worker_set *worker_set)
 		{
 			/* this is neither a cuda or a cublas task */
 			worker->ntasks--;
-			_starpu_push_task_to_workers(task);
+			_starpu_set_current_task(NULL);
+			if (worker->pipeline_length)
+				worker->current_tasks[worker->first_task] = NULL;
+			else
+				worker->current_task = NULL;
+			worker->first_task = (worker->first_task + 1) % STARPU_MAX_PIPELINE;
+			int res = _starpu_push_task_to_workers(task);
+			STARPU_ASSERT_MSG(res == 0, "_starpu_push_task_to_workers() unexpectedly returned = %d\n", res);
 			continue;
 		}