Contenu principal

Install MATLAB Coder Support Package for PyTorch and LiteRT Models

Since R2026a

To add code generation support for PyTorch® and LiteRT models to MATLAB® and Simulink®, install the MATLAB Coder™ Support Package for PyTorch and LiteRT Models.

Install Support Package

  1. On the MATLAB Home tab, in the Environment section, select Add-Ons > Explore Add-Ons.

    Open Add-On explorer.

  2. In the Add-On Explorer window, search for MATLAB Coder Support Package for PyTorch and LiteRT Models.

    Select the support package for installation.

  3. Click Next to install the support package. The tool installs the required software for integrating LiteRT models in MATLAB and Simulink.

Note

When the support package installation is complete, you can proceed directly to install additional tool to enable support for PyTorch models by clicking Setup Now. You can also complete the setup task later. For more information, see Install Additional Software.

Install Additional Software

To integrate PyTorch models in MATLAB and Simulink, you must install additional third-party tools, including Python® and Torch-MLIR library.

  1. Click the Add-Ons icon on the left sidebar to open the Add-Ons panel.

  2. In the Add-Ons panel, click the Options button options next to the installed support package, and then click Setup.

    Complete setup task for the installed support package.

    Alternatively, use the coder.torchSetup function to launch the Add-On Installer.

  3. Review the license terms for each of the third-party tools.

    Select third-party tools for installation.

  4. Click Install.

Update Support Package

On the MATLAB Home tab, in the Resources section, select Help > Check for Updates.

Uninstall Support Package

To uninstall the support package, first open the Add-Ons panel. To open the Add-Ons panel, click the Add-Ons icon on the left sidebar.

Then in the Add-Ons panel, click the Options button options next to the installed support package, and then click Uninstall.

See Also

Functions

Objects

Blocks

Topics