Get the latest tech news

Show HN: LeanRL: Fast PyTorch RL with Torch.compile and CUDA Graphs


LeanRL is a fork of CleanRL, where selected PyTorch scripts optimized for performance using compile and cudagraphs. - pytorch-labs/LeanRL

LeanRL is a lightweight library consisting of single-file, pytorch-based implementations of popular Reinforcement Learning (RL) algorithms. The primary goal of this library is to inform the RL PyTorch user base of optimization tricks to cut training time by half or more. 🚀 Fast implementations: We provide an optimized, lean version of the PyTorch scripts (<script_name>_torchcompile.py) where data copies and code execution have been optimized thanks to four tools: 🖥️ torch.compile to reduce the overhead and fuse operators whenever possible; 📈 cudagraphs to isolate all the cuda operations and eliminate the cost of entering the compiled code; 📖 tensordict to speed-up and clarify data copies on CUDA, facilitate functional calls and fast target parameters updates.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Graphs

Graphs

Photo of CUDA

CUDA

Photo of fast pytorch

fast pytorch

Related news:

News photo

Possibly all the ways to get loop-finding in graphs wrong

News photo

Zen, CUDA, and Tensor Cores, Part I: The Silicon

News photo

Defenders think in lists, attackers think in graphs (2015)