CUDA error:an illegal memory access was encountered

my GPU:GTX 3060 laptop (6GB)
I created my own little four-legged robot,and I can train it normally with maximum of 512 robots.
BUT when I use the gymapi create_box to add a box to environment,I can only run 1 environment,if run 2 env,It comes this error:an illegal memory access was encountered.
I can’t believe it,because I can run original env franka_cabinet with hundreds of envs in parallel.So how can my 3060 GPU can’t even deal with this little box plus robot?

Hi,

Perhaps double check the indexing in your code to make sure you are not trying to access any invalid locations of the buffers. It may help to debug on CPU first.

I had the same problem. It would run fine on CPU, but only break on GPU. The issue seemed to be when invoking “set_dof_state_tensor_indexed” using all of the actor indices. Changing the call to only use actor indices of the robot fixed it for me.

I am not sure if this is a bug, it seems like it, as the api documentation for the function suggests all indices should be able to passed, especially given the fact that it worked for CPU.