Is there a way to execute a statement inside the device code without raising CUDA error? Something looks like the following:
__global__ void myKernel(float* X1, float* X2, float* Y){
try{
Y[0] = X1[0] / X2[0];
}catch(){
Y[0] = 0.0f;
}
}
I know that we can check the value of X2[0] before division, but what If I want to execute the statement without checking for valid inputs, and execute it safely?