Use_gpu_pipeline and prepare_sim missing in docs

Hello!

I’ve been following the docs to set up a simple environment with just a cube and after enabling “use_gpu_pipeline”, the script would crash with the following errors:

[Error] [carb.gym.plugin] Gym cuda error: invalid resource handle: ../../../source/plugins/carb/gym/impl/Gym/GymPhysX.cpp: 4881
[Error] [carb.gym.plugin] Gym cuda error: invalid argument: ../../../source/plugins/carb/gym/impl/Gym/GymPhysX.cpp: 2986
/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/physx/src/NpScene.cpp (3773) : invalid operation : PxScene::copyActorData, data has to be valid pointer.

[Error] [carb.gym.plugin] Gym cuda error: an illegal memory access was encountered: ../../../source/plugins/carb/gym/impl/Gym/GymPhysX.cpp: 2934
GPU MemCopyBalanced fail to launch kernel!!
/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpunarrowphase/src/PxgNarrowphaseCore.cpp (7006) : internal error : memcpy failed fail! 1 700 


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (965) : internal error : GPU translateAABBs fail to launch!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (1050) : internal error : GPU updateUpdatedPairsKernel fail to launch!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (856) : internal error : GPU initialize ranks sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (807) : internal error : GPU radix sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (812) : internal error : GPU radix sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (807) : internal error : GPU radix sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (812) : internal error : GPU radix sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (807) : internal error : GPU radix sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (812) : internal error : GPU radix sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (807) : internal error : GPU radix sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (812) : internal error : GPU radix sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (807) : internal error : GPU radix sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (812) : internal error : GPU radix sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (807) : internal error : GPU radix sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (812) : internal error : GPU radix sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (807) : internal error : GPU radix sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (812) : internal error : GPU radix sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (807) : internal error : GPU radix sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (812) : internal error : GPU radix sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (869) : internal error : GPU initialize ranks sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (1137) : internal error : GPU compute end point kernel fail to launch!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (1141) : internal error : GPU compute end point between block kernel fail to launch!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (1279) : internal error : GPU initialize ranks sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (1283) : internal error : GPU initialize ranks sort fail to launch kernel!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (1287) : internal error : GPU calculate range function kernel fail to launch!!


/work/sw-lwawrzyniak-dt-linux/sw/physx/PhysXSDK/5.1/trunk/source/gpubroadphase/src/PxgCudaBroadPhaseSap.cpp (936) : internal error : GPU initialize SapBox Kernel fail to launch!!

I’ve fixed this by calling “gym.prepare_sim” before starting the simulate loop. I’ve searched the docs for a mention of this but no luck. Maybe this helps someone else as well.

Hi @mihai.anca13,

This is documented in the programming/tensors.html file, where we talk about the GPU pipeline.

Take care,
-Gav

1 Like