Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Allow usage of a different device on main and sub-envs in ParallelEnv and SerialEnv #1626

Merged
merged 71 commits into from
Nov 30, 2023
Merged
Changes from 1 commit
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
1f539dd
init
vmoens Oct 6, 2023
d4c16e1
amend
vmoens Oct 6, 2023
d2321aa
amend
vmoens Oct 6, 2023
565115a
amend
vmoens Oct 6, 2023
3c46136
amend
vmoens Oct 6, 2023
78cfa41
amend
vmoens Oct 6, 2023
a6bd8eb
amend
vmoens Oct 6, 2023
04d4ae7
amend
vmoens Oct 6, 2023
3e31963
Merge remote-tracking branch 'origin/main' into step_maybe_reset
vmoens Oct 10, 2023
f1b0ea4
tensordict_
vmoens Oct 10, 2023
16b3538
amend rollout logic
vmoens Oct 10, 2023
7ad0864
amend
vmoens Oct 10, 2023
bcac398
amend
vmoens Oct 10, 2023
428f8ee
inference
vmoens Oct 10, 2023
6fbd0bd
cpu -> cuda
vmoens Oct 10, 2023
02db623
checks
vmoens Oct 10, 2023
08a8f47
using pipe instead of event
vmoens Oct 10, 2023
45e64f7
amend
vmoens Oct 10, 2023
7dd4821
amend
vmoens Oct 10, 2023
e1a2206
rm cuda event
vmoens Oct 10, 2023
dc2caab
amend
vmoens Oct 10, 2023
01ffbf9
amend
vmoens Oct 10, 2023
ac76ec3
amend
vmoens Oct 10, 2023
ceab010
amend
vmoens Oct 10, 2023
f0327c9
amend
vmoens Oct 10, 2023
518b3d1
amend
vmoens Oct 10, 2023
47dd93b
amend
vmoens Oct 10, 2023
354fb6f
amend
vmoens Oct 10, 2023
53d5f9a
amend
vmoens Oct 10, 2023
78c00e8
amend
vmoens Oct 10, 2023
f63480e
amend
vmoens Oct 10, 2023
9a3631f
amend
vmoens Oct 10, 2023
2ceb438
amend
vmoens Oct 10, 2023
6ecebda
amend
vmoens Oct 10, 2023
5c613c3
amend
vmoens Oct 10, 2023
9f97e58
amend
vmoens Oct 10, 2023
9cbcbb0
amend
vmoens Oct 10, 2023
72c4163
amend
vmoens Oct 10, 2023
6f4c374
amend
vmoens Oct 10, 2023
3657b41
empty
vmoens Oct 11, 2023
9206b93
amend
vmoens Oct 11, 2023
897123f
Merge remote-tracking branch 'origin/main' into parallel_cuda_refactor
vmoens Nov 10, 2023
2bac78c
amend
vmoens Nov 10, 2023
51a8856
amend
vmoens Nov 10, 2023
7a300f5
amend
vmoens Nov 10, 2023
b25921d
amend
vmoens Nov 10, 2023
d42348d
amend
vmoens Nov 10, 2023
f3421aa
amend
vmoens Nov 10, 2023
939ece4
amend
vmoens Nov 10, 2023
082ba9a
amend
vmoens Nov 10, 2023
4fd670f
amend
vmoens Nov 10, 2023
2a773f3
amend
vmoens Nov 10, 2023
e7cb5dd
Merge remote-tracking branch 'origin/main' into parallel_cuda_refactor
vmoens Nov 27, 2023
ea88bb4
Merge remote-tracking branch 'origin/main' into parallel_cuda_refactor
vmoens Nov 27, 2023
7c04f62
amend
vmoens Nov 27, 2023
b422775
amend
vmoens Nov 27, 2023
ed0287d
amend
vmoens Nov 27, 2023
05b0c08
amend
vmoens Nov 27, 2023
33de0fc
amend
vmoens Nov 28, 2023
492a884
amend
vmoens Nov 28, 2023
ff4799d
amend
vmoens Nov 28, 2023
f25b957
amend
vmoens Nov 28, 2023
8899dbd
amend
vmoens Nov 28, 2023
65c9deb
amend
vmoens Nov 28, 2023
77c2d6b
amend
vmoens Nov 28, 2023
7928744
amend
vmoens Nov 28, 2023
e7fda36
amend
vmoens Nov 29, 2023
fb9a03a
amend
vmoens Nov 29, 2023
d73ca22
amend
vmoens Nov 29, 2023
c4d4c6b
amend
vmoens Nov 29, 2023
b2840b0
doc
vmoens Nov 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
amend
  • Loading branch information
vmoens committed Nov 10, 2023
commit 939ece493da01ee00715d19456839278183fbf72
4 changes: 2 additions & 2 deletions torchrl/envs/batched_envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1438,8 +1438,8 @@ def _run_worker_pipe_cuda(
env_input = shared_tensordict
td, root_next_td = env.step_and_maybe_reset(env_input)
if env_device_cpu:
next_shared_tensordict.apply(_update_cuda, td.get("next"))
shared_tensordict.apply(_update_cuda, root_next_td)
next_shared_tensordict._fast_apply(_update_cuda, td.get("next"))
shared_tensordict._fast_apply(_update_cuda, root_next_td)
else:
next_shared_tensordict.update_(td.get("next"))
shared_tensordict.update_(root_next_td)
Expand Down
Loading