In this code, I put a breakpoint if tbool is not true (which should never be the case). When I run the code, the breakpoint is hit. However, when I look at the value of tbool it is true. It can’t be both, either tbool is true (and the breakpoint is not hit) or tbool is false and the breakpoint is hit. For some reason, NSight is telling me both that tbool is true and the breakpoint is hit.
I have checked a few other things. When the breakpoint is hit, tidx = 0. Also, I checked to see of there was a memory leak or memory not allocated and neither of those appear to be the case.
the code snippet you posted is too short. It does not contain a number of critical variable declarations. In particular it is not clear which variables are shared and which are not.
Kernel launch parameters, such as grid and block dimensions are not clear either.
Best to post compilable, minimal code that exhibits the problem.
Based on the codes he sent is there any possibilities to figure out any possible solution for I’ve been encountering pretty much same issue and couldnt save any log files.
In attempting to make the smallest possible code segment that reproduces this error, I determined what triggers it but there does appear to be a bug in NSight itself.
The code segment listed above called my own function called “distance” (shown below), that function in turn called “sqrt.” Thinking that there might be some sort of naming conflict with the term “distance”, I renamed my function “MyDistance” and that had no effect. Then, thinking that the sqrt call might have a problem (because I am calling it with ints), I cast those inputs to float, again with no effect.
Ultimately, what I determined is that if this function is in any possible path of execution (even if it is not actually called), it causes an error and NSight hits breakpoints that simply cannot be hit. So, it appears to be an NSight problem.
In the main code, I replaced the calls to the distance function with the actual distance code (unchanged) and that eliminated the NSight error and the code ran fine.
However, I have another kernel I am writing and I am seeing the same behavior by NSight. That is, breakpoints are being hit that simply can’t be and the underlying code appears to be correct. So, again, I suspect that this is an NSight error.