Rate this Page

PyTorch operator support for the VGF backend#

This page lists VGF-supported PyTorch APIs and the dtype and quantization modes covered by the VGF backend test pipeline.

8x8 means 8-bit activations and 8-bit weights. 16x8 means 16-bit activations and 8-bit weights. 8x4 means 8-bit activations and 4-bit weights.

Total supported PyTorch APIs: 157.

PyTorch API

Support profile

DType

Quantization mode

torch._assert_scalar

FP

FP32

-

torch.abs

FP, INT

FP32, FP16, BF16, INT8

8x8

torch.acos

FP, INT

FP32, INT8, BOOL

8x8

torch.acosh

FP, INT

FP32, INT8

8x8

torch.add / +

FP, INT

FP32, FP16, BF16, INT8, INT16

8x8, 16x8

torch.addmm

FP

FP32

-

torch.alias_copy

FP, INT

FP32, FP16, BF16, INT8

8x8

torch.amax

FP, INT

FP32, FP16, BF16, INT8, INT16

8x8, 16x8

torch.amin

FP, INT

FP32, FP16, BF16, INT8, INT16

8x8, 16x8

torch.any

FP, INT

FP32, INT8

8x8

torch.arange

FP, INT

FP32, INT8

8x8

torch.argmax

FP, INT

FP32, FP16, BF16, INT8

8x8

torch.as_strided_copy

FP, INT

FP32, INT8

8x8

torch.asin

FP, INT

FP32, INT8

8x8

torch.asinh

FP, INT

FP32, INT8

8x8

torch.atan

FP, INT

FP32, INT8

8x8

torch.atanh

FP, INT

FP32, INT8

8x8

torch.batch_norm

FP

FP32

-

torch.bitwise_and / &

FP, INT

FP32, INT8

8x8

torch.bitwise_left_shift / <<

FP, INT

FP32, INT8

8x8

torch.bitwise_not / ~

FP, INT

FP32, INT8, BOOL

8x8

torch.bitwise_or / |

FP, INT

FP32, INT8

8x8

torch.bitwise_right_shift / >>

FP, INT

FP32, INT8

8x8

torch.bitwise_xor / ^

FP, INT

FP32, INT8

8x8

torch.bmm

FP, INT

FP32, INT8

8x8

torch.cat

FP, INT

FP32, FP16, BF16, INT8

8x8

torch.ceil

FP, INT

FP16, BF16, INT8

8x8

torch.clamp

FP, INT

FP32, FP16, BF16, INT8, INT16

8x8, 16x8

torch.clone / torch.Tensor.clone

FP, INT

FP32, INT8

8x8

torch.cond

INT

INT8

8x8

torch.conv1d

FP, INT

FP32, INT8, INT4

8x8, 8x4

torch.conv2d

FP, INT

FP32, FP16, BF16, INT8, INT16, INT4

8x8, 8x4, 16x8

torch.conv3d

FP, INT

FP32, FP16, BF16, INT8, INT16, INT4

8x8, 8x4, 16x8

torch.conv_transpose2d

FP, INT

FP32, FP16, BF16, INT8, INT16, INT4

8x8, 8x4, 16x8

torch.cos

FP, INT

FP16, BF16, INT8

8x8

torch.cosh

FP, INT

FP32, INT8

8x8

torch.cumsum

FP, INT

FP32, INT8

8x8

torch.div

FP, INT

FP32, INT8

8x8

torch.div / /

FP, INT

FP32, INT8

8x8

torch.eq / ==

FP, INT

FP32, INT8, INT16

8x8, 16x8

torch.erf

FP, INT

FP32, FP16, BF16, INT8

8x8

torch.erfinv

FP, INT

FP32, FP16, INT8

8x8

torch.exp

FP, INT

FP16, BF16, INT8

8x8

torch.expm1

FP, INT

FP32, INT8

8x8

torch.eye

FP, INT

FP32, INT8

8x8

torch.fill_

FP, INT

FP32, INT8

8x8

torch.flip

FP, INT

FP32, INT8

8x8

torch.floor

FP, INT

FP16, BF16, INT8

8x8

torch.floor_divide / //

FP

FP32

-

torch.full

FP, INT

FP32, INT8

8x8

torch.full_like

FP, INT

FP32, INT8

8x8

torch.gather

FP, INT

FP32, FP16, BF16, INT8, BOOL

8x8

torch.ge / >=

FP, INT

FP32, INT8, INT16

8x8, 16x8

torch.grid_sampler

FP, INT

FP32, INT8

8x8

torch.grid_sampler_2d

FP, INT

FP32, INT8

8x8

torch.group_norm

FP

FP32

-

torch.gt / >

FP, INT

FP32, INT8, INT16

8x8, 16x8

torch.index_put_

INT

INT8

8x8

torch.index_select

FP, INT

FP32, FP16, BF16, INT8, BOOL

8x8

torch.isinf

FP

FP32

-

torch.isnan

FP

FP32

-

torch.layer_norm

FP, INT

FP32, INT8

8x8

torch.le / <=

FP, INT

FP32, INT8, INT16

8x8, 16x8

torch.linspace

FP, INT

FP32, INT8

8x8

torch.log

FP, INT

FP16, BF16, INT8

8x8

torch.log10

INT

INT8

8x8

torch.log1p

FP, INT

FP32, INT8

8x8

torch.log_softmax

FP, INT

FP32, INT8

8x8

torch.logical_and

FP, INT

FP32, INT8

8x8

torch.logical_not

FP, INT

FP32, INT8

8x8

torch.logical_or

FP, INT

FP32, INT8

8x8

torch.logical_xor

FP, INT

FP32, INT8

8x8

torch.logit

FP, INT

FP32, INT8

8x8

torch.lt / <

FP, INT

FP32, INT8, INT16

8x8, 16x8

torch.masked_fill / torch.Tensor.masked_fill

FP, INT

FP32, INT8

8x8

torch.matmul / @

FP, INT

FP32, INT8

8x8

torch.max

FP

FP32, FP16, BF16

-

torch.max_pool1d

FP

FP32

-

torch.max_pool2d

FP, INT

FP32, FP16, BF16, INT8, INT16

8x8, 16x8

torch.maximum

FP, INT

FP32, FP16, BF16, INT8, INT16

8x8, 16x8

torch.mean

FP, INT

FP32, INT8

8x8

torch.min

FP

FP32, FP16, BF16

-

torch.minimum

FP, INT

FP32, FP16, BF16, INT8, INT16

8x8, 16x8

torch.mm

FP, INT

FP32, INT8

8x8

torch.mul / *

FP, INT

FP32, FP16, BF16, INT8

8x8

torch.ne / !=

FP, INT

FP32, INT8

8x8

torch.neg / unary -

FP, INT

FP32, INT8, INT16

8x8, 16x8

torch.nn.AdaptiveAvgPool2d / torch.nn.functional.adaptive_avg_pool2d

FP

FP32

-

torch.nn.AvgPool2d / torch.nn.functional.avg_pool2d

FP, INT

FP32, INT8, INT16

8x8, 16x8

torch.nn.BatchNorm2d / torch.nn.functional.batch_norm

FP, INT

FP32, INT8

8x8

torch.nn.CELU / torch.nn.functional.celu

FP

FP32

-

torch.nn.Conv2d / torch.nn.functional.conv2d

FP, INT

FP32, FP16, BF16, INT8, INT16, INT4

8x8, 8x4, 16x8

torch.nn.ELU / torch.nn.functional.elu

FP, INT

FP32, INT8

8x8

torch.nn.Embedding / torch.nn.functional.embedding

FP, INT

FP32, INT8

8x8

torch.nn.functional.pad

FP, INT

FP32, FP16, BF16, INT8, INT16

8x8, 16x8

torch.nn.GELU / torch.nn.functional.gelu

FP, INT

FP32, BF16, INT8

8x8

torch.nn.GroupNorm / torch.nn.functional.group_norm

FP, INT

FP32, INT8

8x8

torch.nn.Hardsigmoid / torch.nn.functional.hardsigmoid

FP, INT

FP32, INT8

8x8

torch.nn.Hardswish / torch.nn.functional.hardswish

FP, INT

FP32, INT8

8x8

torch.nn.Hardtanh / torch.nn.functional.hardtanh

FP, INT

FP32, INT8

8x8

torch.nn.LeakyReLU / torch.nn.functional.leaky_relu

FP, INT

FP32, INT8

8x8

torch.nn.Linear / torch.nn.functional.linear

FP, INT

FP32, INT8, INT4

8x8, 8x4

torch.nn.LogSoftmax / torch.nn.functional.log_softmax

FP, INT

FP32, INT8

8x8

torch.nn.MaxPool2d / torch.nn.functional.max_pool2d

FP

FP32

-

torch.nn.SELU / torch.nn.functional.selu

FP

FP32

-

torch.nn.SiLU / torch.nn.functional.silu

FP, INT

FP32, INT8

8x8

torch.nn.Softmax / torch.nn.functional.softmax

FP, INT

FP32, INT8

8x8

torch.ones

FP, INT

FP32, INT8

8x8

torch.permute / torch.Tensor.permute

FP, INT

FP32, FP16, BF16, INT8

8x8

torch.pixel_shuffle

FP, INT

FP32, INT8

8x8

torch.pixel_unshuffle

FP, INT

FP32, INT8

8x8

torch.pow / **

FP, INT

FP32, FP16, BF16, INT8

8x8

torch.prod

FP, INT

FP16, BF16, INT8

8x8

torch.reciprocal

FP, INT

FP16, BF16, INT8

8x8

torch.relu / torch.nn.ReLU

FP, INT

FP32, INT8

8x8

torch.remainder

FP, INT

FP32, INT8

8x8

torch.repeat_interleave

FP, INT

FP16, BF16, INT8, INT16, BOOL

8x8, 16x8

torch.roll

FP, INT

FP32, FP16, BF16, INT8

8x8

torch.round

FP, INT

FP32, FP16, BF16, INT8

8x8

torch.rsqrt

FP, INT

FP32, INT8, INT16

8x8, 16x8

torch.rsub

FP

FP32

-

torch.scalar_tensor

FP, INT

FP32, INT8

8x8

torch.select / torch.Tensor.select

FP, INT

FP32, INT8

8x8

torch.select_scatter

FP

FP32

-

torch.sigmoid / torch.nn.Sigmoid

FP, INT

FP32, FP16, BF16, INT8

8x8

torch.sign

FP, INT

FP32, INT8

8x8

torch.sin

FP, INT

FP16, BF16, INT8

8x8

torch.sinh

FP, INT

FP32, INT8

8x8

torch.slice_scatter

FP

FP32

-

torch.softmax

FP, INT

FP32, INT8

8x8

torch.split / torch.Tensor.split

FP, INT

FP32, INT8

8x8

torch.sqrt

FP

FP32

-

torch.squeeze

FP, INT

FP32, INT8

8x8

torch.squeeze / torch.Tensor.squeeze

FP, INT

FP32, INT8

8x8

torch.stack

FP, INT

FP32, INT8

8x8

torch.sub / -

FP, INT

FP32, FP16, BF16, INT8, INT16

8x8, 16x8

torch.sum

FP, INT

FP16, BF16, INT8

8x8

torch.t / torch.Tensor.t

FP, INT

FP32, INT8

8x8

torch.tan

FP, INT

FP32, INT8

8x8

torch.tanh / torch.nn.Tanh

FP, INT

FP16, BF16, INT8

8x8

torch.Tensor.__getitem__ / tensor indexing

FP, INT

FP32, FP16, BF16, INT8

8x8

torch.Tensor.__getitem__ / tensor slicing

FP, INT

FP32, FP16, BF16, INT8

8x8

torch.Tensor.__setitem__ / tensor indexing assignment

FP, INT

FP32, INT8

8x8

torch.Tensor.copy_

FP, INT

FP32, INT8

8x8

torch.Tensor.expand

FP, INT

FP32, INT8

8x8

torch.Tensor.repeat

FP, INT

FP16, BF16, INT8, INT16, BOOL

8x8, 16x8

torch.Tensor.unfold

FP, INT

FP32, FP16, BF16, INT8, BOOL

8x8

torch.Tensor.view

FP, INT

FP16, INT8

8x8

torch.transpose / torch.Tensor.transpose

FP, INT

FP32, INT8

8x8

torch.tril

FP

FP32

-

torch.unbind

FP, INT

FP32, INT8

8x8

torch.unflatten

FP, INT

FP32, INT8

8x8

torch.unsqueeze / torch.Tensor.unsqueeze

FP, INT

FP32, INT8

8x8

torch.var

FP

FP32

-

torch.where

FP, INT

FP32, INT8, INT16

8x8, 16x8

torch.while_loop

INT

INT8

8x8

torch.zeros

FP, INT

FP32, INT8

8x8