Hi,
I am playing around with the interop_torch.py
example. The default script runs fine. But if I change the graphics device to a different GPU (instead of the default 0
):
sim = gym.create_sim(0, 1, args.physics_engine, sim_params)
And then I run print(cam_tensors[0])
in the while loop, I got the cuda error (RuntimeError: CUDA error: an illegal memory access was encountered
).
But I can run print(cam_tensors[0].cpu())
without issues.
I also attached my script here.
And the graphics_device in create_sim
does not seem to respect the environment variable CUDA_VISIBLE_DEVICES
. If I set CUDA_VISIBLE_DEVICES=1
, then the camera tensors will still be on device cuda:1
, but pytorch usually gives cuda:0
in this case.