CUDA error: an illegal memory access was encountered

when calling ‘‘set_dof_state_tensor_indexed’’, error occurs as “RuntimeError: CUDA error: an illegal memory access was encountered”:

1 Like

I have a similar problem. After using the set_dof_state_tensor_indexed, I can not access certain tensors such as root_states and get the following error.

RuntimeError: CUDA error: an illegal memory access was encountered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions

Please help!

Hi,
I had similar issues and in my case it was due to calling the set_dof_state_tensor_indexed or set_actor_root_state_tensor_indexed more than once in between two simulation calls.

The documentation mentions this issue briefly: