warp
warp copied to clipboard
[BUG] make static loop unrolling automatic, and warn if not possible
Bug Description
import warp as wp
RANGE = 5
@wp.kernel
def test_kernel:
for i in range(wp.static(-RANGE), wp.static(RANGE)):
...
In the above example, -RANGE should be automatically statically evaluated. This will allow the loop to be unrolled, which makes kernels differentiable under certain conditions.