2.3K Star 8.1K Fork 4.3K

GVPMindSpore / mindspore

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ops.fbs 19.04 KB
一键复制 编辑 原始数据 按行查看 历史
徐安越 提交于 2024-02-05 11:03 . dynamic-quant adjust
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339
/**
* Copyright 2019-2021 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
include "ops_types.fbs";
namespace mindspore.schema;
union PrimitiveType {
Abs,
Activation,
ActivationGrad,
Adam,
AddFusion,
AdderFusion,
AddGrad,
AddN,
All,
ApplyMomentum,
ArgMaxFusion,
ArgMinFusion,
Assert,
Assign,
AssignAdd,
AudioSpectrogram,
AvgPoolFusion,
AvgPoolGrad,
BatchNorm,
BatchNormGrad,
BatchToSpace,
BatchToSpaceND,
BiasAdd,
BinaryCrossEntropy,
BinaryCrossEntropyGrad,
BiasAddGrad,
BroadcastTo,
Cast,
Ceil,
Clip,
Concat,
Attention,
Conv2DBackpropFilterFusion,
Conv2DBackpropInputFusion,
Conv2DFusion,
Conv2dTransposeFusion,
Cos,
ConstantOfShape,
Crop,
CustomExtractFeatures,
CustomNormalize,
CustomPredict,
DeConv2DGradFilter,
Depend,
DepthToSpace,
DetectionPostProcess,
DivFusion,
DivGrad,
Dropout,
DropoutGrad,
Elu,
Eltwise,
Equal,
EmbeddingLookupFusion,
ExpFusion,
ExpandDims,
FakeQuantWithMinMaxVars,
FakeQuantWithMinMaxVarsPerChannel,
FftReal,
FftImag,
Flatten,
FlattenGrad,
Floor,
FloorDiv,
FloorMod,
Fill,
FullConnection,
FusedBatchNorm,
Gather,
GatherNd,
Greater,
GreaterEqual,
HashtableLookup,
InstanceNorm,
LayerNormFusion,
LeakyRelu,
Less,
LessEqual,
Log,
LogGrad,
LogicalAnd,
LogicalNot,
LogicalOr,
LpNormalization,
LRN,
LshProjection,
LSTM,
L2NormalizeFusion,
MatMulFusion,
Maximum,
MaximumGrad,
MaxPoolFusion,
MaxPoolGrad,
SwitchLayer,
Mfcc,
Minimum,
MinimumGrad,
Mod,
MulFusion,
MulGrad,
Neg,
NegGrad,
NotEqual,
NonMaxSuppression,
OneHot,
OnesLike,
PadFusion,
PartialFusion,
PowerGrad,
PowFusion,
PriorBox,
PReLUFusion,
QuantDTypeCast,
Rank,
Range,
Reciprocal,
RealDiv,
ReduceFusion,
Reshape,
Resize,
ReverseSequence,
ReverseV2,
Rfft,
ROIPooling,
Round,
Rsqrt,
ScaleFusion,
ScatterNd,
SGD,
Shape,
SigmoidCrossEntropyWithLogits,
SigmoidCrossEntropyWithLogitsGrad,
Sin,
SkipGram,
SliceFusion,
SmoothL1Loss,
SmoothL1LossGrad,
Softmax,
SoftmaxCrossEntropyWithLogits,
SpaceToBatch,
SpaceToBatchND,
SpaceToDepth,
SparseSoftmaxCrossEntropyWithLogits,
SparseToDense,
Split,
Sqrt,
Squeeze,
Square,
SquaredDifference,
Stack,
StridedSlice,
SubFusion,
SubGrad,
Switch,
TensorListFromTensor,
TensorListGetItem,
TensorListReserve,
TensorListSetItem,
TensorListStack,
TileFusion,
TopKFusion,
Transpose,
Unique,
UnsortedSegmentSum,
Unsqueeze,
Unstack,
LSTMGrad,
Where,
ZerosLike,
Select,
ScatterNdUpdate,
GRU,
NonZero,
InvertPermutation,
Size,
RandomStandardNormal,
CropAndResize,
Erf,
StridedSliceGrad,
IsFinite,
LinSpace,
UniformReal,
AbsGrad,
RsqrtGrad,
SqrtGrad,
LayerNormGrad,
ResizeGrad,
Splice,
LogSoftmax,
Call,
Custom,
CumSum,
SplitWithOverlap,
GenOP,
RaggedRange,
GLU,
TensorArray,
TensorArrayRead,
TensorArrayWrite,
Affine,
AllGather,
ReduceScatter,
DynamicQuant,
LSTMGradData,
LSTMGradWeight,
RandomNormal,
NLLLoss,
NLLLossGrad,
FormatTranspose,
GatherD,
GroupNormFusion,
Log1p,
TensorScatterAdd,
SparseFillEmptyRows,
SparseReshape,
SparseSegmentSum,
ScatterElements,
Triu,
Tril,
AdamWeightDecay,
FillV2,
}
table Abs {
}
table Activation {
activation_type: ActivationType = 0;
alpha: float;
min_val: float;
max_val: float;
approximate: bool = false;
}
table ActivationGrad {
activation_type: ActivationType;
alpha: float;
}
table Adam {
use_locking: bool;
use_nesterov: bool;
}
table AddFusion {
activation_type: ActivationType = 0;
}
table AdderFusion {
format: Format = 0;
kernel_size: [long];
stride: [long];
dilation: [long];
pad_mode: PadMode;
pad_list: [long];
group: long;
in_channel: long;
out_channel: long;
activation_type: ActivationType = 0;
}
table AddGrad {
}
table AddN {
}
table All {
keep_dims: long;
}
table ApplyMomentum {
use_nesterov: bool;
use_locking: bool;
gradient_scale: float;
}
table ArgMaxFusion {
axis: long;
top_k: long = 1;
keep_dims: bool;
out_max_value: bool;
}
table ArgMinFusion {
axis: long;
top_k: long;
keep_dims: bool;
out_max_value: bool;
}
table Assert {
summarize: long;
}
table Assign {
}
table AssignAdd {
}
table AudioSpectrogram {
window_size: long;
stride: long;
mag_square: bool;
}
table AvgPoolFusion {
kernel_size: [long];
strides: [long];
pad: [long];
pad_mode: PadMode;
round_mode: RoundMode;
format: Format;
global: bool;
activation_type: ActivationType = 0;
}
table AvgPoolGrad {
kernel_size: [long];
strides: [long];
pad_mode: PadMode;
format: Format;
}
table BatchNorm {
epsilon: float;
format: Format;
is_training: bool;
}
table BatchNormGrad {
epsilon: float;
is_training: bool;
}
table BatchToSpace {
block_size: [long];
crops: Vec2D;
}
table BatchToSpaceND {
block_shape: [long];
crops: Vec2D;
}
table BiasAdd {
format: Format;
}
table BinaryCrossEntropy {
reduction: Reduction;
}
table BinaryCrossEntropyGrad {
reduction: Reduction = 1;
}
table BiasAddGrad {
}
table BroadcastTo {
shape: [long];
}
table Cast {
}
table Ceil {
}
table Clip {
max: float;
min: float;
}
table Concat {
axis: long;
}
table Attention {
head_num: long;
head_size: long;
cross: bool;
scale: float;
}
table Conv2DBackpropFilterFusion {
format: Format = 0;
kernel_size: [long];
stride: [long];
dilation: [long];
pad_mode: PadMode;
pad_list: [long];
mode: long;
group: long;
in_channel: long;
out_channel: long;
activation_type: ActivationType = 0;
}
table Conv2DBackpropInputFusion {
format: Format = 0;
kernel_size: [long];
stride: [long];
dilation: [long];
pad_mode: PadMode;
pad: [long];
pad_list: [long];
mode: long;
group: long;
in_channel: long;
out_channel: long;
activation_type: ActivationType = 0;
}
table Conv2DFusion {
format: Format = 0;
kernel_size: [long];
stride: [long];
dilation: [long];
pad_mode: PadMode;
pad_list: [long];
mode: long;
group: long;
in_channel: long;
out_channel: long;
activation_type: ActivationType = 0;
}
table Conv2dTransposeFusion {
format: Format = 0;
kernel_size: [long];
stride: [long];
dilation: [long];
pad_mode: PadMode;
pad: [long];
pad_list: [long];
mode: long;
group: long;
in_channel: long;
out_channel: long;
activation_type: ActivationType = 0;
output_paddings: [long];
}
table Cos {
}
table ConstantOfShape {
data_type: long;
value: [float];
}
table Crop {
axis: long;
offsets: [long];
}
table CustomExtractFeatures {
}
table CustomNormalize {
}
table CustomPredict {
output_num: long;
weight_threshold: float;
}
table DeConv2DGradFilter {
in_channel: long;
out_channel: long;
kernel_size: [long];
pad_mode: PadMode;
pad_list: [long];
stride: [long];
dilation: [long];
group: long;
format: Format;
activation_type: ActivationType;
}
table Depend {
}
table DepthToSpace {
block_size: long;
format: Format = 0;
mode: string;
}
table DetectionPostProcess {
format: Format = 0;
input_size: long;
scale: [float];
nms_iou_threshold: float;
nms_score_threshold: float;
max_detections: long;
detections_per_class: long;
max_classes_per_detection: long;
num_classes: long;
use_regular_nms: bool;
out_quantized: bool;
}
table DivFusion {
activation_type: ActivationType = 0;
}
table DivGrad {
}
table Dropout {
keep_prob: float = 0.5;
}
table DropoutGrad {
keep_prob: float;
}
table Elu {
alpha: float;
}
table Eltwise {
mode: EltwiseMode;
}
table Equal {
}
table EmbeddingLookupFusion {
max_norm: float;
}
table ExpFusion {
base: float = -1;
scale: float = 1.0;
shift: float = 0.0;
}
table ExpandDims {
}
table FakeQuantWithMinMaxVars {
num_bits: long;
narrow_range: bool;
}
table FakeQuantWithMinMaxVarsPerChannel {
num_bits: long;
narrow_range: bool;
}
table FftReal {
}
table FftImag {
}
table Flatten {
axis: long = 1;
}
table FlattenGrad {
}
table Floor {
}
table FloorDiv {
}
table FloorMod {
}
table Fill {
}
table FullConnection {
has_bias: bool;
use_axis: bool;
axis: long;
activation_type: ActivationType = 0;
}
table FusedBatchNorm {
epsilon: float = 0.0001;
momentum: float = 0.9;
mode: long;
}
table Gather {
}
table GatherNd {
}
table Greater {
}
table GreaterEqual {
}
table HashtableLookup {
}
table InstanceNorm {
epsilon: float;
}
table LayerNormFusion {
begin_norm_axis: long;
epsilon: float = 0.00001;
elementwise_affine: bool;
begin_params_axis: long;
}
table LeakyRelu {
negative_slope: float;
}
table Less {
}
table LessEqual {
}
table Log {
}
table LogGrad {
}
table LogicalAnd {
}
table LogicalNot {
}
table LogicalOr {
}
table LpNormalization {
axis: long;
p: long;
}
table LRN {
depth_radius: long;
bias: float;
alpha: float;
beta: float;
norm_region: string;
}
table LshProjection {
type: LshProjectionType;
}
table LSTM {
bidirectional: bool;
has_bias: bool;
input_size: long;
hidden_size: long;
num_layers: long;
num_directions: long;
dropout: float;
zoneout_cell: float = 0;
zoneout_hidden: float = 0;
proj_size: long = 0;
}
table LSTMGrad {
bidirectional: bool;
has_bias: bool;
input_size: long;
hidden_size: long;
num_layers: long;
num_directions: long;
dropout: float;
zoneout_cell: float = 0;
zoneout_hidden: float = 0;
}
table L2NormalizeFusion {
axis: [long];
epsilon: float;
activation_type: ActivationType = 0;
}
table MatMulFusion {
transpose_a: bool = false;
transpose_b: bool = false;
activation_type: ActivationType = 0;
}
table Maximum {
}
table MaximumGrad {
grad_x: bool;
grad_y: bool;
}
table MaxPoolFusion {
kernel_size: [long];
strides: [long];
pad: [long];
pad_mode: PadMode;
round_mode: RoundMode;
format: Format;
global: bool;
activation_type: ActivationType = 0;
}
table MaxPoolGrad {
kernel_size: [long];
strides: [long];
pad_mode: PadMode;
format: Format;
}
table SwitchLayer {
}
table Mfcc {
freq_upper_limit: float;
freq_lower_limit: float;
filter_bank_channel_num: long;
dct_coeff_num: long;
}
table Minimum {
}
table MinimumGrad {
grad_x: bool;
grad_y: bool;
}
table Mod {
}
table MulFusion {
activation_type: ActivationType = 0;
}
table MulGrad {
}
table Neg {
}
table NegGrad {
}
table NotEqual {
}
table NonMaxSuppression {
center_point_box: long;
}
table OneHot {
axis: long;
}
table OnesLike {
}
table PadFusion {
paddings: Vec2D;
padding_mode: PaddingMode;
constant_value: float;
}
table PartialFusion {
sub_graph_index: long;
}
table PowerGrad {
power: float;
scale: float;
shift: float;
}
table PowFusion {
scale: float = 1;
shift: float = 0;
}
table PriorBox {
min_sizes: [long];
max_sizes: [long];
aspect_ratios: [float];
variances: [float];
image_size_w: long;
image_size_h: long;
step_w: float;
step_h: float;
clip: bool;
flip: bool;
offset: float;
}
table PReLUFusion {
channel_shared: bool;
}
table Rank {
}
table Range {
d_type: long = 0;
start: long = 0;
limit: long = 0;
delta: long = 1;
}
table Reciprocal {
}
table RealDiv {
}
table ReduceFusion {
keep_dims: bool;
mode: ReduceMode;
reduce_to_end: bool;
coeff: float;
}
table Reshape {
}
table Resize {
format: Format = 0;
method: ResizeMethod;
new_height: long;
new_width: long;
preserve_aspect_ratio: bool = false;
coordinate_transform_mode: CoordinateTransformMode;
cubic_coeff: float;
exclude_outside: long;
extrapolation_value: float;
nearest_mode: NearestMode;
}
table ReverseSequence {
seq_dim: long;
batch_dim: long;
}
table ReverseV2 {
axis: [long];
}
table Rfft {
fft_length: long;
}
table ROIPooling {
pooled_h: long;
pooled_w: long;
scale: float;
}
table Round {
}
table Rsqrt {
}
table QuantDTypeCast {
src_t: long;
dst_t: long;
axis: long = 0;
}
table ScaleFusion {
axis: long;
activation_type: ActivationType = 0;
}
table ScatterNd {
}
table SGD {
nesterov: bool;
dampening: float;
weight_decay: float;
}
table Shape {
}
table SigmoidCrossEntropyWithLogits {
}
table SigmoidCrossEntropyWithLogitsGrad {
}
table Sin {
}
table SkipGram {
include_all_grams: bool;
max_skip_size: long;
ngram_size: long;
}
table SliceFusion {
axes: [long];
}
table SmoothL1Loss {
beta: float;
}
table SmoothL1LossGrad {
beta: float;
}
table Softmax {
axis: [long];
}
table SoftmaxCrossEntropyWithLogits {
}
table SpaceToBatch {
block_size: [long];
paddings: Vec2D;
}
table SpaceToBatchND {
block_shape: [long];
paddings: Vec2D;
}
table SpaceToDepth {
block_size: long;
format: Format;
}
table SparseSoftmaxCrossEntropyWithLogits {
is_grad: bool;
}
table SparseToDense {
}
table Split {
output_num: long;
size_splits: [long];
axis: long;
}
table Sqrt {
}
table Squeeze {
axis: [long];
}
table Square {
}
table SquaredDifference {
}
table Stack {
axis: long;
}
table StridedSlice {
begin_mask: long;
end_mask: long;
ellipsis_mask: long;
new_axis_mask: long;
shrink_axis_mask: long;
}
table SubFusion {
activation_type: ActivationType = 0;
}
table SubGrad {
}
table Switch {
}
table TensorListFromTensor {
element_dtype: long;
shape_type: long;
}
table TensorListGetItem {
element_dtype: long;
}
table TensorListReserve {
element_dtype: long;
shape_type: long;
}
table TensorListSetItem {
element_dtype: long;
}
table TensorListStack {
num_elements: long;
element_dtype: long;
}
table TileFusion {
dims: [long];
}
table TopKFusion {
sorted: bool = true;
axis: long;
largest: long;
}
table Transpose {
}
table Unique {
}
table UnsortedSegmentSum {
}
table Unsqueeze {
axis: [long];
}
table Unstack {
axis: long = 0;
}
table Where {
}
table ZerosLike {
}
table Select {
}
table GRU {
bidirectional: bool = false;
}
table NonZero {
}
table InvertPermutation {
}
table Size {
}
table RandomStandardNormal {
seed: long;
seed2: long;
}
table CropAndResize {
method: ResizeMethod;
extrapolation_value: float;
}
table Erf {
}
table StridedSliceGrad {
begin_mask: long;
end_mask: long;
ellipsis_mask: long;
new_axis_mask: long;
shrink_axis_mask: long;
}
table IsFinite {
}
table LinSpace {
}
table UniformReal {
seed: long;
seed2: long;
}
table AbsGrad {
}
table RsqrtGrad {
}
table SqrtGrad {
}
table LayerNormGrad {
begin_norm_axis: long;
begin_params_axis: long;
}
table ResizeGrad {
method: ResizeMethod;
align_corners: bool;
}
table Splice {
context: [long];
forward_indexes: [long];
output_dim: long;
}
table LogSoftmax {
axis: long;
}
table Call {
is_tail_call: bool = true;
}
table CumSum {
exclusive: bool;
reverse: bool;
}
table Custom {
type: string;
attr: [Attribute];
}
table SplitWithOverlap {
split_dim: long;
number_split: long;
ratio: [long];
extend_top: [long];
extend_bottom: [long];
}
table GenOP {
activation_type: ActivationType = 0;
alpha: float;
min_val: float;
max_val: float;
is_training: bool;
format: Format = 0;
kernel_size: [long];
stride: [long];
dilation: [long];
pad_mode: PadMode;
pad_list: [long];
mode: long;
group: long;
in_channel: long;
out_channel: long;
eltwise_mode: EltwiseMode;
has_bias: bool;
use_axis: bool;
axis: long;
epsilon: float = 0.0001;
momentum: float = 0.9;
transpose_a: bool = false;
transpose_b: bool = false;
pad: [long];
round_mode: RoundMode;
global: bool;
channel_shared: bool;
axes: [long];
keep_dims: bool;
reduce_mode: ReduceMode;
reduce_to_end: bool;
coeff: float;
}
table RaggedRange {
}
table GLU {
axis: long = -1;
}
table TensorArray {
dynamic_size: bool = false;
identical_element_shapes: bool = false;
element_shape: [int];
data_type: int;
}
table TensorArrayRead {
}
table TensorArrayWrite {
}
table Affine {
context: [long];
output_dim: long;
activation_type: ActivationType = 0;
transpose_a: bool = false;
transpose_b: bool = false;
}
table ScatterNdUpdate {
}
table AllGather {
group: string;
rank_size: int;
}
table ReduceScatter {
group: string;
mode: ReduceMode;
rank_size: int;
}
table DynamicQuant {
symmetric: bool = false;
dst_type: long = 32;
activation_channel: bool = false;
prefer_axis: long = 0;
transpose: bool = false;
prefer_axes: [int];
}
table LSTMGradData {
bidirectional: bool;
has_bias: bool;
input_size: long;
hidden_size: long;
num_layers: long;
num_directions: long;
dropout: float;
zoneout_cell: float = 0;
zoneout_hidden: float = 0;
}
table LSTMGradWeight {
bidirectional: bool;
has_bias: bool;
input_size: long;
hidden_size: long;
num_layers: long;
num_directions: long;
dropout: float;
zoneout_cell: float = 0;
zoneout_hidden: float = 0;
}
table RandomNormal {
seed: float;
mean: float;
scale: float;
}
table NLLLoss {
reduction: Reduction;
}
table NLLLossGrad {
reduction: Reduction;
}
table FormatTranspose {
src_format: Format = 1;
dst_format: Format = 1;
}
table GatherD {
}
table GroupNormFusion {
num_groups: long;
epsilon: float = 1e-5;
affine: bool = true;
}
table Log1p {
}
table TensorScatterAdd {
}
table SparseFillEmptyRows {
}
table SparseReshape {
}
table SparseSegmentSum {
}
table ScatterElements {
axis: long;
}
table Triu {
}
table Tril {
}
table AdamWeightDecay {
use_locking: bool;
}
table FillV2 {
}
Python
1
https://gitee.com/mindspore/mindspore.git
git@gitee.com:mindspore/mindspore.git
mindspore
mindspore
mindspore
master

搜索帮助