I know this may look tricky, but it would be really useful in some cases.
Is there any way I can abort a kerner execution from inside the kernel and return some value?
Sometimes, I have a lot of data to process, but if I find an error, I don’t want to continue kernel execution and I want to return as fast as possible to the host code.
Let’s suppose the following simple example. I want to check that every element in a vector with 10 million values is >= 5.
As soon as I find something below 5, I want to abort and return false. I don’t want execute all blocks/grid, etc… Just abort and return some value that indicate something like UserAbortCode=1.