Main Content

Generate Code for PyTorch and LiteRT Models in Simulink

R2026b
Generate generic C, C++, and plain CUDA® code from Simulink® models
Since R2026a

You can load a PyTorch® ExportedProgram or LiteRT file into a Simulink model and simulate the model. If you have a Simulink Coder™ license, you can generate generic C and C++ code.

If you have a GPU Coder™ license, you can also generate CUDA code.

Blocks

PyTorch Exported Program blockPyTorch ExportedProgramLoad PyTorch ExportedProgram model, compute output, and generate deployable code
LiteRT blockLiteRTLoad LiteRT model, compute output, and generate deployable code

Featured Examples