Add early CUDA availability check to mjwarp-viewer#1106
Add early CUDA availability check to mjwarp-viewer#1106ritikkumar1212 wants to merge 1 commit intogoogle-deepmind:mainfrom
Conversation
|
I think it would be good to support non-CUDA devices.
I'm pretty close to getting this to work with the MJX frontend in google-deepmind/mujoco#2948. I'm pretty sure that warp would work pretty much out-of-the box. |
|
Thanks for the feedback! My understanding was that wp.ScopedCapture() currently requires CUDA, which is why I added the early guard to avoid the late runtime crash. Happy to update the PR accordingly. |
|
I'm no expert on this, but the
|
|
@ritikkumar1212 thank you for contributing to mujoco warp! #1107 should enable the viewer to be compatible with |
|
with #1107 merged the viewer should now work on cpu with |
|
That's great |
mjwarp-viewer currently prints "CPU-only mode" and later crashes with
RuntimeError: Must be a CUDA device.This PR adds an early CUDA availability check after wp.init(), so the viewer
fails fast with a clear, actionable error message on machines without NVIDIA GPUs.
This improves UX for CPU-only users and avoids a deep Warp stacktrace.