@@ -74,6 +74,8 @@ There are three sources of speed-ups in the codes proposed here:
74
74
** To reproduce these results in your own code base** : look for calls to ` torch.compile ` and ` CudaGraphModule ` wrapper
75
75
within the ` *_torchcompile.py ` scripts.
76
76
77
+ You can also look into ` run.sh ` for the exact commands we used to run the scripts.
78
+
77
79
The following table displays speed-ups obtained on a H100 equipped node with TODO cpu cores.
78
80
All models were executed on GPU, simulation was done on CPU.
79
81
@@ -172,7 +174,7 @@ scripts).
172
174
<details >
173
175
<summary >PPO (Atari - Breakout-v5)</summary >
174
176
175
- ![ SAC.png] ( doc/artifacts/PPO .png )
177
+ ![ SAC.png] ( doc/artifacts/ppo .png )
176
178
177
179
![ sac_speed.png] ( doc/artifacts/ppo_speed.png )
178
180
@@ -218,17 +220,17 @@ Prerequisites:
218
220
git clone https://github.com/pytorch-labs/leanrl.git && cd leanrl
219
221
```
220
222
* Python >=3.7.1,<3.11
221
- - ` pip install -r requirements/requirements.txt ` for basic requirements, or another ` .txt ` file for specific applications.
222
223
- Upgrade torch to its nightly builds for a better coverage of ` torch.compile ` :
223
- - CUDA 11.8: ` pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu118 `
224
- - CUDA 12.1: ` pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 `
225
- - CUDA 12.4: ` pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu124 `
226
- - CPU: ` pip3 install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu `
224
+ - CUDA 11.8: ` pip3 install --upgrade --pre torch --index-url https://download.pytorch.org/whl/nightly/cu118 `
225
+ - CUDA 12.1: ` pip3 install --upgrade --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121 `
226
+ - CUDA 12.4: ` pip3 install --upgrade --pre torch --index-url https://download.pytorch.org/whl/nightly/cu124 `
227
+ - CPU: ` pip3 install --upgrade --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu `
228
+ - ` pip install -r requirements/requirements.txt ` for basic requirements, or another ` .txt ` file for specific applications.
227
229
228
230
Once the dependencies have been installed, run the scripts as follows
229
231
230
232
``` bash
231
- python leanrl/ppo_atari_torchcompile .py \
233
+ python leanrl/ppo_atari_envpool_torchcompile .py \
232
234
--seed 1 \
233
235
--total-timesteps 50000 \
234
236
--compile \
0 commit comments