google-deepmind / google-deepmind/mujoco

Supported sharded GPU simulation with mjwarp

Open
#2,837 4 comments 0 reactions 1 assignee Claimed by @btaba View on GitHub
enhancement
Dominant language
C++
Stars
15.2k
Forks
1.8k
Avg merge
10d 16h
Merged PRs (30d)
25

Description

### The feature, motivation and pitch

It would be very useful to support multi-GPU mjwarp simulations.

### Problem

Running **mjwarp simulations** across multiple GPUs is currently difficult due to limitations in sharding and device handling.

### Challenges
1. **Device-side model/data creation**: The current API is not compatible with replicated or data-parallel sharding.
2. **Sharding awareness in JAX FFI integration**: The `mjx/third_party/warp/jax_experimental/ffi.py` file (and other code locations) assumes the first visible device instead of handling different devices properly.
3. **Collision data layout**: mjwarp stores collision data in a flattened layout, making partitioning and sharding more complex.

### Alternatives

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.