Skip to main content
QUICK REVIEW

[Paper Review] Ivy: Templated Deep Learning for Inter-Framework Portability

Daniel Lenton, Fabio Pardo|arXiv (Cornell University)|Feb 4, 2021
Advanced Neural Network ApplicationsComputer Science22 references6 citations
TL;DR

Ivy is a templated deep learning framework that enables framework-agnostic code by abstracting core operations across TensorFlow, PyTorch, Jax, MXNet, and NumPy, allowing developers to write portable, high-level functions with less than 1% runtime overhead. It supports inter-framework portability through consistent APIs and enables lifelong, reusable libraries across current and future frameworks.

ABSTRACT

We introduce Ivy, a templated Deep Learning (DL) framework which abstracts existing DL frameworks. Ivy unifies the core functions of these frameworks to exhibit consistent call signatures, syntax and input-output behaviour. New high-level framework-agnostic functions and classes, which are usable alongside framework-specific code, can then be implemented as compositions of the unified low-level Ivy functions. Ivy currently supports TensorFlow, PyTorch, MXNet, Jax and NumPy. We also release four pure-Ivy libraries for mechanics, 3D vision, robotics, and differentiable environments. Through our evaluations, we show that Ivy can significantly reduce lines of code with a runtime overhead of less than 1% in most cases. We welcome developers to join the Ivy community by writing their own functions, layers and libraries in Ivy, maximizing their audience and helping to accelerate DL research through inter-framework codebases. More information can be found at https://ivy-dl.org.

Motivation & Objective

  • To address the lack of interoperability among deep learning frameworks, which hinders code reuse and increases maintenance overhead.
  • To enable developers to write high-level, framework-agnostic functions that work seamlessly across multiple deep learning frameworks.
  • To reduce code duplication and increase portability by abstracting core operations into a unified API across existing frameworks.
  • To support the creation of 'lifelong' libraries that remain usable across current and future deep learning frameworks.
  • To facilitate hybrid differentiable programming by enabling parameter-free, domain-specific functions to be integrated into end-to-end differentiable computation graphs.

Proposed method

  • Ivy abstracts the core functional APIs of existing deep learning frameworks (TensorFlow, PyTorch, Jax, MXNet, NumPy) into a unified interface with consistent call signatures, syntax, and input-output behavior.
  • It enables composition of high-level, framework-agnostic functions using low-level unified Ivy operations, ensuring portability across backends.
  • Ivy supports both eager and compiled execution modes, with performance overhead measured via timing comparisons across frameworks and libraries.
  • The framework uses a backend abstraction layer where each framework's native operations are mapped to a common Ivy interface, preserving runtime efficiency.
  • Four pure-Ivy libraries—mechanics, 3D vision, robotics, and differentiable environments—demonstrate practical use cases and inter-framework compatibility.
  • Runtime overhead is evaluated using time.perf_counter() in eager mode, with results extrapolated to compiled mode to assess relative performance impact.

Experimental results

Research questions

  • RQ1Can a unified deep learning API be created that maintains consistent behavior across multiple major frameworks while preserving performance?
  • RQ2To what extent does Ivy reduce code duplication and improve portability across deep learning frameworks?
  • RQ3What is the runtime overhead of using Ivy compared to native framework implementations?
  • RQ4Can Ivy effectively support hybrid differentiable programming by integrating domain-specific, parameter-free functions into differentiable computation graphs?
  • RQ5How well does Ivy scale across diverse research domains, such as 3D vision and robotics, with minimal performance degradation?

Key findings

  • Ivy achieves less than 1% runtime overhead in most cases, with average overhead across frameworks and libraries at 1.1% in eager mode and 0.1% in compiled mode.
  • The vision library incurs the highest overhead (1.8% mean in compiled mode) due to frequent use of complex operations like gather and scatter with multi-dimensional support.
  • Runtime measurements show that Ivy's relative performance overhead is minimal and consistent across all supported frameworks, including TensorFlow, PyTorch, Jax, MXNet, and NumPy.
  • The framework enables seamless inter-framework compatibility: a single Ivy function can be used directly in any supported backend without modification.
  • Ivy supports hybrid differentiable programming by allowing hand-designed, domain-specific functions (e.g., from the vision library) to be integrated into end-to-end differentiable models in any framework.
  • The framework enables the creation of 'lifelong' libraries that remain functional across current and future deep learning frameworks, reducing long-term maintenance costs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.