google-deepmind / google-deepmind/rlax

Add `unroll` argument to functions that use `lax.scan`

Open
#149 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
109
Avg merge
2h 15m
Merged PRs (30d)
1

Description

**Feature request:** Add an `unroll` argument (default `1`) to functions that use [`lax.scan`](https://docs.jax.dev/en/latest/_autosummary/jax.lax.scan.html).

`scan` is known to be slow on GPUs because it requires a kernel launch on each iteration, unless multiple iterations are unrolled.

This change would allow users to do that, and thus potentially speed up computation.

I can submit a PR for this.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.