MSAIDCLGOCNov 13, 2022

TorchOpt: An Efficient Library for Differentiable Optimization

Peking U
arXiv:2211.06934v121 citationsh-index: 49Has Code
Originality Incremental advance
AI Analysis

This addresses the problem of cumbersome and expensive development of differentiable optimization algorithms for researchers and practitioners, though it is incremental as it builds on existing PyTorch frameworks.

The paper tackles the inefficiency and lack of multi-CPU/GPU support in existing differentiable optimization libraries by introducing TorchOpt, a PyTorch-based library that achieves a 5.2x training time speedup on an 8-GPU server.

Recent years have witnessed the booming of various differentiable optimization algorithms. These algorithms exhibit different execution patterns, and their execution needs massive computational resources that go beyond a single CPU and GPU. Existing differentiable optimization libraries, however, cannot support efficient algorithm development and multi-CPU/GPU execution, making the development of differentiable optimization algorithms often cumbersome and expensive. This paper introduces TorchOpt, a PyTorch-based efficient library for differentiable optimization. TorchOpt provides a unified and expressive differentiable optimization programming abstraction. This abstraction allows users to efficiently declare and analyze various differentiable optimization programs with explicit gradients, implicit gradients, and zero-order gradients. TorchOpt further provides a high-performance distributed execution runtime. This runtime can fully parallelize computation-intensive differentiation operations (e.g. tensor tree flattening) on CPUs / GPUs and automatically distribute computation to distributed devices. Experimental results show that TorchOpt achieves $5.2\times$ training time speedup on an 8-GPU server. TorchOpt is available at: https://github.com/metaopt/torchopt/.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes