vtk-m/docs/changelog/no-unbounded-recursion.md
Kenneth Moreland fc58f4edc6 Turn on CUDA warnings for unknown stack sizes
These were previously suppressed because they are unavoidable when
calling virtual methods. But we no longer support virtual methods on
devices (it is deprecated).

These warnings can still happen if you have unbounded recursion. But we
would like to avoid unbounded recursion, so we would like to see these
warnings.

Also turned on other nvlink warnings, which include when a recursive
function call means that the compiler cannot figure out the full
stack depth.
2021-08-02 09:50:41 -06:00

778 B

Remove unbounded recursion

GPU device compilers like to determine the stack size needed for a called kernel. This is only possible if there is no recursive function calls on the device or at least recursive calls where the termination cannot be found at compile time.

Device compilers do not particularly like that. We have been getting around this with CUDA by turning of warnings about stack sizes and setting a large stack size during a call (which works but is dangerous). More restrictive devices might not allow recursive calls at all.

To fix this, we will avoid recursive calls in execution environment (device) code. All such warnings are turned on.

Because of this, we also should not have to worry about lengthening the stack size, so that code is also removed.