觉
AI觉醒星球
Awakening is here
Knowledge File / AI技能杠杆
2026-09-24 2 浏览 免费阅读

如何使用 NVIDIA Warp 和 MjWarp 加速机器人仿真与学习工作流

NVIDIA Warp 与 MuJoCo Warp(MJWarp)把 MuJoCo 机器人仿真从 CPU 并行推进到 GPU 规模,支持最多 2048 个并行环境。文章梳理 Warp 的核心理念、可微分与确定性能力,并给出从 SO-101 工作流迁移到 MJWarp 的验证路径。

SOURCE / AI技能杠杆 MIN / 4 ACCESS / 免费阅读 POST / 2026-09-24 02:41:40

原贴

查看原文
作者:Hugging Face Blog 来源站点:huggingface.co 原贴时间:

原文

Classic MuJoCo provides fast CPU-based robot simulation for developing, testing, and controlling robots and it can parallelize sampling across CPU cores. But as learning workloads grow, the question shifts from how quickly one world can run to how many worlds can run at once. GPU acceleration makes it possible to advance those worlds in large batches while keeping simulation and learning data close to the device. MuJoCo Warp (MJWarp) , built on NVIDIA Warp , takes compatible MuJoCo models into that GPU-scale regime. In this article, we will move an SO-101 follower arm from a familiar MuJoCo workflow to as many as 2,048 parallel MJWarp environments and examine the technology and validation steps that make the transition possible. Figure 1. How MJWarp connects Python to GPU simulation. MuJoCo loads and compiles the MJCF model; MJWarp implements the physics in NVIDIA Warp, which compiles CUDA kernels to advance simulation states on NVIDIA GPUs. This is the second article in our State of Simulation for Physical AI series. The first article mapped the robot-simulation landscape. Here, we prepare and scale the simulation environment; we do not train a policy. The later Newton and Isaac Lab installments cover the next integration layers. NVIDIA Warp is a Python framework for writing high-performance, GPU-accelerated kernels. Warp lets developers author statically typed kernels in Python and compiles them for CPU or CUDA execution. The first launch builds and caches a native module; later launches reuse it. The kernel language is a performance-oriented subset of Python, while ordinary Python remains responsible for configuration, allocation, and launch orchestration. This small robotics-oriented kernel advances point positions under gravity. One logical thread handles one point, so the same code scales from two points to millions without introducing GPU terminology into the control flow. The three value propositions of Warp are: Explicit parallel work. wp.tid() identifies the point, contact, body, or world owned by the current logical thread. Explicit device arrays. An array lives on the selected device. Calling .numpy() on a CUDA array synchronizes and copies it to CPU memory; it is not a zero-copy path. For a device-resident PyTorch or JAX pipeline, use Warp’s framework adapters or DLPack-compatible sharing instead. Composable kernel launches. A program can launch a sequence of focused kernels and capture supported CUDA work into a graph to reduce repeated dispatch overhead. Graph capture replays launches against existing buffers; it does not fuse arbitrary kernels. Two further Warp capabilities are worth knowing, even though neither is used in the SO-101 workflow in this article. Warp kernels are differentiable : a wp.Tape records the forward kernel launches made inside its context and replays their adjoints in reverse when backward() is called, which is why teams build differentiable geometry, CFD, and custom physics in Warp, including CAE workflows for simulation and design optimization. Warp also supports deterministic execution , introduced in Warp 1.15 : GPU atomics are scheduler-dependent by default, so repeated launches of the same kernel can differ slightly, and the opt-in deterministic modes trade some performance for reproducible ordering in simulation, validation, and regression tests. These are Warp capabilities, not guarantees of differentiability or determinism for an entire MJWarp rollout. See the Warp documentation on differentiability and deterministic execution for the details. Try Warp: pip install warp-lang (≥ 1.15 for GPU determinism), then python -m warp.examples.browse, or the tutorial notebooks .

中文翻译

经典 MuJoCo 提供快速的基于 CPU 的机器人仿真,用于开发、测试和控制机器人,并且可以跨 CPU 核并行采样。但随着学习工作负载增长,问题从单个世界能跑多快转向同时能跑多少个世界。GPU 加速使得可以大批量推进这些世界,同时让仿真和学习数据靠近设备。MuJoCo Warp(MJWarp)建立在 NVIDIA Warp 之上,将兼容的 MuJoCo 模型带入这种 GPU 规模范式。在本文中,我们将把一个 SO-101 从动臂从熟悉的 MuJoCo 工作流迁移到多达 2,048 个并行 MJWarp 环境,并考察使这一过渡成为可能的技术和验证步骤。

图 1. MJWarp 如何将 Python 连接到 GPU 仿真。MuJoCo 加载并编译 MJCF 模型;MJWarp 在 NVIDIA Warp 中实现物理,后者编译 CUDA 内核以在 NVIDIA GPU 上推进仿真状态。

这是我们的物理 AI 仿真状态系列的第二篇文章。第一篇文章梳理了机器人仿真版图。在这里,我们准备并扩展仿真环境;我们不训练策略。后续的 Newton 和 Isaac Lab 分期将覆盖下一层集成。

NVIDIA Warp 是一个用于编写高性能、GPU 加速内核的 Python 框架。Warp 让开发者用 Python 编写静态类型内核,并将它们编译为 CPU 或 CUDA 执行。首次启动会构建并缓存一个原生模块;后续启动会复用它。内核语言是面向性能的 Python 子集,而普通 Python 仍负责配置、分配和启动编排。

这个小型机器人导向内核在重力下推进点位置。一个逻辑线程处理一个点,因此同一代码可以从两个点扩展到数百万个点,而无需在控制流中引入 GPU 术语。

Warp 的三个价值主张是:显式并行工作。wp.tid() 标识当前逻辑线程拥有的点、接触、物体或世界。显式设备数组。数组位于所选设备上。在 CUDA 数组上调用 .numpy() 会同步并复制到 CPU 内存;这不是零拷贝路径。对于设备驻留的 PyTorch 或 JAX 流水线,请改用 Warp 的框架适配器或 DLPack 兼容共享。可组合内核启动。程序可以启动一系列聚焦内核,并将支持的 CUDA 工作捕获到图中,以减少重复调度开销。图捕获针对现有缓冲区重放启动;它不会融合任意内核。

还有两个 Warp 能力值得了解,尽管本文的 SO-101 工作流中都没有使用。Warp 内核是可微分的:wp.Tape 记录在其上下文中进行的前向内核启动,并在调用 backward() 时反向重放它们的伴随,这就是团队在 Warp 中构建可微分几何、CFD 和自定义物理的原因,包括用于仿真和设计优化的 CAE 工作流。Warp 还支持确定性执行,在 Warp 1.15 中引入:GPU 原子操作默认依赖调度器,因此同一内核的重复启动可能略有不同,而可选的确定性模式会用一些性能换取仿真、验证和回归测试中的可复现顺序。

这些是 Warp 能力,而非整个 MJWarp rollout 的可微分性或确定性保证。有关详细信息,请参阅 Warp 关于可微分性和确定性执行的文档。

尝试 Warp:pip install warp-lang(≥ 1.15 用于 GPU 确定性),然后 python -m warp.examples.browse,或教程 notebooks。

核心信息

NVIDIA Warp 与 MuJoCo Warp(MJWarp)把 MuJoCo 机器人仿真从 CPU 并行推进到 GPU 规模,支持最多 2048 个并行环境。文章梳理 Warp 的核心理念、可微分与确定性能力,并给出从 SO-101 工作流迁移到 MJWarp 的验证路径。

  • NVIDIA Warp 与 MuJoCo Warp(MJWarp)把 MuJoCo 机器人仿真从 CPU 并行推进到 GPU 规模,支持最多 2048 个并行环境。文章梳理 Warp 的核心理念、可微分与确定性能力,并给出从 SO-101 工作流迁移到 MJWarp 的验证路径。
  • 原贴提到:Classic MuJoCo provides fast CPU-based robot simulation for developing,
  • 来源:huggingface.co

详细解读

这是什么信号

MuJoCo Warp(MJWarp)基于 NVIDIA Warp,把兼容的 MuJoCo 模型从 CPU 仿真推进到 GPU 规模。文章以 SO-101 从动臂为例,展示如何迁移到最多 2,048 个并行环境。这属于“物理 AI 仿真状态”系列第二篇:第一篇梳理机器人仿真版图,本篇只准备和扩展仿真环境,不训练策略,后续再由 Newton 和 Isaac Lab 覆盖集成层。

为什么重要

机器人学习工作负载增长后,瓶颈从“单个世界能跑多快”转向“同时能跑多少个世界”。GPU 加速让大批量推进世界成为可能,并让仿真与学习数据靠近设备。Warp 用 Python 写静态类型内核并编译到 CPU 或 CUDA,首次启动构建并缓存原生模块,后续复用。它提供三个关键价值:显式并行工作(wp.tid() 标识当前线程拥有的点、接触、物体或世界)、显式设备数组(.numpy() 是同步拷贝,不是零拷贝)、可组合内核启动(用图捕获减少重复调度开销)。

对谁有价值

机器人学习与仿真工程师、物理 AI 研究者、需要大规模并行采样的团队,以及希望从 MuJoCo 迁移到 GPU 的开发者。尤其适合已经使用 MuJoCo 构建模型、但受限于 CPU 并行采样规模的团队。Warp 还支持可微分内核(wp.Tape)和确定性执行(Warp 1.15 引入),对可微分几何、CFD、自定义物理和 CAE 设计优化工作流有吸引力。

可以怎么行动

可以用 pip install warp-lang(GPU 确定性需 ≥ 1.15)安装,再运行 python -m warp.examples.browse 或教程 notebooks 试手。迁移时先确认 MuJoCo 模型兼容性,再把状态、接触、物体或世界映射到 Warp 逻辑线程。若下游是设备驻留的 PyTorch 或 JAX 流水线,应使用 Warp 框架适配器或 DLPack 兼容共享,避免 .numpy() 同步拷贝。需要可复现顺序时开启确定性模式,但要接受性能权衡。图捕获适合减少重复调度,但不会融合任意内核。

风险或限制

Warp 的可微分与确定性是内核能力,并不保证整个 MJWarp rollout 可微分或确定。GPU 原子操作默认依赖调度器,同一内核重复启动可能有细微差异。图捕获只针对现有缓冲区重放启动,不融合任意内核。本文不训练策略,因此要落地完整学习流程,还需等待或结合后续 Newton、Isaac Lab 等集成层。

信息差价值

这条内容的真正价值,不只是“有人发布了一个新功能”,而是它揭示了 huggingface.co 背后的产品方向、工作流变化或竞争信号。对 OPC 来说,这种信息可以转化成持续追踪的栏目选题。

如果把《如何使用 NVIDIA Warp 和 MjWarp 加速机器人仿真与学习工作流》放到你的内容系统里,它最大的价值在于帮助读者更快看懂“为什么值得关注”,而不是只看到一条碎片化动态。

参考来源

AI SUMMARY

这篇文章回答了什么

如何使用 NVIDIA Warp 和 MjWarp 加速机器人仿真与学习工作流主要讲什么?

NVIDIA Warp 与 MuJoCo Warp(MJWarp)把 MuJoCo 机器人仿真从 CPU 并行推进到 GPU 规模,支持最多 2048 个并行环境。文章梳理 Warp 的核心理念、可微分与确定性能力,并给出从 SO-101 工作流迁移到 MJWarp 的验证路径。

这篇文章最值得关注的要点是什么?

NVIDIA Warp 与 MuJoCo Warp(MJWarp)把 MuJoCo 机器人仿真从 CPU 并行推进到 GPU 规模,支持最多 2048 个并行环境。文章梳理 Warp 的核心理念、可微分与确定性能力,并给出从 SO-101…;原贴提到:Classic MuJoCo provides fast CPU-based robot simulation for developing,;来源:huggingface.co

这篇文章和哪些AI专题相关?

它适合放在Agent工作流、AI超级个体、AI工具专题里阅读。 关联原因:这篇内容命中「Agent、工作流」等主题信号。;这篇内容命中「技能、学习」等主题信号。;这篇内容来自该专题长期覆盖的栏目。

阅读这篇文章建议先理解哪些关键词?

建议先理解AI工具、工具、自动化、模型、Cursor这些关键词,再结合正文判断工具、机会或风险是否值得进入自己的工作流。

上一篇 Anthropic 团队详解如何用 Claude 在两周内把 claude.ai 提速约 3 倍 下一篇 更快的 C++ 代码智能:支持全代码库索引