主要内容

coder.torchSetup

Install third-party tools for PyTorch code generation

Since R2026a

    Description

    Add-On Required: This feature requires the MATLAB Coder Support Package for PyTorch and LiteRT Models add-on.

    coder.torchSetup launches the add-on installer to install the Python® and Torch MLIR library.

    example

    Examples

    collapse all

    Use this command to install Python and MLIR library to generate code for PyTorch models.

    coder.torchSetup

    If MATLAB doesn't already have the third-party tools installed, this command launches the Add-On Installer.

    Select third-party tools for installation.

    Click Install to install the third-party tools.

    Version History

    Introduced in R2026a