We present a GPU-based system for automatic differentiation (AD) of functions defined on triangle meshes, designed to exploit the locality and sparsity in mesh-based computation. Our system evaluates derivatives using per-element forward-mode AD, confining all computation to registers and shared memory and assembling global gradients, sparse Jacobians, and sparse Hessians directly on the GPU. By avoiding global computation graphs, intermediate buffers, and device-host synchronization, our approach minimizes memory traffic and enables efficient differentiation under both static and dynamically changing sparsity. Our programming model lets users express energy terms over mesh neighborhoods, while our system automatically manages parallel execution, derivative propagation, sparse assembly, and matrix-free operations such as Hessian-vector products. Our system supports both scalar- and vector-valued objectives, dynamic interaction-driven sparsity updates, and seamless integration with external GPU sparse linear solvers. We evaluate our system on applications including elastic and cloth simulation, surface parameterization, mesh smoothing, frame field design, ARAP deformation, and spherical manifold optimization. Across these tasks, our system consistently outperforms state-of-the-art differentiation frameworks, including PyTorch, JAX, Warp, DrJIT, EnzymeAD, and Thallo. We demonstrate speedups across a range of solver types, from Newton and Gauss-Newton for nonlinear least squares to L-BFGS and gradient descent, and across different derivative usage modes, including Hessian-vector products as well as full sparse Hessian and Jacobian construction. Our system is available as open source at https://github.com/owensgroup/RXMesh.


翻译:我们提出了一种基于GPU的自动微分系统,专门针对三角网格上定义的函数进行优化,旨在充分利用网格计算中的局部性与稀疏性。该系统采用逐元素前向模式自动微分,将所有计算限制在寄存器和共享内存中,并直接在GPU上组装全局梯度、稀疏雅可比矩阵和稀疏海森矩阵。通过避免全局计算图、中间缓冲区和设备-主机同步,本方法最小化内存流量,并能在静态和动态变化的稀疏模式下实现高效微分。我们的编程模型允许用户在网格邻域上表达能量项,而系统自动管理并行执行、导数传播、稀疏组装以及海森-向量积等无矩阵运算。系统支持标量值和向量值目标函数、动态交互驱动的稀疏性更新,并与外部GPU稀疏线性求解器无缝集成。我们在弹性/布料仿真、曲面参数化、网格平滑、框架场设计、ARAP变形及球面流形优化等应用上评估该系统。实验表明,本系统在所有任务中均持续优于现有先进微分框架(包括PyTorch、JAX、Warp、DrJIT、EnzymeAD和Thallo)。我们展示了从牛顿法、高斯-牛顿法(用于非线性最小二乘)到L-BFGS和梯度下降等不同求解器类型,以及从海森-向量积到完整稀疏海森矩阵和雅可比矩阵构建等不同导数使用模式下的加速效果。本系统已作为开源项目发布在https://github.com/owensgroup/RXMesh。

0
下载
关闭预览

相关内容

【AAAI2023】面向领域自适应语义分割的几何感知网络
专知会员服务
21+阅读 · 2022年12月7日
自动结构变分推理,Automatic structured variational inference
专知会员服务
41+阅读 · 2020年2月10日
自注意力机制在计算机视觉中的应用
GAN生成式对抗网络
19+阅读 · 2018年12月20日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
7+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
8+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关VIP内容
【AAAI2023】面向领域自适应语义分割的几何感知网络
专知会员服务
21+阅读 · 2022年12月7日
自动结构变分推理,Automatic structured variational inference
专知会员服务
41+阅读 · 2020年2月10日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员