[BUG] make static loop unrolling automatic, and warn if not possible
Open
@daedalus5 is already working on this.
Since Apr 30, 2025.
bug
language
- Dominant language
- Python
- Stars
- 7.1k
- Forks
- 624
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 5
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.