Supported Models

The Vollo compiler supports PyTorch models that use the following operations:

OperationSupport NotesFp32 Support
Pointwise arithmetic ops+, -, *, /, maximum, minimum, the pointwise overload of max and min+, -, *, maximum, minimum
Inequality>, <, >=, <=
Clamp opsclamp, relu
Matrix multiplicationLinear; matmul / @ where one side is a constant
ConvolutionVia vollo_torch.nn.PaddedConv1d, with groups == 1 or groups == in_channels == out_channels
LSTMtorch.nn.LSTM, vollo_torch.nn.LSTM
Indexing / slicingPartial square bracket [] support; index_select, narrow
sumkeepdim = True required when summing over data dimension
whereIf the where condition is an inequality comparison
Concatenationcat, concat, concatenate
Stackingstack, vstack, row_stack, hstack, column_stack, dstack
LayerNorm
RMSNormvia vollo_torch.nn.RMSNorm for torch versions < 2.4
Batch NormalizationBatchNorm1d, BatchNorm2d, BatchNorm3d
Transposingtranspose, swapdims, swapaxes, t, T, mT, permute; See data dimension
squeeze, unsqueeze
Reshapingreshape, view, reshape_as, view_as, flatten; Stride of data dimension must be unchanged
BroadcastingImplicitly or with broadcast_to, broadcast_tensors, expand, expand_as
sqrttorch.sqrt, torch.rsqrt
tanhtorch.tanh, torch.nn.Tanh
Exponentialtorch.exp, torch.exp2
silutorch.nn.functional.silu, torch.nn.SiLU
softplustorch.nn.functional.softplus, torch.nn.Softplus
softmaxtorch.softmax, torch.nn.Softmax
sigmoidtorch.sigmoid, torch.nn.functional.sigmoid, torch.nn.Sigmoid

Models that take multiple input tensors and return multiple output tensors (i.e. a tuple of tensors) are supported.

Note that for operations like Dropout and BatchNorm1d (which change behaviour at inference time) to be handled correctly, the model should be in eval mode.

TorchScript

The Vollo compiler supports standard PyTorch modules (torch.nn.Module); it does not support TorchScript modules (torch.jit.ScriptModule).