Dynamic Shape Support Status of primitive Interface

View Source On Gitee

The following list provides primitive interfaces that support dynamic shape functionality in PYNATIVE mode. However, some primitive interfaces may have incomplete data type support. If you encounter such issues, you can resolve them by manually incorporating the Cast operator.

Primitive interfaces outside of this list have limited support for dynamic shape functionality and may fail to execute. Additionally, in graph mode, dynamic shape functionality is also limited and may result in execution failures.

If you encounter issues that the execution of dynamic shape operator fails, it is recommended to avoid introducing dynamic shape in the network. For example, you can adjust the inputs of primitive interfaces to construct a fully static shape network or confine dynamic shape to a local scope within the network.

Operator name

Ascend

GPU

CPU

mindspore.Abs

✔️

✔️

✔️

mindspore.Acosh

✔️

✔️

✔️

mindspore.Adam

✔️

✔️

✔️

mindspore.AdaptiveAvgPool2D

✔️

✔️

✔️

mindspore.AdaptiveAvgPool3D

✔️

✔️

✔️

mindspore.Add

✔️

✔️

✔️

mindspore.Addcmul

✔️

✔️

✔️

mindspore.AddN

✔️

✔️

✔️

mindspore.Angle

✔️

✔️

✔️

mindspore.ArgMaxWithValue

✔️

✔️

✔️

mindspore.ArgMinWithValue

✔️

✔️

✔️

mindspore.Asin

✔️

✔️

✔️

mindspore.Asinh

✔️

✔️

✔️

mindspore.Assign

✔️

✔️

✔️

mindspore.AssignAdd

✔️

✔️

✔️

mindspore.Atan

✔️

✔️

✔️

mindspore.Atan2

✔️

✔️

✔️

mindspore.Atanh

✔️

✔️

✔️

mindspore.AvgPool

✔️

✔️

✔️

mindspore.AvgPool3D

✔️

✔️

✔️

mindspore.BatchNorm

✔️

✔️

✔️

mindspore.BCEWithLogitsLoss

✔️

✔️

✔️

mindspore.Bernoulli

✔️

✔️

mindspore.BesselI0

✔️

✔️

mindspore.BesselI0e

✔️

✔️

✔️

mindspore.BesselI1

✔️

✔️

mindspore.BesselI1e

✔️

✔️

✔️

mindspore.BesselJ0

✔️

✔️

mindspore.BesselJ1

✔️

✔️

mindspore.BiasAdd

✔️

✔️

️❌

mindspore.BinaryCrossEntropy

✔️

✔️

✔️

mindspore.BitwiseAnd

✔️

✔️

✔️

mindspore.BitwiseOr

✔️

✔️

✔️

mindspore.BitwiseXor

✔️

✔️

✔️

mindspore.BroadcastTo

✔️

✔️

✔️

mindspore.Cast

✔️

✔️

✔️

mindspore.Ceil

✔️

✔️

✔️

mindspore.Col2Im

✔️

✔️

✔️

mindspore.Complex

✔️

✔️

✔️

mindspore.Concat

✔️

✔️

✔️

mindspore.Conj

✔️

✔️

mindspore.Conv2D

✔️

✔️

✔️

mindspore.Conv2DTranspose

✔️

✔️

✔️

mindspore.Conv3D

✔️

✔️

✔️

mindspore.Conv3DTranspose

✔️

✔️

✔️

mindspore.Cos

✔️

✔️

✔️

mindspore.Cosh

✔️

✔️

✔️

mindspore.Cross

✔️

✔️

mindspore.CTCLossV2

✔️

✔️

✔️

mindspore.Cummax

✔️

✔️

mindspore.Cummin

✔️

✔️

✔️

mindspore.CumSum

✔️

✔️

️❌

mindspore.Diag

✔️

✔️

✔️

mindspore.Digamma

✔️

✔️

mindspore.Div

✔️

✔️

✔️

mindspore.Dropout

✔️

✔️

✔️

mindspore.Dropout2D

✔️

✔️

✔️

mindspore.Dropout3D

✔️

✔️

✔️

mindspore.DynamicGRUV2

✔️

mindspore.Einsum

✔️

mindspore.Elu

✔️

✔️

✔️

mindspore.Equal

✔️

✔️

✔️

mindspore.Erf

✔️

✔️

✔️

mindspore.Erfc

✔️

✔️

✔️

mindspore.Exp

✔️

✔️

✔️

mindspore.ExpandDims

✔️

✔️

✔️

mindspore.Expm1

✔️

✔️

✔️

mindspore.Eye

✔️

✔️

✔️

mindspore.Fill

✔️

✔️

✔️

mindspore.FillV2

✔️

✔️

✔️

mindspore.Flatten

✔️

✔️

✔️

mindspore.Floor

✔️

✔️

✔️

mindspore.FloorDiv

✔️

✔️

✔️

mindspore.FloorMod

✔️

✔️

✔️

mindspore.Gather

✔️

✔️

✔️

mindspore.GatherD

✔️

✔️

✔️

mindspore.GatherNd

✔️

✔️

✔️

mindspore.Gcd

✔️

✔️

✔️

mindspore.Geqrf

✔️

✔️

✔️

mindspore.Ger

✔️

✔️

✔️

mindspore.Greater

✔️

✔️

✔️

mindspore.GreaterEqual

✔️

✔️

✔️

mindspore.GridSampler2D

✔️

✔️

✔️

mindspore.GridSampler3D

✔️

✔️

✔️

mindspore.Heaviside

✔️

✔️

✔️

mindspore.HSwish

✔️

✔️

✔️

mindspore.Hypot

✔️

✔️

✔️

mindspore.Identity

✔️

✔️

✔️

mindspore.Imag

✔️

✔️

✔️

mindspore.Invert

✔️

✔️

✔️

mindspore.IsFinite

✔️

✔️

✔️

mindspore.IsInf

✔️

✔️

✔️

mindspore.IsNan

✔️

✔️

✔️

mindspore.KLDivLoss

✔️

✔️

✔️

mindspore.LayerNorm

✔️

✔️

✔️

mindspore.Lcm

✔️

✔️

✔️

mindspore.LeftShift

✔️

✔️

✔️

mindspore.Lerp

✔️

✔️

✔️

mindspore.Less

✔️

✔️

✔️

mindspore.LessEqual

✔️

✔️

✔️

mindspore.LinSpace

✔️

✔️

✔️

mindspore.Log

✔️

✔️

✔️

mindspore.Log1p

✔️

✔️

✔️

mindspore.LogicalAnd

✔️

✔️

✔️

mindspore.LogicalNot

✔️

✔️

✔️

mindspore.LogicalOr

✔️

✔️

✔️

mindspore.LogicalXor

✔️

✔️

mindspore.Logit

✔️

✔️

✔️

mindspore.LogSoftmax

✔️

✔️

✔️

mindspore.LpNorm

✔️

✔️

✔️

mindspore.LRN

✔️

✔️

✔️

mindspore.MaskedFill

✔️

✔️

✔️

mindspore.MaskedSelect

✔️

✔️

✔️

mindspore.MatrixInverse

✔️

✔️

mindspore.MatrixSolve

✔️

✔️

mindspore.Maximum

✔️

✔️

✔️

mindspore.MaxPool

✔️

✔️

✔️

mindspore.MaxPool3D

✔️

✔️

✔️

mindspore.MaxUnpool2D

✔️

✔️

mindspore.Median

✔️

✔️

mindspore.Meshgrid

✔️

✔️

✔️

mindspore.Minimum

✔️

✔️

✔️

mindspore.MirrorPad

✔️

✔️

mindspore.Mish

✔️

✔️

mindspore.Mod

✔️

✔️

✔️

mindspore.Mul

✔️

✔️

✔️

mindspore.Multinomial

✔️

✔️

✔️

mindspore.Mvlgamma

✔️

✔️

✔️

mindspore.NanToNum

✔️

✔️

mindspore.Neg

✔️

✔️

✔️

mindspore.NextAfter

✔️

✔️

✔️

mindspore.NLLLoss

✔️

✔️

✔️

mindspore.nonzero

✔️

✔️

✔️

mindspore.NotEqual

✔️

✔️

✔️

mindspore.OneHot

✔️

✔️

✔️

mindspore.OnesLike

✔️

✔️

✔️

mindspore.Pad

✔️

✔️

✔️

mindspore.Polar

✔️

✔️

mindspore.Polygamma

✔️

✔️

mindspore.Pow

✔️

✔️

✔️

mindspore.PReLU

✔️

✔️

✔️

mindspore.RandpermV2

✔️

mindspore.Range

✔️

✔️

mindspore.Real

✔️

✔️

mindspore.RealDiv

✔️

✔️

✔️

mindspore.Reciprocal

✔️

✔️

✔️

mindspore.ReduceAll

✔️

✔️

✔️

mindspore.ReduceAny

✔️

✔️

✔️

mindspore.ReduceMax

✔️

✔️

✔️

mindspore.ReduceMean

✔️

✔️

✔️

mindspore.ReduceMin

✔️

✔️

✔️

mindspore.ReduceProd

✔️

✔️

✔️

mindspore.ReduceSum

✔️

✔️

✔️

mindspore.Reshape

✔️

✔️

✔️

mindspore.ResizeBilinearV2

✔️

✔️

️❌

mindspore.ReverseSequence

✔️

✔️

✔️

mindspore.ReverseV2

✔️

✔️

✔️

mindspore.RightShift

✔️

✔️

✔️

mindspore.Rint

✔️

✔️

✔️

mindspore.Round

✔️

✔️

✔️

mindspore.Rsqrt

✔️

✔️

✔️

mindspore.ScatterNd

✔️

✔️

✔️

mindspore.ScatterNdAdd

✔️

✔️

✔️

mindspore.ScatterNdMax

✔️

✔️

✔️

mindspore.ScatterNdMin

✔️

✔️

✔️

mindspore.ScatterNdMul

✔️

✔️

✔️

mindspore.ScatterNdSub

✔️

✔️

✔️

mindspore.ScatterNdUpdate

✔️

✔️

✔️

mindspore.ScatterSub

✔️

✔️

✔️

mindspore.ScatterUpdate

✔️

✔️

✔️

mindspore.Select

✔️

✔️

✔️

mindspore.Sigmoid

✔️

✔️

✔️

mindspore.Sign

✔️

✔️

✔️

mindspore.Sin

✔️

✔️

✔️

mindspore.Sinc

✔️

✔️

✔️

mindspore.Sinh

✔️

✔️

✔️

mindspore.Slice

✔️

✔️

✔️

mindspore.SmoothL1Loss

✔️

✔️

✔️

mindspore.Softmax

✔️

✔️

✔️

mindspore.SoftmaxCrossEntropyWithLogits

✔️

✔️

✔️

mindspore.Softplus

✔️

✔️

✔️

mindspore.SoftShrink

✔️

✔️

✔️

mindspore.Sort

✔️

✔️

mindspore.Split

✔️

✔️

️❌

mindspore.Sqrt

✔️

✔️

✔️

mindspore.Square

✔️

✔️

✔️

mindspore.Squeeze

✔️

✔️

✔️

mindspore.Stack

✔️

✔️

✔️

mindspore.StandardNormal

✔️

✔️

✔️

mindspore.StridedSlice

✔️

✔️

✔️

mindspore.Sub

✔️

✔️

✔️

mindspore.Svd

✔️

✔️

mindspore.Tan

✔️

✔️

✔️

mindspore.Tanh

✔️

✔️

✔️

mindspore.Tile

✔️

✔️

✔️

mindspore.TopK

✔️

✔️

✔️

mindspore.Trace

✔️

✔️

✔️

mindspore.Transpose

✔️

✔️

✔️

mindspore.Tril

✔️

✔️

✔️

mindspore.Trunc

✔️

✔️

✔️

mindspore.TruncateDiv

✔️

✔️

️❌

mindspore.UniformInt

✔️

✔️

mindspore.UniformReal

✔️

✔️

mindspore.Unique

✔️

✔️

✔️

mindspore.UnsortedSegmentSum

✔️

✔️

✔️

mindspore.Xlogy

✔️

✔️

✔️

mindspore.ZerosLike

✔️

✔️

✔️