Closed Jarvis-K closed 2 years ago
I find a solution. In case someone meets a similar issue, the key is to set a spawn
start.
mp.set_start_method('spawn')
Moreover, for users who adopt supersuit==3.2.0
, the shared array bug should be noticed and update your version to the latest.
Sorry about this issue, we have never tested with a GPU accelerated environment before. Honestly, if the GPU is under full load, I don't expect you will see much performance improvement under multiprocessing, but if not, then this is an interesting way of using this wrapper. Kind of cool.
@Jarvis-K would you mind letting me see the environment you're working on, even if it's just inviting me since if it's closed source. I would really like to see a hardware accelerated PettingZoo environment,
Sure. I am working on the Learning to Optimize
Environment. This can be much different with the current MARL community. The environment needs to calculate the current gradient information for the agent in the step()
function. This can be quickly done with GPU but slow on the CPU.
If you are interested, you can find the environment code here, the lines 341 to 404 are relevant. And the training code is here. But all the things are in progress, sorry for the poor documents and usage.
Hi, I am trying to concat my environments with
concat_vec_envs_v0
. In my environment, theenv.step
function adopt CUDA to faster gradient calculation.When I try to concat the environment to multi-process,
It fails and the error msg is pasted below:
Would you like to help me address this error? Will the CUDA multiprocessing be supported in the supersuit?