Install MATLAB Coder Support Package for PyTorch and LiteRT Models
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
On the MATLAB Home tab, in the Environment section, select Add-Ons > Explore Add-Ons.

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

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.
Click the Add-Ons icon
on the left sidebar to open the Add-Ons
panel. In the Add-Ons panel, click the Options button
next to the installed support package,
and then click Setup.
Alternatively, use the
coder.torchSetupfunction to launch the Add-On Installer.Review the license terms for each of the third-party tools.

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
next to the installed support package, and then click
Uninstall.