Enable MuJoCo Warp (mjw) backend on macOS#3171
Open
tkelestemur wants to merge 3 commits intogoogle-deepmind:mainfrom
Open
Enable MuJoCo Warp (mjw) backend on macOS#3171tkelestemur wants to merge 3 commits intogoogle-deepmind:mainfrom
tkelestemur wants to merge 3 commits intogoogle-deepmind:mainfrom
Conversation
Allow impl="warp" to run on macOS by falling back to CPU when no CUDA GPU is available. Previously, the warp backend required CUDA, making it unusable on macOS for local development and debugging. Changes: - Device resolution falls back to CPU when no CUDA GPU is found - Device compatibility check accepts both CUDA GPU and CPU for warp - FFI targets registered on both CUDA and Host platforms - Kernel launch dispatches to wp_cpu_launch_kernel on CPU - CUDA graph traits and capture modes gated on wp.is_cuda_available() - Module preloading extended to CPU devices - Removed has_cuda_gpu_device() skip conditions from warp tests - Fixed lexsort precision issue in test_util.py causing flaky test on macOS due to floating point sort key differences See google-deepmind#2947
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Allow mujoco-mjx to be installed with mujoco 3.6.0 since the macOS warp changes do not depend on any 3.7.0-specific APIs.
When render_rgb=False or render_depth=False, the condition `if render_rgb and isinstance(render_rgb, bool)` short-circuits because False is falsy, skipping the bool-to-list expansion. This causes a TypeError downstream. Fix by checking isinstance first.
Collaborator
|
cc @btaba |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow impl="warp" to run on macOS by falling back to CPU when no CUDA GPU is available. Previously, the warp backend required CUDA, making it unusable on macOS for local development and debugging.
Changes:
See #2947
This is on top of @hartikainen 's PR here: #2948