Check cuda API and kernel calls for successful execution