Jax is awesome, i prefer Jax ecosystem to Pytorch ecosystem. Even if Jax is slightly more complex to understand compared to Pytorch, it is highly rewarding. In particularly, in Reinforcement Learning when the envs are mainly into the CPU while your NN is into the GPU.
I think it is worth drawing a distinction between vectorization and parallelization in jax computation. Vectorization takes SISD(Single Instruction Single Data) to SIMD(Single Instruction Multiple Data) while Parallelization takes it to MIMD( Multiple Instruction Multiple Data). To do parallelization in jax you would need to use sharded parallel or for simpler cases pmaps. This is a good showcase of how vmaps and vectorization in jax works.
Jax is awesome, i prefer Jax ecosystem to Pytorch ecosystem. Even if Jax is slightly more complex to understand compared to Pytorch, it is highly rewarding. In particularly, in Reinforcement Learning when the envs are mainly into the CPU while your NN is into the GPU.
I think it is worth drawing a distinction between vectorization and parallelization in jax computation. Vectorization takes SISD(Single Instruction Single Data) to SIMD(Single Instruction Multiple Data) while Parallelization takes it to MIMD( Multiple Instruction Multiple Data). To do parallelization in jax you would need to use sharded parallel or for simpler cases pmaps.
This is a good showcase of how vmaps and vectorization in jax works.
Lovely ❤
Lovely
ihanaa