Selaa lähdekoodia

_starpu_driver_test_request_completion(): return an error if the param_value argument of clGetEventInfo() is negative.

Cyril Roelandt 13 vuotta sitten
vanhempi
commit
944f874558
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4 1
      src/datawizard/copy_driver.c

+ 4 - 1
src/datawizard/copy_driver.c

@@ -382,7 +382,10 @@ unsigned _starpu_driver_test_request_completion(struct _starpu_async_channel *as
 		cl_event opencl_event = (*async_channel).event.opencl_event;
 		if (opencl_event == NULL) STARPU_ABORT();
 		cl_int err = clGetEventInfo(opencl_event, CL_EVENT_COMMAND_EXECUTION_STATUS, sizeof(event_status), &event_status, NULL);
-		if (err != CL_SUCCESS) STARPU_OPENCL_REPORT_ERROR(err);
+		if (err != CL_SUCCESS)
+			STARPU_OPENCL_REPORT_ERROR(err);
+		if (event_status < 0)
+			STARPU_OPENCL_REPORT_ERROR(event_status);
 		success = (event_status == CL_COMPLETE);
 		break;
 	}