Skip to content

Increase the memory consumption during the simulation IsaacGym simulation #74

Closed Answered by Toni-SM
LucaZanatta asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @LucaZanatta

Sorry for late response.
I have found the problem.

Problem: For some reason, the IsaacGymEnvs' FrankaCubeStack task is enabling gradient computation for the rew_buf, which generates a constant increase in GPU memory. You can test it by yourself with the following snippet:

import isaacgym
import isaacgymenvs
import torch

num_envs = 2

envs = isaacgymenvs.make(
	seed=0, 
	task="FrankaCubeStack", 
	num_envs=num_envs, 
	sim_device="cuda:0",
	rl_device="cuda:0",
	headless=True
)

obs = envs.reset()
for _ in range(20):
	random_actions = 2.0 * torch.rand((num_envs,) + envs.action_space.shape, device = 'cuda:0') - 1.0
	obs_dict, rew_buf, reset_buf, extras = envs.step(random_actions

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@LucaZanatta
Comment options

Comment options

You must be logged in to vote
1 reply
@LucaZanatta
Comment options

Answer selected by LucaZanatta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants