#onnx #machine-learning #cli-command #flops

nightly bin+lib steelix

Your one stop CLI for ONNX model analysis. Featuring graph visualization, FLOP counts, memory metrics and more!

1 unstable release

0.1.0 Oct 15, 2022

#886 in Machine learning

MIT license

105KB
2.5K SLoC

Your one stop CLI for ONNX model analysis.

Featuring graph visualization, FLOP counts, memory metrics and more!

GitHub crates.io GitHub release

⚡️ Quick start

First, download and install DOT. Installation can be done via cargo:

cargo install steelix

MacOS users can also install via HomeBrew:

brew tap FL33TW00D/steelix
brew install steelix

⚙️ Commands & Options

Steelix has 2 core functions - model summarization & model visualization.

summary

CLI command to summarize the core aspects of your model.

steelix summary --model-path ./my-model.onnx
Option Description Type Default Required?
--model-path Path at which your model is located. bool false No

plot

CLI command to plot your model as an SVG file - complete with inferred shapes.

steelix plot --model-path ./my-model.onnx --open 
Option Description Type Default Required?
--model-path Path at which your model is located. string None Yes
--output-path Path at which your SVG will be saved. string ./model.svg No
--open Open SVG in browser once generated. boolean false No
--disable-shapes Disable shape inference. boolean false No

Supported Operators (ref ONNX IR)

Operator Implemented
Abs
Acos
Acosh
Add
And
ArgMax
ArgMin
Asin
Asinh
Atan
Atanh
AveragePool
BatchNormalization
BitShift
Cast
Ceil
Clip
Compress
Concat
ConcatFromSequence
Constant
ConstantOfShape
Conv
ConvInteger
ConvTranspose
Cos
Cosh
CumSum
DepthToSpace
DequantizeLinear
Det
Div
Dropout
Einsum
Elu
Equal
Erf
Exp
Expand
EyeLike
Flatten
Floor
GRU
Gather
GatherElements
GatherND
Gemm
GlobalAveragePool
GlobalLpPool
GlobalMaxPool
Greater
GridSample
HardSigmoid
Hardmax
Identity
If
InstanceNormalization
IsInf
IsNaN
LRN
LSTM
LeakyRelu
Less
Log
Loop
LpNormalization
LpPool
MatMul
MatMulInteger
Max
MaxPool
MaxRoiPool
MaxUnpool
Mean
Min
Mod
Mul
Multinomial
Neg
NonMaxSuppression
NonZero
Not
OneHot
Optional
OptionalGetElement
OptionalHasElement
Or
PRelu
Pad ✅ (mode=constant, pads>=0)
Pow
QLinearConv
QLinearMatMul
QuantizeLinear
RNN
RandomNormal
RandomNormalLike
RandomUniform
RandomUniformLike
Reciprocal
ReduceL1
ReduceL2
ReduceLogSum
ReduceLogSumExp
ReduceMax
ReduceMean
ReduceMin
ReduceProd
ReduceSum
ReduceSumSquare
Relu
Reshape
Resize
ReverseSequence
RoiAlign
Round
Scan
Scatter (deprecated)
ScatterElements
ScatterND
Selu
SequenceAt
SequenceConstruct
SequenceEmpty
SequenceErase
SequenceInsert
SequenceLength
Shape
Shrink
Sigmoid
Sign
Sin
Sinh
Size
Slice
Softplus
Softsign
SpaceToDepth
Split
SplitToSequence
Sqrt
Squeeze
StringNormalizer
Sub
Sum
Tan
Tanh
TfIdfVectorizer
ThresholdedRelu
Tile
TopK
Transpose
Trilu
Unique
Unsqueeze
Upsample (deprecated)
Where
Xor
Function
Bernoulli
CastLike
Celu
DynamicQuantizeLinear
GreaterOrEqual
HardSwish
LessOrEqual
LogSoftmax
MeanVarianceNormalization
NegativeLogLikelihoodLoss
Range
Softmax
SoftmaxCrossEntropyLoss

Credit

Most of the good ideas/code in this project are heavily inspired by tract, wonnx or netron.

Dependencies

~13–23MB
~376K SLoC