Check cuda API and kernel calls for successful execution
Check cuda API and kernel calls for successful execution

Cuda API calls give a return value that specifies if they were executed
sucessfully and a cuda kernel sets a global error buffer, if a problem
occurred. We add runtime checks to check these error conditions.  Before
this patch, we could not even notice, if a kernel was not executed at
all.

Signed-off-by: Tobias Grosser <059b8b880f8441509ec8a65b50b4c6ae74ebea76@grosser.es>
Signed-off-by: Sven Verdoolaege <e5350bbed4977f5eb8ae1dc6abd9ae59d21ace75@kotnet.org>

nicolasvasilache/ppcg,Meinersbur/ppcg,nicolasvasilache/ppcg,Meinersbur/ppcg