diff --git a/contrib/codegen-tools/libnd4j-gen/op-ir.proto b/contrib/codegen-tools/libnd4j-gen/op-ir.proto index 6fca00ef5..0982d23b2 100644 --- a/contrib/codegen-tools/libnd4j-gen/op-ir.proto +++ b/contrib/codegen-tools/libnd4j-gen/op-ir.proto @@ -1,34 +1,17 @@ opList { name: "Assert" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: OP_IMPL } opList { name: "BinaryMinimalRelativeError" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "thresholdRelative" argType: DOUBLE @@ -38,10 +21,10 @@ opList { argType: DOUBLE argIndex: 1 } - opDeclarationType: LEGACY_XYZ -} -opList { - name: "BinaryRelativeError" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -55,30 +38,39 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } + opDeclarationType: LEGACY_XYZ +} +opList { + name: "BinaryRelativeError" argDescriptor { name: "threshold" argType: DOUBLE } - opDeclarationType: LEGACY_XYZ -} -opList { - name: "ClipByValue" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } + argDescriptor { + name: "y" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } + opDeclarationType: LEGACY_XYZ +} +opList { + name: "ClipByValue" argDescriptor { name: "clipValueMin" argType: DOUBLE @@ -88,6 +80,18 @@ opList { argType: DOUBLE argIndex: 1 } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } } opList { name: "Conditional" @@ -106,26 +110,26 @@ opList { } opList { name: "Floor" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: OP_IMPL } opList { name: "Log1p" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: OP_IMPL } opList { @@ -137,6 +141,10 @@ opList { } opList { name: "Pow" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -146,14 +154,23 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "Pow_bp" + argDescriptor { + name: "dLdx" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "dLdy" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -182,22 +199,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "dLdx" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dLdy" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "inPlace" - argType: BOOL - } } opList { name: "Reciprocal" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -206,14 +214,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "RelativeError" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -227,14 +239,6 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { @@ -255,6 +259,10 @@ opList { } opList { name: "Switch" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -264,14 +272,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: DIVERGENT_OP_IMPL } opList { name: "Where" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "condition" argType: INPUT_TENSOR @@ -290,33 +298,37 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "While" argDescriptor { - name: "frameName" - argType: STRING + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { - name: "condition" - argType: INPUT_TENSOR + name: "frameName" + argType: STRING } argDescriptor { name: "isConstant" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "condition" + argType: INPUT_TENSOR } opDeclarationType: LOGIC_OP_IMPL } opList { name: "_geluderivative" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -325,18 +337,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "_mishderivative" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -350,45 +362,33 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "_powderivative" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "inPlace" - argType: BOOL + name: "pow" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "pow" - argType: DOUBLE + name: "inPlace" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "_precise_geluderivative" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" @@ -400,13 +400,25 @@ opList { argIndex: 1 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE } opDeclarationType: LEGACY_XYZ } opList { name: "_sigmoidderivative" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -420,18 +432,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "_swishderivative" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -445,18 +457,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "_tanhderivative" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -465,18 +477,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "abs" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -485,18 +497,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "absolute_difference_loss" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -511,39 +519,17 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "reductionMode" argType: INT64 } -} -opList { - name: "absolute_difference_loss_grad" - argDescriptor { - name: "predictions" - argType: INPUT_TENSOR - } - argDescriptor { - name: "weights" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "labels" - argType: INPUT_TENSOR - argIndex: 2 - } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "absolute_difference_loss_grad" argDescriptor { name: "dLdp" argType: OUTPUT_TENSOR @@ -558,13 +544,39 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "predictions" + argType: INPUT_TENSOR + } + argDescriptor { + name: "weights" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "labels" + argType: INPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "acos" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -573,18 +585,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "acosh" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -593,18 +605,33 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "ada_delta_updater" + argDescriptor { + name: "dRho" + argType: DOUBLE + } + argDescriptor { + name: "dEpsilon" + argType: DOUBLE + argIndex: 1 + } + argDescriptor { + name: "update" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "stateMsg" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "stateMsdx" + argType: OUTPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "gradient" argType: INPUT_TENSOR @@ -634,22 +661,12 @@ opList { argType: INPUT_TENSOR argIndex: 5 } + opDeclarationType: CONFIGURABLE_OP_IMPL +} +opList { + name: "ada_grad_updater" argDescriptor { - name: "update" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "stateMsg" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "stateMsdx" - argType: OUTPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "dRho" + name: "dLr" argType: DOUBLE } argDescriptor { @@ -657,10 +674,15 @@ opList { argType: DOUBLE argIndex: 1 } - opDeclarationType: CONFIGURABLE_OP_IMPL -} -opList { - name: "ada_grad_updater" + argDescriptor { + name: "update" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "stateH" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "gradient" argType: INPUT_TENSOR @@ -680,28 +702,43 @@ opList { argType: INPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "update" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "stateH" - argType: OUTPUT_TENSOR - argIndex: 1 - } + opDeclarationType: CONFIGURABLE_OP_IMPL +} +opList { + name: "ada_max_updater" argDescriptor { name: "dLr" argType: DOUBLE } argDescriptor { - name: "dEpsilon" + name: "dBeta1" argType: DOUBLE argIndex: 1 } - opDeclarationType: CONFIGURABLE_OP_IMPL -} -opList { - name: "ada_max_updater" + argDescriptor { + name: "dBeta2" + argType: DOUBLE + argIndex: 2 + } + argDescriptor { + name: "dEpsilon" + argType: DOUBLE + argIndex: 3 + } + argDescriptor { + name: "update" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "stateU" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "stateM" + argType: OUTPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "gradient" argType: INPUT_TENSOR @@ -736,39 +773,6 @@ opList { argType: INPUT_TENSOR argIndex: 6 } - argDescriptor { - name: "update" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "stateU" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "stateM" - argType: OUTPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "dLr" - argType: DOUBLE - } - argDescriptor { - name: "dBeta1" - argType: DOUBLE - argIndex: 1 - } - argDescriptor { - name: "dBeta2" - argType: DOUBLE - argIndex: 2 - } - argDescriptor { - name: "dEpsilon" - argType: DOUBLE - argIndex: 3 - } argDescriptor { name: "iteration" argType: INT64 @@ -777,6 +781,39 @@ opList { } opList { name: "adam_updater" + argDescriptor { + name: "dLr" + argType: DOUBLE + } + argDescriptor { + name: "dBeta1" + argType: DOUBLE + argIndex: 1 + } + argDescriptor { + name: "dBeta2" + argType: DOUBLE + argIndex: 2 + } + argDescriptor { + name: "dEpsilon" + argType: DOUBLE + argIndex: 3 + } + argDescriptor { + name: "update" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "stateU" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "stateM" + argType: OUTPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "gradient" argType: INPUT_TENSOR @@ -811,39 +848,6 @@ opList { argType: INPUT_TENSOR argIndex: 6 } - argDescriptor { - name: "update" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "stateU" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "stateM" - argType: OUTPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "dLr" - argType: DOUBLE - } - argDescriptor { - name: "dBeta1" - argType: DOUBLE - argIndex: 1 - } - argDescriptor { - name: "dBeta2" - argType: DOUBLE - argIndex: 2 - } - argDescriptor { - name: "dEpsilon" - argType: DOUBLE - argIndex: 3 - } argDescriptor { name: "iteration" argType: INT64 @@ -852,6 +856,14 @@ opList { } opList { name: "add" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -865,18 +877,23 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "add_bp" + argDescriptor { + name: "gradX" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradY" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -895,38 +912,29 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradX" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradY" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "inPlace" - argType: BOOL - } } opList { name: "add_scalar" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "adjust_contrast" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -936,14 +944,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "adjust_contrast_v2" + argDescriptor { + name: "factor" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -953,18 +965,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "factor" - argType: DOUBLE - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "adjust_hue" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -974,14 +982,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "delta" - argType: DOUBLE - } argDescriptor { name: "dimC" argType: INT64 @@ -990,6 +990,14 @@ opList { } opList { name: "adjust_saturation" + argDescriptor { + name: "factor" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -999,10 +1007,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimC" argType: INT64 @@ -1012,16 +1016,21 @@ opList { opList { name: "all" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -1031,14 +1040,6 @@ opList { } opList { name: "alpha_dropout" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "a" argType: DOUBLE @@ -1058,28 +1059,18 @@ opList { argType: DOUBLE argIndex: 3 } - opDeclarationType: LEGACY_XYZ -} -opList { - name: "alpha_dropout_bp" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "gradOut" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "reduceShape" - argType: INPUT_TENSOR - argIndex: 2 - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + opDeclarationType: LEGACY_XYZ +} +opList { + name: "alpha_dropout_bp" argDescriptor { name: "probValue" argType: DOUBLE @@ -1099,6 +1090,24 @@ opList { argType: DOUBLE argIndex: 3 } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "gradOut" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "reduceShape" + argType: INPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "seed" argType: INT64 @@ -1108,21 +1117,21 @@ opList { opList { name: "amax" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -1132,6 +1141,10 @@ opList { } opList { name: "amax_pairwise" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1145,30 +1158,26 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "amean" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -1179,21 +1188,21 @@ opList { opList { name: "amin" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -1203,6 +1212,10 @@ opList { } opList { name: "amin_pairwise" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1216,14 +1229,48 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "ams_grad_updater" + argDescriptor { + name: "dLr" + argType: DOUBLE + } + argDescriptor { + name: "dBeta1" + argType: DOUBLE + argIndex: 1 + } + argDescriptor { + name: "dBeta2" + argType: DOUBLE + argIndex: 2 + } + argDescriptor { + name: "dEpsilon" + argType: DOUBLE + argIndex: 3 + } + argDescriptor { + name: "update" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "stateV" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "stateM" + argType: OUTPUT_TENSOR + argIndex: 2 + } + argDescriptor { + name: "stateH" + argType: OUTPUT_TENSOR + argIndex: 3 + } argDescriptor { name: "gradient" argType: INPUT_TENSOR @@ -1263,44 +1310,6 @@ opList { argType: INPUT_TENSOR argIndex: 7 } - argDescriptor { - name: "update" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "stateV" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "stateM" - argType: OUTPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "stateH" - argType: OUTPUT_TENSOR - argIndex: 3 - } - argDescriptor { - name: "dLr" - argType: DOUBLE - } - argDescriptor { - name: "dBeta1" - argType: DOUBLE - argIndex: 1 - } - argDescriptor { - name: "dBeta2" - argType: DOUBLE - argIndex: 2 - } - argDescriptor { - name: "dEpsilon" - argType: DOUBLE - argIndex: 3 - } argDescriptor { name: "iteration" argType: INT64 @@ -1310,57 +1319,61 @@ opList { opList { name: "and" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "comparable" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "comparable" - argType: DOUBLE - } - opDeclarationType: LEGACY_XYZ -} -opList { - name: "and_scalar" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "inPlace" argType: BOOL } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } + opDeclarationType: LEGACY_XYZ +} +opList { + name: "and_scalar" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: LEGACY_XYZ } opList { name: "any" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -1370,6 +1383,14 @@ opList { } opList { name: "apply_sgd" + argDescriptor { + name: "lr" + argType: DOUBLE + } + argDescriptor { + name: "Z" + argType: OUTPUT_TENSOR + } argDescriptor { name: "parameters" argType: INPUT_TENSOR @@ -1384,14 +1405,6 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "Z" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "lr" - argType: DOUBLE - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { @@ -1403,6 +1416,14 @@ opList { } opList { name: "argamax" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1412,25 +1433,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "keepDims" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "argamin" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1440,25 +1461,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "keepDims" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "argmax" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1468,25 +1489,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "keepDims" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "argmin" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1496,25 +1517,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dimensions" + argType: INT64 + } argDescriptor { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "keepDims" - argType: BOOL - } +} +opList { + name: "asin" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dimensions" - argType: INT64 + name: "inPlace" + argType: BOOL } -} -opList { - name: "asin" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1523,18 +1544,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "asinh" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1543,18 +1564,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "assign" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1564,14 +1581,19 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "assign_bp" + argDescriptor { + name: "gradX" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradY" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1590,34 +1612,25 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradX" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradY" - argType: OUTPUT_TENSOR - argIndex: 1 - } } opList { name: "asum" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -1628,25 +1641,33 @@ opList { opList { name: "atan" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE } opDeclarationType: LEGACY_XYZ } opList { name: "atanh" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1655,18 +1676,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "avgpool2d" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1675,10 +1692,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kH" argType: INT64 @@ -1736,6 +1749,10 @@ opList { } opList { name: "avgpool2d_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1749,10 +1766,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kH" argType: INT64 @@ -1810,6 +1823,10 @@ opList { } opList { name: "avgpool3dnew" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1818,10 +1835,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kD" argType: INT64 @@ -1899,6 +1912,10 @@ opList { } opList { name: "avgpool3dnew_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1912,10 +1929,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kD" argType: INT64 @@ -1993,6 +2006,14 @@ opList { } opList { name: "axpy" + argDescriptor { + name: "a" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2007,26 +2028,22 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "a" - argType: DOUBLE - } argDescriptor { name: "n" argType: INT64 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "barnes_edge_forces" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "rowP" argType: INPUT_TENSOR @@ -2046,21 +2063,21 @@ opList { argType: INPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "N" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "barnes_gains" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2075,14 +2092,24 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "barnes_symmetrized" + argDescriptor { + name: "outputRows" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "outputCols" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "outputVals" + argType: OUTPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "rowP" argType: INPUT_TENSOR @@ -2102,31 +2129,21 @@ opList { argType: INPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputRows" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "outputCols" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "outputVals" - argType: OUTPUT_TENSOR - argIndex: 2 - } argDescriptor { name: "N" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "batch_to_space" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2136,14 +2153,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "blockSize" argType: INT64 @@ -2158,9 +2167,21 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "batch_to_space_nd" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2175,25 +2196,30 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "blocks" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "batched_gemm" + argDescriptor { + name: "vC" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "transposeA" + argType: BOOL + } + argDescriptor { + name: "transposeB" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "alpha" argType: INPUT_TENSOR @@ -2213,23 +2239,6 @@ opList { argType: INPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "vC" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "transposeA" - argType: BOOL - } - argDescriptor { - name: "transposeB" - argType: BOOL - argIndex: 1 - } argDescriptor { name: "transA" argType: INT64 @@ -2274,31 +2283,16 @@ opList { argType: INT64 argIndex: 8 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "batchnorm" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "mean" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "variance" - argType: INPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "gamma" - argType: INPUT_TENSOR - argIndex: 3 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "epsilon" + argType: DOUBLE } argDescriptor { name: "outputs" @@ -2318,22 +2312,6 @@ opList { argType: BOOL argIndex: 2 } - argDescriptor { - name: "epsilon" - argType: DOUBLE - } - argDescriptor { - name: "applyScale" - argType: INT64 - } - argDescriptor { - name: "applyOffset" - argType: INT64 - argIndex: 1 - } -} -opList { - name: "batchnorm_bp" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2353,10 +2331,26 @@ opList { argType: INPUT_TENSOR argIndex: 3 } + argDescriptor { + name: "applyScale" + argType: INT64 + } + argDescriptor { + name: "applyOffset" + argType: INT64 + argIndex: 1 + } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "batchnorm_bp" + argDescriptor { + name: "epsilon" + argType: DOUBLE + } argDescriptor { name: "dLdI" argType: OUTPUT_TENSOR @@ -2391,8 +2385,23 @@ opList { argIndex: 2 } argDescriptor { - name: "epsilon" - argType: DOUBLE + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "mean" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "variance" + argType: INPUT_TENSOR + argIndex: 2 + } + argDescriptor { + name: "gamma" + argType: INPUT_TENSOR + argIndex: 3 } argDescriptor { name: "applyScale" @@ -2403,9 +2412,17 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "betainc" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "a" argType: INPUT_TENSOR @@ -2420,14 +2437,18 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "biasadd" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "nchw" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2441,17 +2462,22 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "biasadd_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradB" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "nchw" argType: BOOL } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } -} -opList { - name: "biasadd_bp" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2470,22 +2496,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradB" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "nchw" - argType: BOOL - } } opList { name: "bincount" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "values" argType: INPUT_TENSOR @@ -2505,14 +2522,6 @@ opList { argType: INPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "outputType" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "minLength" argType: INT64 @@ -2527,33 +2536,36 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "outputType" + argType: DATA_TYPE + } } opList { name: "bitcast" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "newType" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "bits_hamming_distance" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2567,38 +2579,42 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "bitwise_and" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "y" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "bitwise_or" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2612,18 +2628,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "bitwise_xor" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2637,18 +2653,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "bool_not" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2657,14 +2669,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "boolean_and" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2674,14 +2686,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "boolean_not" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2691,14 +2703,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "boolean_or" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2708,14 +2720,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "boolean_xor" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2725,25 +2737,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "broadcast_amax" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "shape" @@ -2759,16 +2767,16 @@ opList { opList { name: "broadcast_amin" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "shape" @@ -2783,6 +2791,10 @@ opList { } opList { name: "broadcast_dynamic_shape" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2796,13 +2808,17 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "broadcast_equalto" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "broadcast_equalto" + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2812,14 +2828,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimension" argType: INT64 @@ -2829,16 +2837,16 @@ opList { opList { name: "broadcast_greaterthan" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "shape" @@ -2854,16 +2862,16 @@ opList { opList { name: "broadcast_greaterthanorequal" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "shape" @@ -2879,16 +2887,16 @@ opList { opList { name: "broadcast_lessthan" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "shape" @@ -2904,16 +2912,16 @@ opList { opList { name: "broadcast_lessthanorequal" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "shape" @@ -2929,16 +2937,16 @@ opList { opList { name: "broadcast_max" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "shape" @@ -2954,16 +2962,16 @@ opList { opList { name: "broadcast_min" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "shape" @@ -2979,16 +2987,16 @@ opList { opList { name: "broadcast_notequal" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "shape" @@ -3003,6 +3011,10 @@ opList { } opList { name: "broadcast_to" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3016,13 +3028,17 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "broadcastadd" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "broadcastadd" + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3032,14 +3048,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimension" argType: INT64 @@ -3049,16 +3057,16 @@ opList { opList { name: "broadcastcopy" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "shape" @@ -3074,16 +3082,16 @@ opList { opList { name: "broadcastdiv" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "shape" @@ -3098,6 +3106,14 @@ opList { } opList { name: "broadcastgradientargs" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3107,10 +3123,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimension" argType: INT64 @@ -3120,16 +3132,16 @@ opList { opList { name: "broadcastmul" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "shape" @@ -3145,16 +3157,16 @@ opList { opList { name: "broadcastrdiv" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "shape" @@ -3170,16 +3182,16 @@ opList { opList { name: "broadcastrsub" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "shape" @@ -3195,16 +3207,16 @@ opList { opList { name: "broadcastsub" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "shape" @@ -3219,6 +3231,24 @@ opList { } opList { name: "car" + argDescriptor { + name: "compare" + argType: DOUBLE + } + argDescriptor { + name: "set" + argType: DOUBLE + argIndex: 1 + } + argDescriptor { + name: "eps" + argType: DOUBLE + argIndex: 2 + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "to" argType: INPUT_TENSOR @@ -3228,48 +3258,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "compare" - argType: DOUBLE - } - argDescriptor { - name: "set" - argType: DOUBLE - argIndex: 1 - } - argDescriptor { - name: "eps" - argType: DOUBLE - argIndex: 2 - } argDescriptor { name: "mode" argType: INT64 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "cas" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "compare" argType: DOUBLE @@ -3284,37 +3284,62 @@ opList { argType: DOUBLE argIndex: 2 } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "mode" argType: INT64 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "cast" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "dst" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "cbow" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "trainWords" + argType: BOOL + } + argDescriptor { + name: "isInference" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "target" argType: INPUT_TENSOR @@ -3389,19 +3414,6 @@ opList { argType: INPUT_TENSOR argIndex: 14 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "trainWords" - argType: BOOL - } - argDescriptor { - name: "isInference" - argType: BOOL - argIndex: 1 - } argDescriptor { name: "numWorkers" argType: INT64 @@ -3415,6 +3427,14 @@ opList { } opList { name: "ceil" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3423,18 +3443,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "cell_contains" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "contains" + argType: BOOL + } argDescriptor { name: "corner" argType: INPUT_TENSOR @@ -3449,25 +3469,21 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "contains" - argType: BOOL - } argDescriptor { name: "dimension" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "check_numerics" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3481,13 +3497,13 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "choice" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "choice" argDescriptor { name: "source" argType: INPUT_TENSOR @@ -3497,38 +3513,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "cholesky" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: OP_IMPL } opList { name: "choose" argDescriptor { - name: "arg" - argType: INPUT_TENSOR - } - argDescriptor { - name: "comp" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "scalar" + argType: DOUBLE } argDescriptor { name: "outputs" @@ -3540,16 +3543,33 @@ opList { argIndex: 1 } argDescriptor { - name: "scalar" - argType: DOUBLE + name: "arg" + argType: INPUT_TENSOR + } + argDescriptor { + name: "comp" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "mode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "clip_by_global_norm" + argDescriptor { + name: "clipNorm" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3558,28 +3578,20 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "clipNorm" - argType: DOUBLE - } } opList { name: "clipbyavgnorm" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "clipNorm" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "clipNorm" - argType: DOUBLE + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "dimensions" @@ -3589,6 +3601,14 @@ opList { } opList { name: "clipbyavgnorm_bp" + argDescriptor { + name: "clipNorm" + argType: DOUBLE + } + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3602,28 +3622,20 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "clipNorm" - argType: DOUBLE - } } opList { name: "clipbynorm" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "clipValue" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "clipValue" - argType: DOUBLE + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "dimensions" @@ -3633,6 +3645,14 @@ opList { } opList { name: "clipbynorm_bp" + argDescriptor { + name: "clipValue" + argType: DOUBLE + } + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3642,33 +3662,17 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "clipValue" - argType: DOUBLE - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "clipbyvalue" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "left" argType: DOUBLE @@ -3678,22 +3682,34 @@ opList { argType: DOUBLE argIndex: 1 } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "clone_list" - argDescriptor { - name: "list" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "list" + argType: INPUT_TENSOR + } opDeclarationType: LIST_OP_IMPL } opList { name: "col2im" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3703,14 +3719,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "strideY" argType: INT64 @@ -3750,9 +3758,21 @@ opList { argType: INT64 argIndex: 7 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "compare_and_bitpack" + argDescriptor { + name: "threshold" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3766,17 +3786,13 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "compat_sparse_to_dense" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "threshold" - argType: DOUBLE - } -} -opList { - name: "compat_sparse_to_dense" argDescriptor { name: "indices" argType: INPUT_TENSOR @@ -3800,13 +3816,18 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "compat_string_split" + argDescriptor { + name: "indices" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "values" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3830,18 +3851,17 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "indices" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "values" - argType: OUTPUT_TENSOR - argIndex: 1 - } } opList { name: "concat" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "isDynamicAxis" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3851,25 +3871,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "isDynamicAxis" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "concatDimension" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "concat_bp" + argDescriptor { + name: "epsilonChunk" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "dynamicAxis" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3879,25 +3899,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "epsilonChunk" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dynamicAxis" - argType: BOOL - } argDescriptor { name: "concatDimension" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "confusion_matrix" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "labels" argType: INPUT_TENSOR @@ -3912,26 +3928,21 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "numClasses" - argType: INT64 - } argDescriptor { name: "dataType" argType: INT64 - argIndex: 1 + } + argDescriptor { + name: "dtype" + argType: DATA_TYPE } } opList { name: "conv1d" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3950,10 +3961,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kW" argType: INT64 @@ -3991,6 +3998,20 @@ opList { } opList { name: "conv1d_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradW" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "gradB" + argType: OUTPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4010,24 +4031,6 @@ opList { argType: INPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradW" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "gradB" - argType: OUTPUT_TENSOR - argIndex: 2 - } argDescriptor { name: "kW" argType: INT64 @@ -4062,9 +4065,17 @@ opList { argType: INT64 argIndex: 6 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "conv2d" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4083,10 +4094,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kH" argType: INT64 @@ -4144,6 +4151,20 @@ opList { } opList { name: "conv2d_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradW" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "gradB" + argType: OUTPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4167,20 +4188,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradW" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "gradB" - argType: OUTPUT_TENSOR - argIndex: 2 - } argDescriptor { name: "kH" argType: INT64 @@ -4238,6 +4245,10 @@ opList { } opList { name: "conv2d_input_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } argDescriptor { name: "gradIShape" argType: INPUT_TENSOR @@ -4256,10 +4267,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kH" argType: INT64 @@ -4317,6 +4324,10 @@ opList { } opList { name: "conv3dnew" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4335,10 +4346,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kD" argType: INT64 @@ -4416,6 +4423,20 @@ opList { } opList { name: "conv3dnew_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradW" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "gradB" + argType: OUTPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4439,20 +4460,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradW" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "gradB" - argType: OUTPUT_TENSOR - argIndex: 2 - } argDescriptor { name: "kD" argType: INT64 @@ -4530,6 +4537,14 @@ opList { } opList { name: "copy" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4543,18 +4558,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "cos" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4563,18 +4578,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "cosh" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4583,18 +4598,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "cosine_distance_loss" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -4609,14 +4620,6 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "reductionMode" argType: INT64 @@ -4626,27 +4629,13 @@ opList { argType: INT64 argIndex: 1 } -} -opList { - name: "cosine_distance_loss_grad" - argDescriptor { - name: "predictions" - argType: INPUT_TENSOR - } - argDescriptor { - name: "weights" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "labels" - argType: INPUT_TENSOR - argIndex: 2 - } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "cosine_distance_loss_grad" argDescriptor { name: "dLdp" argType: OUTPUT_TENSOR @@ -4661,6 +4650,20 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "predictions" + argType: INPUT_TENSOR + } + argDescriptor { + name: "weights" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "labels" + argType: INPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "reductionMode" argType: INT64 @@ -4670,17 +4673,16 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "cosinedistance" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" @@ -4692,8 +4694,13 @@ opList { argIndex: 1 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "y" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -4704,13 +4711,8 @@ opList { opList { name: "cosinesimilarity" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" @@ -4722,8 +4724,13 @@ opList { argIndex: 1 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "y" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -4734,16 +4741,21 @@ opList { opList { name: "countNonZero" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -4754,16 +4766,21 @@ opList { opList { name: "countZero" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -4774,20 +4791,16 @@ opList { opList { name: "create" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "outputType" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "init" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "order" @@ -4798,17 +4811,21 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "outputType" + argType: DATA_TYPE + } } opList { name: "create_list" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "height" argType: INT64 @@ -4822,6 +4839,10 @@ opList { } opList { name: "crelu" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4830,13 +4851,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "crelu_bp" + argDescriptor { + name: "epsilon" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4850,13 +4871,17 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "epsilon" - argType: OUTPUT_TENSOR - } } opList { name: "crop_and_resize" + argDescriptor { + name: "extrapolationVal" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "image" argType: INPUT_TENSOR @@ -4876,25 +4901,21 @@ opList { argType: INPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "extrapolationVal" - argType: DOUBLE - } argDescriptor { name: "method" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "cross" + argDescriptor { + name: "o" + argType: OUTPUT_TENSOR + } argDescriptor { name: "a" argType: INPUT_TENSOR @@ -4904,14 +4925,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "o" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "cube" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4920,18 +4945,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "cube_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4941,14 +4962,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "cubederivative" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4957,27 +4982,10 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "cumprod" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dimensions" - argType: INPUT_TENSOR - argIndex: 1 - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -4991,6 +4999,15 @@ opList { argType: BOOL argIndex: 1 } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "exclusive" argType: INT64 @@ -5009,6 +5026,19 @@ opList { } opList { name: "cumprod_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "exclusive" + argType: BOOL + } + argDescriptor { + name: "reverse" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5023,23 +5053,6 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "exclusive" - argType: BOOL - } - argDescriptor { - name: "reverse" - argType: BOOL - argIndex: 1 - } argDescriptor { name: "exclusive" argType: INT64 @@ -5054,18 +5067,13 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "cumsum" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dimensions" - argType: INPUT_TENSOR - argIndex: 1 - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -5079,6 +5087,15 @@ opList { argType: BOOL argIndex: 1 } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "exclusive" argType: INT64 @@ -5097,6 +5114,19 @@ opList { } opList { name: "cumsum_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "exclusive" + argType: BOOL + } + argDescriptor { + name: "reverse" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5111,23 +5141,6 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "exclusive" - argType: BOOL - } - argDescriptor { - name: "reverse" - argType: BOOL - argIndex: 1 - } argDescriptor { name: "exclusive" argType: INT64 @@ -5142,9 +5155,21 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "cyclic_rshift_bits" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5158,18 +5183,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "cyclic_shift_bits" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5183,18 +5208,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "decode_bitmap" + argDescriptor { + name: "updates" + argType: OUTPUT_TENSOR + } argDescriptor { name: "start" argType: INPUT_TENSOR @@ -5208,13 +5229,13 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "decode_threshold" argDescriptor { name: "updates" argType: OUTPUT_TENSOR } -} -opList { - name: "decode_threshold" argDescriptor { name: "weights" argType: INPUT_TENSOR @@ -5228,13 +5249,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "updates" - argType: OUTPUT_TENSOR - } } opList { name: "deconv2d" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5253,10 +5274,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kH" argType: INT64 @@ -5314,6 +5331,20 @@ opList { } opList { name: "deconv2d_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradW" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "gradB" + argType: OUTPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5337,20 +5368,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradW" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "gradB" - argType: OUTPUT_TENSOR - argIndex: 2 - } argDescriptor { name: "kH" argType: INT64 @@ -5408,6 +5425,10 @@ opList { } opList { name: "deconv2d_tf" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } argDescriptor { name: "gradIShape" argType: INPUT_TENSOR @@ -5426,10 +5447,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kH" argType: INT64 @@ -5487,6 +5504,10 @@ opList { } opList { name: "deconv3d" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5505,10 +5526,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kD" argType: INT64 @@ -5586,6 +5603,20 @@ opList { } opList { name: "deconv3d_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradW" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "gradB" + argType: OUTPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5609,20 +5640,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradW" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "gradB" - argType: OUTPUT_TENSOR - argIndex: 2 - } argDescriptor { name: "kD" argType: INT64 @@ -5700,6 +5717,10 @@ opList { } opList { name: "deconv3d_tf" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "shape" argType: INPUT_TENSOR @@ -5714,25 +5735,17 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "depth_to_space" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "block_size" argType: INT64 @@ -5742,9 +5755,17 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "depthwise_conv2d" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5763,10 +5784,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kH" argType: INT64 @@ -5824,6 +5841,20 @@ opList { } opList { name: "depthwise_conv2d_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradW" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "gradB" + argType: OUTPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5847,20 +5878,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradW" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "gradB" - argType: OUTPUT_TENSOR - argIndex: 2 - } argDescriptor { name: "kH" argType: INT64 @@ -5919,24 +5936,32 @@ opList { opList { name: "diag" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dtype" + argType: DATA_TYPE } } opList { name: "diag_part" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5945,29 +5970,34 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "digamma" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "dilation2d" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "isSameMode" + argType: BOOL + } + argDescriptor { + name: "inPlace" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5987,18 +6017,6 @@ opList { argType: INPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "isSameMode" - argType: BOOL - } argDescriptor { name: "isSameMode" argType: INT64 @@ -6013,17 +6031,21 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "distribution_bernoulli" - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "prob" argType: DOUBLE } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "dataType" argType: INT64 @@ -6037,14 +6059,14 @@ opList { } opList { name: "distribution_binomial" - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "probability" argType: DOUBLE } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "trials" argType: INT64 @@ -6063,13 +6085,17 @@ opList { } opList { name: "distribution_binomial_ex" + argDescriptor { + name: "probability" + argType: DOUBLE + } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "probability" - argType: DOUBLE + name: "probabilities" + argType: INPUT_TENSOR } argDescriptor { name: "trials" @@ -6079,10 +6105,6 @@ opList { } opList { name: "distribution_gaussian" - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "mean" argType: DOUBLE @@ -6092,6 +6114,10 @@ opList { argType: DOUBLE argIndex: 1 } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "dataType" argType: INT64 @@ -6105,10 +6131,6 @@ opList { } opList { name: "distribution_lognormal" - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "mean" argType: DOUBLE @@ -6118,6 +6140,10 @@ opList { argType: DOUBLE argIndex: 1 } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "dataType" argType: INT64 @@ -6131,10 +6157,6 @@ opList { } opList { name: "distribution_truncated" - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "mean" argType: DOUBLE @@ -6144,6 +6166,10 @@ opList { argType: DOUBLE argIndex: 1 } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "dataType" argType: INT64 @@ -6157,10 +6183,6 @@ opList { } opList { name: "distribution_uniform" - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "from" argType: DOUBLE @@ -6170,6 +6192,10 @@ opList { argType: DOUBLE argIndex: 1 } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "dataType" argType: INT64 @@ -6183,22 +6209,31 @@ opList { } opList { name: "div_scalar" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "y" + argType: INPUT_TENSOR + argIndex: 1 } opDeclarationType: LEGACY_XYZ } opList { name: "divide" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6212,18 +6247,23 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "divide_bp" + argDescriptor { + name: "gradX" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradY" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6242,22 +6282,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradX" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradY" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "inPlace" - argType: BOOL - } } opList { name: "divide_no_nan" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6267,22 +6298,13 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "dot" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "newFormat" @@ -6294,8 +6316,13 @@ opList { argIndex: 1 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "y" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -6305,6 +6332,24 @@ opList { } opList { name: "dot_product_attention" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "weights" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "scaled" + argType: BOOL + } + argDescriptor { + name: "withWeights" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "queries" argType: INPUT_TENSOR @@ -6324,28 +6369,6 @@ opList { argType: INPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "weights" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "scaled" - argType: BOOL - } - argDescriptor { - name: "withWeights" - argType: BOOL - argIndex: 1 - } argDescriptor { name: "normalization" argType: INT64 @@ -6355,9 +6378,31 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "dot_product_attention_bp" + argDescriptor { + name: "dLdq" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "dLdk" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "dLdv" + argType: OUTPUT_TENSOR + argIndex: 2 + } + argDescriptor { + name: "scaled" + argType: BOOL + } argDescriptor { name: "queries" argType: INPUT_TENSOR @@ -6382,35 +6427,21 @@ opList { argType: INPUT_TENSOR argIndex: 4 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "dLdq" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dLdk" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dLdv" - argType: OUTPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "scaled" - argType: BOOL - } argDescriptor { name: "normalization" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "draw_bounding_boxes" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "images" argType: INPUT_TENSOR @@ -6425,14 +6456,18 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "dropout" + argDescriptor { + name: "probValue" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6442,14 +6477,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "probValue" - argType: DOUBLE - } argDescriptor { name: "seed" argType: INT64 @@ -6458,6 +6485,14 @@ opList { } opList { name: "dropout_bp" + argDescriptor { + name: "probValue" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6472,14 +6507,6 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "probValue" - argType: DOUBLE - } argDescriptor { name: "seed" argType: INT64 @@ -6489,21 +6516,40 @@ opList { opList { name: "dropout_inverted" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "p" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "p" - argType: DOUBLE + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "dynamic_bidirectional_rnn" + argDescriptor { + name: "hFW" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "hBW" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "hFWFinal" + argType: OUTPUT_TENSOR + argIndex: 2 + } + argDescriptor { + name: "hBWFinal" + argType: OUTPUT_TENSOR + argIndex: 3 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6548,36 +6594,21 @@ opList { argType: INPUT_TENSOR argIndex: 8 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "hFW" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "hBW" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "hFWFinal" - argType: OUTPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "hBWFinal" - argType: OUTPUT_TENSOR - argIndex: 3 - } argDescriptor { name: "timeMajor" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "dynamic_partition" + argDescriptor { + name: "outputList" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6587,21 +6618,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputList" - argType: OUTPUT_TENSOR - } argDescriptor { name: "numPartitions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "dynamic_partition_bp" + argDescriptor { + name: "outputList" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6616,21 +6647,26 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputList" - argType: OUTPUT_TENSOR - } argDescriptor { name: "numPartition" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "dynamic_rnn" + argDescriptor { + name: "h" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "hFinal" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6655,26 +6691,21 @@ opList { argType: INPUT_TENSOR argIndex: 4 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "h" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "hFinal" - argType: OUTPUT_TENSOR - argIndex: 1 - } argDescriptor { name: "timeMajor" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "dynamic_stitch" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "index" argType: INPUT_TENSOR @@ -6684,37 +6715,41 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "numPartitions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "elu" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "alpha" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "alpha" - argType: DOUBLE + name: "input" + argType: INPUT_TENSOR } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "elu_bp" + argDescriptor { + name: "alpha" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6724,18 +6759,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "alpha" - argType: DOUBLE - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "embedding_lookup" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6745,21 +6776,35 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "partition_mode" argType: INT64 } + argDescriptor { + name: "indices" + argType: INT64 + argIndex: 1 + } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "encode_bitmap" + argDescriptor { + name: "threshold" + argType: DOUBLE + } + argDescriptor { + name: "encoded" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "counter" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6778,34 +6823,12 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "encoded" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "counter" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "threshold" - argType: DOUBLE - } } opList { name: "encode_threshold" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "encoded" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "threshold" + argType: DOUBLE } argDescriptor { name: "updated" @@ -6817,46 +6840,60 @@ opList { argIndex: 1 } argDescriptor { - name: "threshold" - argType: DOUBLE + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "encoded" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "boundary" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "enter" argDescriptor { - name: "frameName" - argType: STRING + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "frameName" + argType: STRING } argDescriptor { name: "isConstant" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } } opList { name: "entropy" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -6866,6 +6903,14 @@ opList { } opList { name: "eps" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6879,34 +6924,34 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "eps_scalar" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "equals" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6920,54 +6965,46 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_BOOL_OP_IMPL } opList { name: "equals_scalar" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "equals_with_eps" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "keepDims" - argType: BOOL + name: "eps" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "eps" - argType: DOUBLE + name: "keepDims" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -6978,25 +7015,33 @@ opList { opList { name: "erf" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE } opDeclarationType: LEGACY_XYZ } opList { name: "erfc" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7005,26 +7050,13 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "euclidean" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" @@ -7036,8 +7068,13 @@ opList { argIndex: 1 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "y" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -7047,6 +7084,19 @@ opList { } opList { name: "evaluate_reduction_shape" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } + argDescriptor { + name: "oldFormat" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "inputShape" argType: INPUT_TENSOR @@ -7060,22 +7110,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "keepDims" - argType: BOOL - } - argDescriptor { - name: "oldFormat" - argType: BOOL - argIndex: 1 - } +} +opList { + name: "exit" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "exit" argDescriptor { name: "frameName" argType: STRING @@ -7084,13 +7125,17 @@ opList { name: "input" argType: INPUT_TENSOR } +} +opList { + name: "exp" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "exp" + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7099,37 +7144,37 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "expand_dims" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "expm1" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7138,18 +7183,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "expose" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7158,21 +7199,9 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "extract_image_patches" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -7181,6 +7210,14 @@ opList { name: "sameMode" argType: BOOL } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "ksizeRows" argType: INT64 @@ -7219,26 +7256,13 @@ opList { opList { name: "eye" argDescriptor { - name: "numRows" - argType: INPUT_TENSOR - } - argDescriptor { - name: "numCols" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "dataType" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DOUBLE - } argDescriptor { name: "numRows" argType: INT64 @@ -7258,21 +7282,13 @@ opList { argType: INT64 argIndex: 3 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "fake_quant_with_min_max_args" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "narrowRange" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "min" argType: DOUBLE @@ -7282,6 +7298,18 @@ opList { argType: DOUBLE argIndex: 1 } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "narrowRange" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "numBits" argType: INT64 @@ -7289,28 +7317,6 @@ opList { } opList { name: "fake_quant_with_min_max_vars" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "min" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "max" - argType: INPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "narrowed" - argType: BOOL - } argDescriptor { name: "m" argType: DOUBLE @@ -7321,13 +7327,13 @@ opList { argIndex: 1 } argDescriptor { - name: "numBits" - argType: INT64 + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "narrowed" + argType: BOOL } - opDeclarationType: CONFIGURABLE_OP_IMPL -} -opList { - name: "fake_quant_with_min_max_vars_per_channel" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7342,13 +7348,35 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "numBits" + argType: INT64 + } + opDeclarationType: CONFIGURABLE_OP_IMPL +} +opList { + name: "fake_quant_with_min_max_vars_per_channel" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "narrowed" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "min" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "max" + argType: INPUT_TENSOR + argIndex: 2 } argDescriptor { name: "numBits" @@ -7358,41 +7386,45 @@ opList { } opList { name: "fill" + argDescriptor { + name: "value" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "shapeArray" argType: INPUT_TENSOR } argDescriptor { name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "value" - argType: DOUBLE + argType: INT64 } argDescriptor { name: "dtype" - argType: INT64 + argType: DATA_TYPE } } opList { name: "fill_as" - argDescriptor { - name: "s" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "s" + argType: INPUT_TENSOR + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "firas_sparse" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7401,25 +7433,9 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "first_index" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "keepDims" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "compare" argType: DOUBLE @@ -7430,32 +7446,71 @@ opList { argIndex: 1 } argDescriptor { - name: "dimensions" + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "mode" argType: INT64 } opDeclarationType: LEGACY_XYZ } opList { name: "flatten" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "order" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } +} +opList { + name: "flatten_2d" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INT64 + } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "floor" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7464,18 +7519,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "floordiv" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7489,18 +7544,23 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "floordiv_bp" + argDescriptor { + name: "gradX" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradY" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7519,22 +7579,17 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "floormod" argDescriptor { - name: "gradX" + name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "gradY" - argType: OUTPUT_TENSOR - argIndex: 1 - } argDescriptor { name: "inPlace" argType: BOOL } -} -opList { - name: "floormod" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7548,18 +7603,23 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "floormod_bp" + argDescriptor { + name: "gradX" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradY" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7578,22 +7638,17 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "fmod" argDescriptor { - name: "gradX" + name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "gradY" - argType: OUTPUT_TENSOR - argIndex: 1 - } argDescriptor { name: "inPlace" argType: BOOL } -} -opList { - name: "fmod" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7607,18 +7662,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "fmod_scalar" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7628,14 +7679,28 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "fused_batch_norm" + argDescriptor { + name: "epsilon" + argType: DOUBLE + } + argDescriptor { + name: "y" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "batchMean" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "batchVar" + argType: OUTPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7665,28 +7730,6 @@ opList { argType: INPUT_TENSOR argIndex: 5 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "y" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "batchMean" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "batchVar" - argType: OUTPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "epsilon" - argType: DOUBLE - } argDescriptor { name: "dataFormat" argType: INT64 @@ -7696,9 +7739,21 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "gather" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7713,25 +7768,21 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "gather_list" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "list" argType: INPUT_TENSOR @@ -7742,13 +7793,21 @@ opList { argIndex: 1 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "dtype" + argType: DATA_TYPE } opDeclarationType: LIST_OP_IMPL } opList { name: "gather_nd" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "checkIndices" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7762,24 +7821,12 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "checkIndices" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "gelu" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" @@ -7791,24 +7838,32 @@ opList { argIndex: 1 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE } opDeclarationType: LEGACY_XYZ } opList { name: "get_seed" - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "gradientbackwards" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7818,13 +7873,17 @@ opList { argType: INPUT_TENSOR argIndex: 1 } +} +opList { + name: "greater" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "greater" + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7838,18 +7897,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_BOOL_OP_IMPL } opList { name: "greater_equal" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7863,50 +7922,46 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_BOOL_OP_IMPL } opList { name: "greaterthan_scalar" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "greaterthanorequal_scalar" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "grid_free" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7916,14 +7971,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "gru" + argDescriptor { + name: "h" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7952,13 +8007,28 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "h" - argType: OUTPUT_TENSOR - } } opList { name: "gruCell" + argDescriptor { + name: "r" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "u" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "c" + argType: OUTPUT_TENSOR + argIndex: 2 + } + argDescriptor { + name: "h" + argType: OUTPUT_TENSOR + argIndex: 3 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7992,28 +8062,38 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "gruCell_bp" argDescriptor { - name: "r" + name: "dLdx" argType: OUTPUT_TENSOR } argDescriptor { - name: "u" + name: "dLdhi" argType: OUTPUT_TENSOR argIndex: 1 } argDescriptor { - name: "c" + name: "dLdW" argType: OUTPUT_TENSOR argIndex: 2 } argDescriptor { - name: "h" + name: "dLdWc" argType: OUTPUT_TENSOR argIndex: 3 } -} -opList { - name: "gruCell_bp" + argDescriptor { + name: "dLdb" + argType: OUTPUT_TENSOR + argIndex: 4 + } + argDescriptor { + name: "dLdbc" + argType: OUTPUT_TENSOR + argIndex: 5 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8067,22 +8147,25 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "gru_bp" argDescriptor { name: "dLdx" argType: OUTPUT_TENSOR } argDescriptor { - name: "dLdhi" + name: "dLdhI" argType: OUTPUT_TENSOR argIndex: 1 } argDescriptor { - name: "dLdW" + name: "dLdWx" argType: OUTPUT_TENSOR argIndex: 2 } argDescriptor { - name: "dLdWc" + name: "dLdWh" argType: OUTPUT_TENSOR argIndex: 3 } @@ -8091,14 +8174,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 4 } - argDescriptor { - name: "dLdbc" - argType: OUTPUT_TENSOR - argIndex: 5 - } -} -opList { - name: "gru_bp" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8132,41 +8207,12 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "dLdx" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dLdhI" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dLdWx" - argType: OUTPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "dLdWh" - argType: OUTPUT_TENSOR - argIndex: 3 - } - argDescriptor { - name: "dLdb" - argType: OUTPUT_TENSOR - argIndex: 4 - } } opList { name: "hammingdistance" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" @@ -8178,8 +8224,13 @@ opList { argIndex: 1 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "y" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -8190,57 +8241,61 @@ opList { opList { name: "hard_sigmoid" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE } opDeclarationType: LEGACY_XYZ } opList { name: "hard_sigmoidderivative" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE } opDeclarationType: LEGACY_XYZ } opList { name: "hardsigmoid" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "hardsigmoid_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8250,14 +8305,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "hardtanh" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8266,18 +8325,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "hardtanh_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8287,14 +8342,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "hardtanhderivative" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8303,18 +8362,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "hashcode" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8323,24 +8378,20 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "hasinf" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "dimensions" @@ -8351,16 +8402,16 @@ opList { opList { name: "hasnan" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "dimensions" @@ -8370,6 +8421,10 @@ opList { } opList { name: "hinge_loss" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "logits" argType: INPUT_TENSOR @@ -8384,39 +8439,17 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "reductionMode" argType: INT64 } -} -opList { - name: "hinge_loss_grad" - argDescriptor { - name: "logits" - argType: INPUT_TENSOR - } - argDescriptor { - name: "weights" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "labels" - argType: INPUT_TENSOR - argIndex: 2 - } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "hinge_loss_grad" argDescriptor { name: "dLdp" argType: OUTPUT_TENSOR @@ -8431,32 +8464,54 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "logits" + argType: INPUT_TENSOR + } + argDescriptor { + name: "weights" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "labels" + argType: INPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "reductionMode" argType: INT64 } -} -opList { - name: "histogram" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "histogram" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "numBins" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "histogram_fixed_width" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8471,29 +8526,25 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "nbins" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "hsv_to_rgb" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "dimC" argType: INT64 @@ -8503,38 +8554,13 @@ opList { opList { name: "huber_loss" argDescriptor { - name: "predictions" - argType: INPUT_TENSOR - } - argDescriptor { - name: "weights" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "labels" - argType: INPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "delta" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "delta" - argType: DOUBLE - } - argDescriptor { - name: "reductionMode" - argType: INT64 - } -} -opList { - name: "huber_loss_grad" argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -8549,10 +8575,21 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "reductionMode" + argType: INT64 + } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "huber_loss_grad" + argDescriptor { + name: "delta" + argType: DOUBLE + } argDescriptor { name: "dLdp" argType: OUTPUT_TENSOR @@ -8568,16 +8605,38 @@ opList { argIndex: 2 } argDescriptor { - name: "delta" - argType: DOUBLE + name: "predictions" + argType: INPUT_TENSOR + } + argDescriptor { + name: "weights" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "labels" + argType: INPUT_TENSOR + argIndex: 2 } argDescriptor { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "identity" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8586,18 +8645,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "identity_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8607,14 +8662,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "identity_n" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8623,13 +8678,13 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "igamma" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "igamma" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8639,14 +8694,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "igammac" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8656,14 +8711,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "im2col" + argDescriptor { + name: "zeroPadVal" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8673,18 +8732,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "zeroPadVal" - argType: DOUBLE - } argDescriptor { name: "kernelHeight" argType: INT64 @@ -8724,9 +8771,21 @@ opList { argType: INT64 argIndex: 7 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "im2col_bp" + argDescriptor { + name: "zeroPadVal" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8736,18 +8795,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "zeroPadVal" - argType: DOUBLE - } argDescriptor { name: "kernelHeight" argType: INT64 @@ -8787,22 +8834,13 @@ opList { argType: INT64 argIndex: 7 } -} -opList { - name: "image_resize" - argDescriptor { - name: "image" - argType: INPUT_TENSOR - } - argDescriptor { - name: "size" - argType: INPUT_TENSOR - argIndex: 1 - } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "image_resize" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -8816,13 +8854,34 @@ opList { argType: BOOL argIndex: 1 } + argDescriptor { + name: "image" + argType: INPUT_TENSOR + } + argDescriptor { + name: "size" + argType: INPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "method" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "in_top_k" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "sorted" + argType: BOOL + } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -8832,25 +8891,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "k" + argType: INT64 + } argDescriptor { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "sorted" - argType: BOOL - } +} +opList { + name: "invert_permutation" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "k" - argType: INT64 + name: "inPlace" + argType: BOOL } -} -opList { - name: "invert_permutation" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8859,86 +8918,86 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "is_non_decreasing" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: BOOLEAN_OP_IMPL } opList { name: "is_numeric_tensor" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: BOOLEAN_OP_IMPL } opList { name: "is_strictly_increasing" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: BOOLEAN_OP_IMPL } opList { name: "isfinite" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE } opDeclarationType: LEGACY_XYZ } opList { name: "isinf" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8947,26 +9006,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "ismax" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "dimensions" argType: INT64 @@ -8975,6 +9026,14 @@ opList { } opList { name: "isnan" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8983,26 +9042,13 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "jaccarddistance" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" @@ -9014,8 +9060,13 @@ opList { argIndex: 1 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "y" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -9025,6 +9076,10 @@ opList { } opList { name: "knn_mindistance" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9048,13 +9103,13 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "l2_loss" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "l2_loss" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9063,25 +9118,9 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "last_index" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "keepDims" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "compare" argType: DOUBLE @@ -9092,13 +9131,33 @@ opList { argIndex: 1 } argDescriptor { - name: "dimensions" + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "mode" argType: INT64 } opDeclarationType: LEGACY_XYZ } opList { name: "layer_norm" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "noBias" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9113,14 +9172,6 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "noBias" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 @@ -9129,6 +9180,24 @@ opList { } opList { name: "layer_norm_bp" + argDescriptor { + name: "dLdx" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "dLdg" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "dLdb" + argType: OUTPUT_TENSOR + argIndex: 2 + } + argDescriptor { + name: "noBias" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9163,71 +9232,65 @@ opList { argType: INPUT_TENSOR argIndex: 6 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "dLdx" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dLdg" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dLdb" - argType: OUTPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "noBias" - argType: BOOL - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "leakyrelu" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "inPlace" - argType: BOOL + name: "alpha" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "alpha" - argType: DOUBLE + name: "inPlace" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "leakyreluderivative" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "alpha" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "alpha" - argType: DOUBLE + name: "inPlace" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "less" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9241,18 +9304,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_BOOL_OP_IMPL } opList { name: "less_equal" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9266,62 +9329,67 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_BOOL_OP_IMPL } opList { name: "lessthan_scalar" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "lessthanorequal_scalar" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "lgamma" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: OP_IMPL } opList { name: "lin_space" + argDescriptor { + name: "start" + argType: DOUBLE + } + argDescriptor { + name: "stop" + argType: DOUBLE + argIndex: 1 + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "start" argType: INPUT_TENSOR @@ -9337,24 +9405,7 @@ opList { argIndex: 2 } argDescriptor { - name: "dataType" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "start" - argType: DOUBLE - } - argDescriptor { - name: "stop" - argType: DOUBLE - argIndex: 1 - } - argDescriptor { - name: "dataType" + name: "elements" argType: INT64 } argDescriptor { @@ -9362,15 +9413,15 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } } opList { name: "linspace_random" argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "step" + name: "from" argType: DOUBLE } argDescriptor { @@ -9378,6 +9429,10 @@ opList { argType: DOUBLE argIndex: 1 } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "length" argType: INT64 @@ -9386,6 +9441,15 @@ opList { } opList { name: "listdiff" + argDescriptor { + name: "output1" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "output2" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "values" argType: INPUT_TENSOR @@ -9399,18 +9463,17 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "output1" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "output2" - argType: OUTPUT_TENSOR - argIndex: 1 - } } opList { name: "log" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9419,18 +9482,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "log1p" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9439,51 +9502,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "log_loss" argDescriptor { - name: "predictions" - argType: INPUT_TENSOR - } - argDescriptor { - name: "weights" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "labels" - argType: INPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "epsilon" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "epsilon" - argType: DOUBLE - } - argDescriptor { - name: "reductionMode" - argType: INT64 - } -} -opList { - name: "log_loss_grad" argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -9498,10 +9528,21 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "reductionMode" + argType: INT64 + } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "log_loss_grad" + argDescriptor { + name: "epsilon" + argType: DOUBLE + } argDescriptor { name: "dLdp" argType: OUTPUT_TENSOR @@ -9517,53 +9558,49 @@ opList { argIndex: 2 } argDescriptor { - name: "epsilon" - argType: DOUBLE + name: "predictions" + argType: INPUT_TENSOR + } + argDescriptor { + name: "weights" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "labels" + argType: INPUT_TENSOR + argIndex: 2 } argDescriptor { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "log_matrix_determinant" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } -} -opList { - name: "log_poisson_loss" - argDescriptor { - name: "log_predictions" + name: "input" argType: INPUT_TENSOR } - argDescriptor { - name: "weights" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "labels" - argType: INPUT_TENSOR - argIndex: 2 - } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "log_poisson_loss" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -9572,13 +9609,6 @@ opList { name: "full" argType: BOOL } - argDescriptor { - name: "reductionMode" - argType: INT64 - } -} -opList { - name: "log_poisson_loss_grad" argDescriptor { name: "log_predictions" argType: INPUT_TENSOR @@ -9593,10 +9623,17 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "reductionMode" + argType: INT64 + } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "log_poisson_loss_grad" argDescriptor { name: "dLdp" argType: OUTPUT_TENSOR @@ -9615,21 +9652,39 @@ opList { name: "full" argType: BOOL } + argDescriptor { + name: "log_predictions" + argType: INPUT_TENSOR + } + argDescriptor { + name: "weights" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "labels" + argType: INPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "log_softmax" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "dimension" argType: INT64 @@ -9638,6 +9693,10 @@ opList { } opList { name: "log_softmax_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9647,10 +9706,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimension" argType: INT64 @@ -9660,21 +9715,25 @@ opList { opList { name: "log_x" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "base" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "base" - argType: DOUBLE + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "logdet" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9683,24 +9742,25 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "logentropy" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -9710,6 +9770,14 @@ opList { } opList { name: "logsigmoid" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9718,45 +9786,49 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "loop_cond" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "frameName" argType: STRING } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } } opList { name: "lrelu" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "alpha" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "alpha" - argType: DOUBLE + name: "input" + argType: INPUT_TENSOR } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "lrelu_bp" + argDescriptor { + name: "alpha" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9766,30 +9838,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "alpha" - argType: DOUBLE - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "lrn" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "bias" argType: DOUBLE @@ -9804,6 +9856,18 @@ opList { argType: DOUBLE argIndex: 2 } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "depth" argType: INT64 @@ -9812,23 +9876,6 @@ opList { } opList { name: "lrn_bp" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "gradO" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "bias" argType: DOUBLE @@ -9843,6 +9890,23 @@ opList { argType: DOUBLE argIndex: 2 } + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "gradO" + argType: INPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "depth" argType: INT64 @@ -9851,6 +9915,29 @@ opList { } opList { name: "lstm" + argDescriptor { + name: "clippingCellValue" + argType: DOUBLE + } + argDescriptor { + name: "clippingProjValue" + argType: DOUBLE + argIndex: 1 + } + argDescriptor { + name: "forgetBias" + argType: DOUBLE + argIndex: 2 + } + argDescriptor { + name: "h" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "c" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9890,33 +9977,6 @@ opList { argType: INPUT_TENSOR argIndex: 7 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "h" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "c" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "clippingCellValue" - argType: DOUBLE - } - argDescriptor { - name: "clippingProjValue" - argType: DOUBLE - argIndex: 1 - } - argDescriptor { - name: "forgetBias" - argType: DOUBLE - argIndex: 2 - } argDescriptor { name: "peephole" argType: INT64 @@ -9926,9 +9986,56 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "lstmBlock" + argDescriptor { + name: "forgetBias" + argType: DOUBLE + } + argDescriptor { + name: "clippingCellValue" + argType: DOUBLE + argIndex: 1 + } + argDescriptor { + name: "i" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "c" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "f" + argType: OUTPUT_TENSOR + argIndex: 2 + } + argDescriptor { + name: "o" + argType: OUTPUT_TENSOR + argIndex: 3 + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + argIndex: 4 + } + argDescriptor { + name: "h" + argType: OUTPUT_TENSOR + argIndex: 5 + } + argDescriptor { + name: "y" + argType: OUTPUT_TENSOR + argIndex: 6 + } argDescriptor { name: "maxTSLength" argType: INPUT_TENSOR @@ -9973,10 +10080,31 @@ opList { argType: INPUT_TENSOR argIndex: 8 } + argDescriptor { + name: "peephole" + argType: INT64 + } + argDescriptor { + name: "dataFormat" + argType: INT64 + argIndex: 1 + } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "lstmBlockCell" + argDescriptor { + name: "forgetBias" + argType: DOUBLE + } + argDescriptor { + name: "clippingCellValue" + argType: DOUBLE + argIndex: 1 + } argDescriptor { name: "i" argType: OUTPUT_TENSOR @@ -10011,27 +10139,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 6 } - argDescriptor { - name: "forgetBias" - argType: DOUBLE - } - argDescriptor { - name: "clippingCellValue" - argType: DOUBLE - argIndex: 1 - } - argDescriptor { - name: "peephole" - argType: INT64 - } - argDescriptor { - name: "dataFormat" - argType: INT64 - argIndex: 1 - } -} -opList { - name: "lstmBlockCell" argDescriptor { name: "xt" argType: INPUT_TENSOR @@ -10071,60 +10178,40 @@ opList { argType: INPUT_TENSOR argIndex: 7 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "i" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "c" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "f" - argType: OUTPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "o" - argType: OUTPUT_TENSOR - argIndex: 3 - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - argIndex: 4 - } - argDescriptor { - name: "h" - argType: OUTPUT_TENSOR - argIndex: 5 - } - argDescriptor { - name: "y" - argType: OUTPUT_TENSOR - argIndex: 6 - } - argDescriptor { - name: "forgetBias" - argType: DOUBLE - } - argDescriptor { - name: "clippingCellValue" - argType: DOUBLE - argIndex: 1 - } argDescriptor { name: "peephole" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "lstmCell" + argDescriptor { + name: "clippingCellValue" + argType: DOUBLE + } + argDescriptor { + name: "clippingProjValue" + argType: DOUBLE + argIndex: 1 + } + argDescriptor { + name: "forgetBias" + argType: DOUBLE + argIndex: 2 + } + argDescriptor { + name: "ht" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "ct" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "xt" argType: INPUT_TENSOR @@ -10164,33 +10251,6 @@ opList { argType: INPUT_TENSOR argIndex: 7 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "ht" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "ct" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "clippingCellValue" - argType: DOUBLE - } - argDescriptor { - name: "clippingProjValue" - argType: DOUBLE - argIndex: 1 - } - argDescriptor { - name: "forgetBias" - argType: DOUBLE - argIndex: 2 - } argDescriptor { name: "peephole" argType: INT64 @@ -10200,52 +10260,47 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "lstmLayer" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "cellClip" + argType: DOUBLE } argDescriptor { - name: "Wx" - argType: INPUT_TENSOR + name: "gateAlpha" + argType: DOUBLE argIndex: 1 } argDescriptor { - name: "Wr" - argType: INPUT_TENSOR + name: "gateBeta" + argType: DOUBLE argIndex: 2 } argDescriptor { - name: "b" - argType: INPUT_TENSOR + name: "cellAlpha" + argType: DOUBLE argIndex: 3 } argDescriptor { - name: "seqLen" - argType: INPUT_TENSOR + name: "cellBeta" + argType: DOUBLE argIndex: 4 } argDescriptor { - name: "hI" - argType: INPUT_TENSOR + name: "outAlpha" + argType: DOUBLE argIndex: 5 } argDescriptor { - name: "cI" - argType: INPUT_TENSOR + name: "outBeta" + argType: DOUBLE argIndex: 6 } - argDescriptor { - name: "Wp" - argType: INPUT_TENSOR - argIndex: 7 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "h" argType: OUTPUT_TENSOR @@ -10299,6 +10354,76 @@ opList { argType: BOOL argIndex: 7 } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "Wx" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "Wr" + argType: INPUT_TENSOR + argIndex: 2 + } + argDescriptor { + name: "b" + argType: INPUT_TENSOR + argIndex: 3 + } + argDescriptor { + name: "seqLen" + argType: INPUT_TENSOR + argIndex: 4 + } + argDescriptor { + name: "hI" + argType: INPUT_TENSOR + argIndex: 5 + } + argDescriptor { + name: "cI" + argType: INPUT_TENSOR + argIndex: 6 + } + argDescriptor { + name: "Wp" + argType: INPUT_TENSOR + argIndex: 7 + } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } + argDescriptor { + name: "dataFormat" + argType: INT64 + } + argDescriptor { + name: "directionMode" + argType: INT64 + argIndex: 1 + } + argDescriptor { + name: "gateAct" + argType: INT64 + argIndex: 2 + } + argDescriptor { + name: "cellAct" + argType: INT64 + argIndex: 3 + } + argDescriptor { + name: "outAct" + argType: INT64 + argIndex: 4 + } +} +opList { + name: "lstmLayerCell" argDescriptor { name: "cellClip" argType: DOUBLE @@ -10334,32 +10459,23 @@ opList { argIndex: 6 } argDescriptor { - name: "dataFormat" - argType: INT64 + name: "h" + argType: OUTPUT_TENSOR } argDescriptor { - name: "directionMode" - argType: INT64 + name: "c" + argType: OUTPUT_TENSOR argIndex: 1 } argDescriptor { - name: "gateAct" - argType: INT64 - argIndex: 2 + name: "hasBiases" + argType: BOOL } argDescriptor { - name: "cellAct" - argType: INT64 - argIndex: 3 + name: "hasPH" + argType: BOOL + argIndex: 1 } - argDescriptor { - name: "outAct" - argType: INT64 - argIndex: 4 - } -} -opList { - name: "lstmLayerCell" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -10394,28 +10510,27 @@ opList { argType: INPUT_TENSOR argIndex: 6 } + argDescriptor { + name: "gateAct" + argType: INT64 + } + argDescriptor { + name: "cellAct" + argType: INT64 + argIndex: 1 + } + argDescriptor { + name: "outAct" + argType: INT64 + argIndex: 2 + } argDescriptor { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "h" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "c" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "hasBiases" - argType: BOOL - } - argDescriptor { - name: "hasPH" - argType: BOOL - argIndex: 1 - } +} +opList { + name: "lstmLayerCellBp" argDescriptor { name: "cellClip" argType: DOUBLE @@ -10451,22 +10566,48 @@ opList { argIndex: 6 } argDescriptor { - name: "gateAct" - argType: INT64 + name: "dLdx" + argType: OUTPUT_TENSOR } argDescriptor { - name: "cellAct" - argType: INT64 + name: "dLdWx" + argType: OUTPUT_TENSOR argIndex: 1 } argDescriptor { - name: "outAct" - argType: INT64 + name: "dLdWr" + argType: OUTPUT_TENSOR argIndex: 2 } -} -opList { - name: "lstmLayerCellBp" + argDescriptor { + name: "dLdb" + argType: OUTPUT_TENSOR + argIndex: 3 + } + argDescriptor { + name: "dLdhI" + argType: OUTPUT_TENSOR + argIndex: 4 + } + argDescriptor { + name: "dLdcI" + argType: OUTPUT_TENSOR + argIndex: 5 + } + argDescriptor { + name: "dLdWp" + argType: OUTPUT_TENSOR + argIndex: 6 + } + argDescriptor { + name: "hasBiases" + argType: BOOL + } + argDescriptor { + name: "hasPH" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -10511,14 +10652,56 @@ opList { argType: DATA_TYPE } argDescriptor { - name: "hasBiases" - argType: BOOL + name: "gateAct" + argType: INT64 } argDescriptor { - name: "hasPH" - argType: BOOL + name: "cellAct" + argType: INT64 argIndex: 1 } + argDescriptor { + name: "outAct" + argType: INT64 + argIndex: 2 + } +} +opList { + name: "lstmLayer_bp" + argDescriptor { + name: "cellClip" + argType: DOUBLE + } + argDescriptor { + name: "gateAlpha" + argType: DOUBLE + argIndex: 1 + } + argDescriptor { + name: "gateBeta" + argType: DOUBLE + argIndex: 2 + } + argDescriptor { + name: "cellAlpha" + argType: DOUBLE + argIndex: 3 + } + argDescriptor { + name: "cellBeta" + argType: DOUBLE + argIndex: 4 + } + argDescriptor { + name: "outAlpha" + argType: DOUBLE + argIndex: 5 + } + argDescriptor { + name: "outBeta" + argType: DOUBLE + argIndex: 6 + } argDescriptor { name: "dLdx" argType: OUTPUT_TENSOR @@ -10554,56 +10737,44 @@ opList { argIndex: 6 } argDescriptor { - name: "cellClip" - argType: DOUBLE + name: "hasBiases" + argType: BOOL } argDescriptor { - name: "gateAlpha" - argType: DOUBLE + name: "hasSeqLen" + argType: BOOL argIndex: 1 } argDescriptor { - name: "gateBeta" - argType: DOUBLE + name: "hasInitH" + argType: BOOL argIndex: 2 } argDescriptor { - name: "cellAlpha" - argType: DOUBLE + name: "hasInitC" + argType: BOOL argIndex: 3 } argDescriptor { - name: "cellBeta" - argType: DOUBLE + name: "hasPH" + argType: BOOL argIndex: 4 } argDescriptor { - name: "outAlpha" - argType: DOUBLE + name: "retFullSeq" + argType: BOOL argIndex: 5 } argDescriptor { - name: "outBeta" - argType: DOUBLE + name: "retLastH" + argType: BOOL argIndex: 6 } argDescriptor { - name: "gateAct" - argType: INT64 + name: "retLastC" + argType: BOOL + argIndex: 7 } - argDescriptor { - name: "cellAct" - argType: INT64 - argIndex: 1 - } - argDescriptor { - name: "outAct" - argType: INT64 - argIndex: 2 - } -} -opList { - name: "lstmLayer_bp" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -10667,113 +10838,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "dLdx" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dLdWx" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dLdWr" - argType: OUTPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "dLdb" - argType: OUTPUT_TENSOR - argIndex: 3 - } - argDescriptor { - name: "dLdhI" - argType: OUTPUT_TENSOR - argIndex: 4 - } - argDescriptor { - name: "dLdcI" - argType: OUTPUT_TENSOR - argIndex: 5 - } - argDescriptor { - name: "dLdWp" - argType: OUTPUT_TENSOR - argIndex: 6 - } - argDescriptor { - name: "hasBiases" - argType: BOOL - } - argDescriptor { - name: "hasSeqLen" - argType: BOOL - argIndex: 1 - } - argDescriptor { - name: "hasInitH" - argType: BOOL - argIndex: 2 - } - argDescriptor { - name: "hasInitC" - argType: BOOL - argIndex: 3 - } - argDescriptor { - name: "hasPH" - argType: BOOL - argIndex: 4 - } - argDescriptor { - name: "retFullSeq" - argType: BOOL - argIndex: 5 - } - argDescriptor { - name: "retLastH" - argType: BOOL - argIndex: 6 - } - argDescriptor { - name: "retLastC" - argType: BOOL - argIndex: 7 - } - argDescriptor { - name: "cellClip" - argType: DOUBLE - } - argDescriptor { - name: "gateAlpha" - argType: DOUBLE - argIndex: 1 - } - argDescriptor { - name: "gateBeta" - argType: DOUBLE - argIndex: 2 - } - argDescriptor { - name: "cellAlpha" - argType: DOUBLE - argIndex: 3 - } - argDescriptor { - name: "cellBeta" - argType: DOUBLE - argIndex: 4 - } - argDescriptor { - name: "outAlpha" - argType: DOUBLE - argIndex: 5 - } - argDescriptor { - name: "outBeta" - argType: DOUBLE - argIndex: 6 - } argDescriptor { name: "dataFormat" argType: INT64 @@ -10801,6 +10865,18 @@ opList { } opList { name: "lstsq" + argDescriptor { + name: "l2_factor" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "fastFlag" + argType: BOOL + } argDescriptor { name: "a" argType: INPUT_TENSOR @@ -10814,29 +10890,9 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "fastFlag" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "l2_factor" - argType: DOUBLE - } } opList { name: "lu" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -10846,17 +10902,20 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } -} -opList { - name: "manhattan" argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 + name: "dtype" + argType: DATA_TYPE + } +} +opList { + name: "manhattan" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" @@ -10868,8 +10927,13 @@ opList { argIndex: 1 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "y" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -10880,60 +10944,26 @@ opList { opList { name: "match_condition" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "compare" + argType: DOUBLE + } + argDescriptor { + name: "eps" + argType: DOUBLE + argIndex: 1 + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" argType: BOOL } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "compare" - argType: DOUBLE - } - argDescriptor { - name: "eps" - argType: DOUBLE - argIndex: 1 - } - argDescriptor { - name: "dimensions" - argType: INT64 - } - opDeclarationType: LEGACY_XYZ -} -opList { - name: "match_condition_transform" argDescriptor { name: "input" argType: INPUT_TENSOR } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "compare" - argType: DOUBLE - } - argDescriptor { - name: "eps" - argType: DOUBLE - argIndex: 1 - } argDescriptor { name: "mode" argType: INT64 @@ -10941,20 +10971,40 @@ opList { opDeclarationType: LEGACY_XYZ } opList { - name: "matmul" + name: "match_condition_transform" + argDescriptor { + name: "compare" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 + name: "mode" + argType: INT64 } argDescriptor { - name: "dtype" + name: "dataType" argType: DATA_TYPE } + opDeclarationType: LEGACY_XYZ +} +opList { + name: "matmul" + argDescriptor { + name: "alpha" + argType: DOUBLE + } + argDescriptor { + name: "beta" + argType: DOUBLE + argIndex: 1 + } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -10974,12 +11024,12 @@ opList { argIndex: 2 } argDescriptor { - name: "alpha" - argType: DOUBLE + name: "input" + argType: INPUT_TENSOR } argDescriptor { - name: "beta" - argType: DOUBLE + name: "y" + argType: INPUT_TENSOR argIndex: 1 } argDescriptor { @@ -10996,9 +11046,31 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "matmul_bp" + argDescriptor { + name: "alpha" + argType: DOUBLE + } + argDescriptor { + name: "beta" + argType: DOUBLE + argIndex: 1 + } + argDescriptor { + name: "dldx" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "dldy" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11023,28 +11095,6 @@ opList { argType: INPUT_TENSOR argIndex: 4 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "dldx" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dldy" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "alpha" - argType: DOUBLE - } - argDescriptor { - name: "beta" - argType: DOUBLE - argIndex: 1 - } argDescriptor { name: "transX" argType: INT64 @@ -11059,9 +11109,17 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "matrix_band_part" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11076,10 +11134,6 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "minLower" argType: INT64 @@ -11093,6 +11147,14 @@ opList { } opList { name: "matrix_determinant" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11101,17 +11163,17 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } +} +opList { + name: "matrix_diag" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "matrix_diag" + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "diagonal" argType: INPUT_TENSOR @@ -11120,17 +11182,17 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } +} +opList { + name: "matrix_diag_part" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "matrix_diag_part" + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11139,33 +11201,33 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "matrix_inverse" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: OP_IMPL } opList { name: "matrix_set_diag" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11175,18 +11237,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "max_pairwise" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11200,14 +11258,19 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "max_pool_with_argmax" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "indices" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11221,15 +11284,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "indices" - argType: OUTPUT_TENSOR - argIndex: 1 - } argDescriptor { name: "kH" argType: INT64 @@ -11287,6 +11341,10 @@ opList { } opList { name: "max_scalar" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11296,14 +11354,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "maximum" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11317,18 +11379,19 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "maximum_bp" + argDescriptor { + name: "gradX" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradY" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11347,18 +11410,17 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradX" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradY" - argType: OUTPUT_TENSOR - argIndex: 1 - } } opList { name: "maxout" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11367,14 +11429,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "maxpool2d" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11383,10 +11445,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kH" argType: INT64 @@ -11444,6 +11502,10 @@ opList { } opList { name: "maxpool2d_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11457,10 +11519,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kH" argType: INT64 @@ -11518,6 +11576,10 @@ opList { } opList { name: "maxpool3dnew" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11526,10 +11588,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kD" argType: INT64 @@ -11607,6 +11665,10 @@ opList { } opList { name: "maxpool3dnew_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11620,10 +11682,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kD" argType: INT64 @@ -11701,6 +11759,10 @@ opList { } opList { name: "mean_pairwssqerr_loss" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -11715,39 +11777,17 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "mean_pairwssqerr_loss_grad" - argDescriptor { - name: "predictions" - argType: INPUT_TENSOR - } - argDescriptor { - name: "weights" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "labels" - argType: INPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "dLdp" argType: OUTPUT_TENSOR @@ -11762,13 +11802,35 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "predictions" + argType: INPUT_TENSOR + } + argDescriptor { + name: "weights" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "labels" + argType: INPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "mean_sqerr_loss" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -11783,39 +11845,17 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "reductionMode" argType: INT64 } -} -opList { - name: "mean_sqerr_loss_grad" - argDescriptor { - name: "predictions" - argType: INPUT_TENSOR - } - argDescriptor { - name: "weights" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "labels" - argType: INPUT_TENSOR - argIndex: 2 - } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "mean_sqerr_loss_grad" argDescriptor { name: "dLdp" argType: OUTPUT_TENSOR @@ -11830,44 +11870,66 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "predictions" + argType: INPUT_TENSOR + } + argDescriptor { + name: "weights" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "labels" + argType: INPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "merge" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } } opList { name: "mergeadd" argDescriptor { - name: "inArrs" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "inArrs" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE } opDeclarationType: OP_IMPL } opList { name: "mergeadd_bp" + argDescriptor { + name: "outArrs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "gradient" argType: INPUT_TENSOR @@ -11881,25 +11943,25 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outArrs" - argType: OUTPUT_TENSOR - } } opList { name: "mergeavg" - argDescriptor { - name: "inArrs" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inArrs" + argType: INPUT_TENSOR + } opDeclarationType: OP_IMPL } opList { name: "mergeavg_bp" + argDescriptor { + name: "outArrs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "gradient" argType: INPUT_TENSOR @@ -11913,25 +11975,25 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outArrs" - argType: OUTPUT_TENSOR - } } opList { name: "mergemax" - argDescriptor { - name: "inArrs" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inArrs" + argType: INPUT_TENSOR + } opDeclarationType: OP_IMPL } opList { name: "mergemax_bp" + argDescriptor { + name: "outArrs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "inArrs" argType: INPUT_TENSOR @@ -11945,63 +12007,59 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outArrs" - argType: OUTPUT_TENSOR - } } opList { name: "mergemaxindex" - argDescriptor { - name: "inArrs" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inArrs" + argType: INPUT_TENSOR + } argDescriptor { name: "dataType" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "mergesum" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } } opList { name: "meshgrid" argDescriptor { - name: "inArrs" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "outArrs" + argType: OUTPUT_TENSOR } argDescriptor { name: "cartesian" argType: BOOL } argDescriptor { - name: "outArrs" - argType: OUTPUT_TENSOR + name: "inArrs" + argType: INPUT_TENSOR } argDescriptor { name: "swapFirst2Dims" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "meta_postulate" @@ -12041,6 +12099,10 @@ opList { } opList { name: "min_pairwise" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12054,14 +12116,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "minimum" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12075,18 +12141,19 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "minimum_bp" + argDescriptor { + name: "gradX" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradY" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12105,18 +12172,17 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradX" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradY" - argType: OUTPUT_TENSOR - argIndex: 1 - } } opList { name: "mirror_pad" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "isSymmetric" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12126,25 +12192,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "mode" + argType: INT64 + } argDescriptor { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "isSymmetric" - argType: BOOL - } +} +opList { + name: "mish" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "mode" - argType: INT64 + name: "inPlace" + argType: BOOL } -} -opList { - name: "mish" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12153,18 +12219,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "mod" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12178,18 +12244,23 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "mod_bp" + argDescriptor { + name: "gradX" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradY" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12208,22 +12279,22 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradX" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradY" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "inPlace" - argType: BOOL - } } opList { name: "moments" + argDescriptor { + name: "keepDims" + argType: DOUBLE + } + argDescriptor { + name: "means" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "variances" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12238,47 +12309,46 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "means" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "variances" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "keepDims" - argType: DOUBLE - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "mul_scalar" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: LEGACY_XYZ } opList { name: "multi_head_dot_product_attention" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "scaled" + argType: BOOL + } + argDescriptor { + name: "withWeights" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "queries" argType: INPUT_TENSOR @@ -12318,23 +12388,6 @@ opList { argType: INPUT_TENSOR argIndex: 7 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "scaled" - argType: BOOL - } - argDescriptor { - name: "withWeights" - argType: BOOL - argIndex: 1 - } argDescriptor { name: "normalization" argType: INT64 @@ -12344,9 +12397,51 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "multi_head_dot_product_attention_bp" + argDescriptor { + name: "dLdq" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "dLdk" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "dLdv" + argType: OUTPUT_TENSOR + argIndex: 2 + } + argDescriptor { + name: "dLdWq" + argType: OUTPUT_TENSOR + argIndex: 3 + } + argDescriptor { + name: "dLdWk" + argType: OUTPUT_TENSOR + argIndex: 4 + } + argDescriptor { + name: "dLdWv" + argType: OUTPUT_TENSOR + argIndex: 5 + } + argDescriptor { + name: "dLdWo" + argType: OUTPUT_TENSOR + argIndex: 6 + } + argDescriptor { + name: "scaled" + argType: BOOL + } argDescriptor { name: "queries" argType: INPUT_TENSOR @@ -12391,55 +12486,25 @@ opList { argType: INPUT_TENSOR argIndex: 8 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "dLdq" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dLdk" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dLdv" - argType: OUTPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "dLdWq" - argType: OUTPUT_TENSOR - argIndex: 3 - } - argDescriptor { - name: "dLdWk" - argType: OUTPUT_TENSOR - argIndex: 4 - } - argDescriptor { - name: "dLdWv" - argType: OUTPUT_TENSOR - argIndex: 5 - } - argDescriptor { - name: "dLdWo" - argType: OUTPUT_TENSOR - argIndex: 6 - } - argDescriptor { - name: "scaled" - argType: BOOL - } argDescriptor { name: "normalization" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "multiply" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12453,18 +12518,23 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "multiply_bp" + argDescriptor { + name: "gradX" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradY" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12483,22 +12553,42 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "nadam_updater" argDescriptor { - name: "gradX" + name: "dLr" + argType: DOUBLE + } + argDescriptor { + name: "dBeta1" + argType: DOUBLE + argIndex: 1 + } + argDescriptor { + name: "dBeta2" + argType: DOUBLE + argIndex: 2 + } + argDescriptor { + name: "dEpsilon" + argType: DOUBLE + argIndex: 3 + } + argDescriptor { + name: "update" argType: OUTPUT_TENSOR } argDescriptor { - name: "gradY" + name: "stateV" argType: OUTPUT_TENSOR argIndex: 1 } argDescriptor { - name: "inPlace" - argType: BOOL + name: "stateM" + argType: OUTPUT_TENSOR + argIndex: 2 } -} -opList { - name: "nadam_updater" argDescriptor { name: "gradient" argType: INPUT_TENSOR @@ -12533,39 +12623,6 @@ opList { argType: INPUT_TENSOR argIndex: 6 } - argDescriptor { - name: "update" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "stateV" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "stateM" - argType: OUTPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "dLr" - argType: DOUBLE - } - argDescriptor { - name: "dBeta1" - argType: DOUBLE - argIndex: 1 - } - argDescriptor { - name: "dBeta2" - argType: DOUBLE - argIndex: 2 - } - argDescriptor { - name: "dEpsilon" - argType: DOUBLE - argIndex: 3 - } argDescriptor { name: "iteration" argType: INT64 @@ -12574,6 +12631,14 @@ opList { } opList { name: "neg" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12582,18 +12647,28 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "nesterovs_updater" + argDescriptor { + name: "dLr" + argType: DOUBLE + } + argDescriptor { + name: "dMomentum" + argType: DOUBLE + argIndex: 1 + } + argDescriptor { + name: "update" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "stateV" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "gradient" argType: INPUT_TENSOR @@ -12613,28 +12688,14 @@ opList { argType: INPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "update" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "stateV" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dLr" - argType: DOUBLE - } - argDescriptor { - name: "dMomentum" - argType: DOUBLE - argIndex: 1 - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "next_iteration" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "frameName" argType: STRING @@ -12643,13 +12704,13 @@ opList { name: "input" argType: INPUT_TENSOR } +} +opList { + name: "non_max_suppression" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "non_max_suppression" argDescriptor { name: "boxes" argType: INPUT_TENSOR @@ -12665,7 +12726,7 @@ opList { argIndex: 2 } argDescriptor { - name: "overlayThreshold" + name: "iouThreshold" argType: INPUT_TENSOR argIndex: 3 } @@ -12674,62 +12735,17 @@ opList { argType: INPUT_TENSOR argIndex: 4 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "iouThreshold" - argType: DOUBLE - } - argDescriptor { - name: "scoreThreshold" - argType: DOUBLE - argIndex: 1 - } argDescriptor { name: "maxOutputSize" argType: INT64 } -} -opList { - name: "non_max_suppression_overlaps" - argDescriptor { - name: "boxes" - argType: INPUT_TENSOR - } - argDescriptor { - name: "scales" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "maxOutSize" - argType: INPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "iouThreshold" - argType: INPUT_TENSOR - argIndex: 3 - } - argDescriptor { - name: "scoreThreshold" - argType: INPUT_TENSOR - argIndex: 4 - } argDescriptor { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } +} +opList { + name: "non_max_suppression_overlaps" argDescriptor { name: "overlapThreshold" argType: DOUBLE @@ -12740,12 +12756,9 @@ opList { argIndex: 1 } argDescriptor { - name: "maxOutputSize" - argType: INT64 + name: "outputs" + argType: OUTPUT_TENSOR } -} -opList { - name: "non_max_suppression_v3" argDescriptor { name: "boxes" argType: INPUT_TENSOR @@ -12770,33 +12783,76 @@ opList { argType: INPUT_TENSOR argIndex: 4 } + argDescriptor { + name: "maxOutputSize" + argType: INT64 + } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "non_max_suppression_v3" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "boxes" + argType: INPUT_TENSOR + } + argDescriptor { + name: "scales" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "maxOutSize" + argType: INPUT_TENSOR + argIndex: 2 + } + argDescriptor { + name: "iouThreshold" + argType: INPUT_TENSOR + argIndex: 3 + } + argDescriptor { + name: "scoreThreshold" + argType: INPUT_TENSOR + argIndex: 4 + } argDescriptor { name: "maxOutputSize" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "noop" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: OP_IMPL } opList { name: "norm" + argDescriptor { + name: "mode" + argType: DOUBLE + } + argDescriptor { + name: "*output" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12806,18 +12862,23 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "mode" - argType: DOUBLE - } opDeclarationType: REDUCTION_OP_IMPL } opList { name: "normalize_moments" + argDescriptor { + name: "shift" + argType: DOUBLE + } + argDescriptor { + name: "resMeans" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "resVariances" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "counts" argType: INPUT_TENSOR @@ -12832,26 +12893,31 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "outMean" + argType: INPUT_TENSOR + argIndex: 3 + } + argDescriptor { + name: "outVar" + argType: INPUT_TENSOR + argIndex: 4 + } argDescriptor { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "resMeans" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "resVariances" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "shift" - argType: DOUBLE - } } opList { name: "not" + argDescriptor { + name: "comparable" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12865,18 +12931,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "comparable" - argType: DOUBLE - } opDeclarationType: LEGACY_XYZ } opList { name: "not_equals" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12890,50 +12956,50 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_BOOL_OP_IMPL } opList { name: "not_scalar" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "notequals_scalar" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "nth_element" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "reverse" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12943,25 +13009,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "reverse" + argType: INT64 + } argDescriptor { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "reverse" - argType: BOOL - } +} +opList { + name: "old_assign" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "reverse" - argType: INT64 + name: "inPlace" + argType: BOOL } -} -opList { - name: "old_assign" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12970,18 +13036,23 @@ opList { name: "dataType" argType: DATA_TYPE } + opDeclarationType: LEGACY_XYZ +} +opList { + name: "onehot" argDescriptor { - name: "inPlace" - argType: BOOL + name: "on" + argType: DOUBLE + } + argDescriptor { + name: "off" + argType: DOUBLE + argIndex: 1 } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } - opDeclarationType: LEGACY_XYZ -} -opList { - name: "onehot" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13001,23 +13072,6 @@ opList { argType: INPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "on" - argType: DOUBLE - } - argDescriptor { - name: "off" - argType: DOUBLE - argIndex: 1 - } argDescriptor { name: "dimensions" argType: INT64 @@ -13032,48 +13086,60 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "oneminus" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE } opDeclarationType: LEGACY_XYZ } opList { name: "ones_as" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "dataType" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "or" + argDescriptor { + name: "comparable" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13087,34 +13153,30 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "comparable" - argType: DOUBLE - } opDeclarationType: LEGACY_XYZ } opList { name: "or_scalar" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "order" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13123,13 +13185,17 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "pad" + argDescriptor { + name: "padValue" + argType: DOUBLE + } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "pad" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13139,25 +13205,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "padValue" - argType: DOUBLE - } argDescriptor { name: "mode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "parallel_stack" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13171,25 +13233,9 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "percentile" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "q" argType: DOUBLE @@ -13205,36 +13251,52 @@ opList { argIndex: 2 } argDescriptor { - name: "dimensions" - argType: INT64 + name: "outputs" + argType: OUTPUT_TENSOR } -} -opList { - name: "permute" argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "permutationVector" - argType: INPUT_TENSOR - argIndex: 1 + name: "dimensions" + argType: INT64 } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "permute" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "permuteDims" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "reverseDims" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "pick_list" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "list" argType: INPUT_TENSOR @@ -13244,14 +13306,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LIST_OP_IMPL } opList { name: "pnormpool2d" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13260,10 +13322,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kY" argType: INT64 @@ -13321,6 +13379,14 @@ opList { } opList { name: "pnormpool2d_bp" + argDescriptor { + name: "eps" + argType: DOUBLE + } + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13334,14 +13400,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "eps" - argType: DOUBLE - } argDescriptor { name: "kH" argType: INT64 @@ -13399,6 +13457,10 @@ opList { } opList { name: "pointwise_conv2d" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13413,14 +13475,6 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "isNCHW" argType: INT64 @@ -13430,9 +13484,17 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "polygamma" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "n" argType: INPUT_TENSOR @@ -13442,14 +13504,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "pooling3dpool3dnew_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13459,17 +13525,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } +} +opList { + name: "pow" argDescriptor { - name: "inPlace" - argType: BOOL + name: "pow" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "pow" + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13479,22 +13549,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "inPlace" - argType: BOOL - } + opDeclarationType: LEGACY_XYZ +} +opList { + name: "pow_pairwise" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "pow" - argType: DOUBLE + name: "inPlace" + argType: BOOL } - opDeclarationType: LEGACY_XYZ -} -opList { - name: "pow_pairwise" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13508,25 +13574,13 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "precise_gelu" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" @@ -13538,13 +13592,21 @@ opList { argIndex: 1 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE } opDeclarationType: LEGACY_XYZ } opList { name: "prelu" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13554,10 +13616,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "sharedAxes" argType: INT64 @@ -13566,6 +13624,15 @@ opList { } opList { name: "prelu_bp" + argDescriptor { + name: "dLdI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "dLdA" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13590,15 +13657,6 @@ opList { argType: INPUT_TENSOR argIndex: 4 } - argDescriptor { - name: "dLdI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dLdA" - argType: OUTPUT_TENSOR - argIndex: 1 - } argDescriptor { name: "sharedAxes" argType: INT64 @@ -13607,6 +13665,10 @@ opList { } opList { name: "print_affinity" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13615,13 +13677,17 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "print_variable" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "print_variable" + argDescriptor { + name: "printSpecial" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13635,17 +13701,17 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "probablistic_merge" argDescriptor { - name: "printSpecial" - argType: BOOL + name: "probability" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "probablistic_merge" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13655,30 +13721,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "probability" - argType: DOUBLE - } opDeclarationType: LEGACY_XYZ } opList { name: "qr" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "fullMatricies" - argType: BOOL - } argDescriptor { name: "outputQ" argType: OUTPUT_TENSOR @@ -13688,9 +13734,10 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } -} -opList { - name: "random_bernoulli" + argDescriptor { + name: "fullMatricies" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13699,17 +13746,32 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "random_bernoulli" + argDescriptor { + name: "f" + argType: DOUBLE + } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "f" - argType: DOUBLE + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dtype" + argType: DATA_TYPE } } opList { name: "random_crop" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13719,40 +13781,40 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "seed" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "random_exponential" argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "lambda" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "lambda" - argType: DOUBLE - } argDescriptor { name: "shape" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "random_gamma" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "shape" argType: INPUT_TENSOR @@ -13767,21 +13829,21 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "seed" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "random_multinomial" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13791,21 +13853,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimC" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "random_normal" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13814,13 +13876,13 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "random_poisson" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "random_poisson" argDescriptor { name: "shape" argType: INPUT_TENSOR @@ -13830,29 +13892,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "seed" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "random_shuffle" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "seeds" argType: INT64 @@ -13861,14 +13919,6 @@ opList { } opList { name: "randomnormal" - argDescriptor { - name: "shape" - argType: INPUT_TENSOR - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "mean" argType: DOUBLE @@ -13878,9 +13928,30 @@ opList { argType: DOUBLE argIndex: 1 } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "shape" + argType: INPUT_TENSOR + } } opList { name: "randomuniform" + argDescriptor { + name: "min" + argType: DOUBLE + } + argDescriptor { + name: "max" + argType: DOUBLE + argIndex: 1 + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "shape" argType: INPUT_TENSOR @@ -13895,64 +13966,47 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "min" - argType: DOUBLE - } - argDescriptor { - name: "max" - argType: DOUBLE - argIndex: 1 - } argDescriptor { name: "dtype" argType: INT64 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } } opList { name: "range" argDescriptor { name: "from" - argType: INPUT_TENSOR + argType: DOUBLE } argDescriptor { name: "to" - argType: INPUT_TENSOR + argType: DOUBLE argIndex: 1 } argDescriptor { name: "step" - argType: INPUT_TENSOR + argType: DOUBLE argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { name: "from" - argType: DOUBLE + argType: INPUT_TENSOR } argDescriptor { name: "to" - argType: DOUBLE + argType: INPUT_TENSOR argIndex: 1 } argDescriptor { name: "step" - argType: DOUBLE + argType: INPUT_TENSOR argIndex: 2 } argDescriptor { @@ -13969,9 +14023,21 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "rank" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13980,17 +14046,17 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } +} +opList { + name: "rational_tanh" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "rational_tanh" + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13999,18 +14065,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "rational_tanh_derivative" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14019,30 +14085,26 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "rationaltanh" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "rationaltanh_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14052,14 +14114,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "rdiv_scalar" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14069,14 +14131,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "read_list" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "list" argType: INPUT_TENSOR @@ -14086,22 +14148,26 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "importDataType" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "index" argType: INT64 } + argDescriptor { + name: "importDataType" + argType: DATA_TYPE + } opDeclarationType: LIST_OP_IMPL } opList { name: "realdiv" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14115,18 +14181,19 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "realdiv_bp" + argDescriptor { + name: "gradX" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradY" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14145,18 +14212,17 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradX" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradY" - argType: OUTPUT_TENSOR - argIndex: 1 - } } opList { name: "rectified_tanh" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14165,18 +14231,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "rectified_tanh_derivative" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14185,30 +14251,26 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "rectifiedtanh" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "rectifiedtanh_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14218,14 +14280,23 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "reduce_dot_bp" + argDescriptor { + name: "gradX" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradY" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14250,30 +14321,29 @@ opList { argType: INPUT_TENSOR argIndex: 4 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradX" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradY" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_logsumexp" + argDescriptor { + name: "keepDims" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDim" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14283,29 +14353,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "keepDims" - argType: BOOL - } - argDescriptor { - name: "keepDims" - argType: DOUBLE - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_max" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14315,25 +14381,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "keepDims" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_max_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14348,25 +14414,25 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_mean" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14376,25 +14442,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "keepDims" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_mean_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14409,25 +14475,25 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_min" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14437,25 +14503,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "keepDims" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_min_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14470,25 +14536,25 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_norm1" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14498,25 +14564,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "keepDims" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_norm1_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14531,25 +14597,25 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_norm2" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14559,25 +14625,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "keepDims" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_norm2_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14592,25 +14658,25 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_norm_max" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14624,17 +14690,17 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "reduce_norm_max_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } argDescriptor { name: "keepDims" argType: BOOL } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } -} -opList { - name: "reduce_norm_max_bp" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14649,36 +14715,33 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_normmax" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -14688,6 +14751,14 @@ opList { } opList { name: "reduce_prod" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14697,25 +14768,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "keepDims" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_prod_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14730,25 +14801,25 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_sqnorm" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14758,25 +14829,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_sqnorm_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14791,25 +14862,30 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_stdev" + argDescriptor { + name: "keepDims" + argType: DOUBLE + } + argDescriptor { + name: "biasCorrected" + argType: DOUBLE + argIndex: 1 + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14823,40 +14899,18 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "keepDims" - argType: DOUBLE - } - argDescriptor { - name: "biasCorrected" - argType: DOUBLE - argIndex: 1 - } } opList { name: "reduce_stdev_bp" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "keepDims" + argType: DOUBLE } argDescriptor { - name: "gradO" - argType: INPUT_TENSOR + name: "biasCorrected" + argType: DOUBLE argIndex: 1 } - argDescriptor { - name: "dimensions" - argType: INPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "gradI" argType: OUTPUT_TENSOR @@ -14871,21 +14925,38 @@ opList { argIndex: 1 } argDescriptor { - name: "keepDims" - argType: DOUBLE + name: "input" + argType: INPUT_TENSOR } argDescriptor { - name: "biasCorrected" - argType: DOUBLE + name: "gradO" + argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_sum" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14895,25 +14966,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "keepDims" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_sum_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14928,42 +14999,46 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_variance" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "keepDims" + argType: DOUBLE } argDescriptor { - name: "dimensions" - argType: INPUT_TENSOR + name: "biasCorrected" + argType: DOUBLE argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } +} +opList { + name: "reduce_variance_bp" argDescriptor { name: "keepDims" argType: DOUBLE @@ -14973,27 +15048,6 @@ opList { argType: DOUBLE argIndex: 1 } -} -opList { - name: "reduce_variance_bp" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "gradO" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dimensions" - argType: INPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "gradI" argType: OUTPUT_TENSOR @@ -15008,61 +15062,82 @@ opList { argIndex: 1 } argDescriptor { - name: "keepDims" - argType: DOUBLE + name: "input" + argType: INPUT_TENSOR } argDescriptor { - name: "biasCorrected" - argType: DOUBLE + name: "gradO" + argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "relu" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "cutoff" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "cutoff" - argType: DOUBLE + name: "input" + argType: INPUT_TENSOR } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "relu6" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "inPlace" - argType: BOOL + name: "cutoff" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "cutoff" - argType: DOUBLE + name: "inPlace" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dtype" + argType: DATA_TYPE } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "relu6_bp" + argDescriptor { + name: "cutoff" + argType: DOUBLE + } + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15072,18 +15147,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "cutoff" - argType: DOUBLE - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "relu_bp" + argDescriptor { + name: "scalar" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15093,18 +15168,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "scalar" - argType: DOUBLE - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "relu_layer" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15123,13 +15194,17 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "remainder" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "remainder" + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15143,18 +15218,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "remainder_scalar" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15164,53 +15235,53 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "repeat" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "replace_nans" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "set" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "set" - argType: DOUBLE + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "reshape" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15220,21 +15291,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "shapeArr" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reshapeas" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15248,13 +15319,17 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "resize_area" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "resize_area" + argDescriptor { + name: "alignCorners" + argType: BOOL + } argDescriptor { name: "image" argType: INPUT_TENSOR @@ -15264,18 +15339,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "alignCorners" - argType: BOOL - } argDescriptor { name: "height" argType: INT64 @@ -15285,22 +15348,13 @@ opList { argType: INT64 argIndex: 1 } -} -opList { - name: "resize_bicubic" - argDescriptor { - name: "image" - argType: INPUT_TENSOR - } - argDescriptor { - name: "size" - argType: INPUT_TENSOR - argIndex: 1 - } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "resize_bicubic" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -15314,15 +15368,12 @@ opList { argType: BOOL argIndex: 1 } -} -opList { - name: "resize_bilinear" argDescriptor { name: "image" argType: INPUT_TENSOR } argDescriptor { - name: "newImageSize" + name: "size" argType: INPUT_TENSOR argIndex: 1 } @@ -15330,6 +15381,9 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "resize_bilinear" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -15339,10 +15393,19 @@ opList { argType: BOOL } argDescriptor { - name: "halfPixelCenters" + name: "halfPixelCenter" argType: BOOL argIndex: 1 } + argDescriptor { + name: "image" + argType: INPUT_TENSOR + } + argDescriptor { + name: "newImageSize" + argType: INPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "height" argType: INT64 @@ -15352,9 +15415,26 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "resize_images" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "alignCorners" + argType: BOOL + } + argDescriptor { + name: "preserveAspectRatio" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "image" argType: INPUT_TENSOR @@ -15373,35 +15453,9 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "alignCorners" - argType: BOOL - } - argDescriptor { - name: "preserveAspectRatio" - argType: BOOL - argIndex: 1 - } } opList { name: "resize_nearest_neighbor" - argDescriptor { - name: "image" - argType: INPUT_TENSOR - } - argDescriptor { - name: "newImageSize" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -15415,6 +15469,15 @@ opList { argType: BOOL argIndex: 1 } + argDescriptor { + name: "image" + argType: INPUT_TENSOR + } + argDescriptor { + name: "newImageSize" + argType: INPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "height" argType: INT64 @@ -15424,6 +15487,10 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "restorev2" @@ -15434,6 +15501,10 @@ opList { } opList { name: "reverse" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15443,10 +15514,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 @@ -15455,6 +15522,10 @@ opList { } opList { name: "reverse_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15469,21 +15540,21 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reverse_sequence" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15493,14 +15564,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "seqDim" argType: INT64 @@ -15510,20 +15573,32 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reverse_v2" - argDescriptor { - name: "isLegacy" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "isLegacy" + argType: BOOL + } } opList { name: "reversedivide" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15537,36 +15612,10 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "reversedivide_bp" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "epsNext" - argType: INPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "gradX" argType: OUTPUT_TENSOR @@ -15580,26 +15629,6 @@ opList { name: "inPlace" argType: BOOL } -} -opList { - name: "reversemod" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - opDeclarationType: BROADCASTABLE_OP_IMPL -} -opList { - name: "reversemod_bp" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15618,6 +15647,26 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "reversemod" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "y" + argType: INPUT_TENSOR + argIndex: 1 + } + opDeclarationType: BROADCASTABLE_OP_IMPL +} +opList { + name: "reversemod_bp" argDescriptor { name: "gradX" argType: OUTPUT_TENSOR @@ -15627,9 +15676,35 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "y" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "epsNext" + argType: INPUT_TENSOR + argIndex: 2 + } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reversesubtract" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15643,18 +15718,23 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "reversesubtract_bp" + argDescriptor { + name: "gradX" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradY" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15673,49 +15753,36 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradX" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradY" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "inPlace" - argType: BOOL - } } opList { name: "rgb_to_grs" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "dimC" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "rgb_to_hsv" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "dimC" argType: INT64 @@ -15724,14 +15791,14 @@ opList { } opList { name: "rgb_to_yiq" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "dimC" argType: INT64 @@ -15740,14 +15807,14 @@ opList { } opList { name: "rgb_to_yuv" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "dimC" argType: INT64 @@ -15756,6 +15823,14 @@ opList { } opList { name: "rint" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15764,18 +15839,33 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "rms_prop_updater" + argDescriptor { + name: "dLr" + argType: DOUBLE + } + argDescriptor { + name: "dRmsDecay" + argType: DOUBLE + argIndex: 1 + } + argDescriptor { + name: "dEpsilon" + argType: DOUBLE + argIndex: 2 + } + argDescriptor { + name: "update" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "stateG" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "gradient" argType: INPUT_TENSOR @@ -15800,33 +15890,14 @@ opList { argType: INPUT_TENSOR argIndex: 4 } - argDescriptor { - name: "update" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "stateG" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dLr" - argType: DOUBLE - } - argDescriptor { - name: "dRmsDecay" - argType: DOUBLE - argIndex: 1 - } - argDescriptor { - name: "dEpsilon" - argType: DOUBLE - argIndex: 2 - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "roll" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15841,10 +15912,6 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "shift" argType: INT64 @@ -15853,6 +15920,14 @@ opList { } opList { name: "round" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15861,18 +15936,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "rshift_bits" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15886,18 +15961,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "rsqrt" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15906,29 +15981,21 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "rsub_scalar" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } @@ -15941,6 +16008,10 @@ opList { } opList { name: "scalar_min" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15950,14 +16021,23 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "scatter_add" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "lock" + argType: BOOL + } + argDescriptor { + name: "checkIndices" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15972,23 +16052,23 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "lock" - argType: BOOL - } - argDescriptor { - name: "checkIndices" - argType: BOOL - argIndex: 1 - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "scatter_div" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "lock" + argType: BOOL + } + argDescriptor { + name: "checkIndices" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16003,23 +16083,14 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "lock" - argType: BOOL - } - argDescriptor { - name: "checkIndices" - argType: BOOL - argIndex: 1 - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "scatter_list" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "list" argType: INPUT_TENSOR @@ -16035,13 +16106,26 @@ opList { argIndex: 2 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "dtype" + argType: DATA_TYPE } opDeclarationType: LIST_OP_IMPL } opList { name: "scatter_max" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "lock" + argType: BOOL + } + argDescriptor { + name: "checkIndices" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16056,23 +16140,23 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "lock" - argType: BOOL - } - argDescriptor { - name: "checkIndices" - argType: BOOL - argIndex: 1 - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "scatter_min" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "lock" + argType: BOOL + } + argDescriptor { + name: "checkIndices" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16087,23 +16171,23 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "lock" - argType: BOOL - } - argDescriptor { - name: "checkIndices" - argType: BOOL - argIndex: 1 - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "scatter_mul" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "lock" + argType: BOOL + } + argDescriptor { + name: "checkIndices" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16118,6 +16202,14 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + opDeclarationType: OP_IMPL +} +opList { + name: "scatter_nd" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "lock" argType: BOOL @@ -16127,14 +16219,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - opDeclarationType: OP_IMPL -} -opList { - name: "scatter_nd" argDescriptor { name: "indices" argType: INPUT_TENSOR @@ -16153,6 +16237,9 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "scatter_nd_add" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -16166,9 +16253,6 @@ opList { argType: BOOL argIndex: 1 } -} -opList { - name: "scatter_nd_add" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16183,23 +16267,23 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "lock" - argType: BOOL - } - argDescriptor { - name: "checkIndices" - argType: BOOL - argIndex: 1 - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "scatter_nd_sub" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "lock" + argType: BOOL + } + argDescriptor { + name: "checkIndices" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16214,23 +16298,23 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "lock" - argType: BOOL - } - argDescriptor { - name: "checkIndices" - argType: BOOL - argIndex: 1 - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "scatter_nd_update" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "lock" + argType: BOOL + } + argDescriptor { + name: "checkIndices" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16245,23 +16329,23 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "lock" - argType: BOOL - } - argDescriptor { - name: "checkIndices" - argType: BOOL - argIndex: 1 - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "scatter_sub" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "lock" + argType: BOOL + } + argDescriptor { + name: "checkIndices" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16276,23 +16360,23 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "lock" - argType: BOOL - } - argDescriptor { - name: "checkIndices" - argType: BOOL - argIndex: 1 - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "scatter_upd" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "lock" + argType: BOOL + } + argDescriptor { + name: "checkIndices" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16307,23 +16391,14 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "lock" - argType: BOOL - } - argDescriptor { - name: "checkIndices" - argType: BOOL - argIndex: 1 - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "scatter_update" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "operand" argType: INPUT_TENSOR @@ -16333,10 +16408,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "indices" argType: INT64 @@ -16350,6 +16421,10 @@ opList { } opList { name: "sconv2d" + argDescriptor { + name: "*output" + argType: OUTPUT_TENSOR + } argDescriptor { name: "*input" argType: INPUT_TENSOR @@ -16360,23 +16435,14 @@ opList { argIndex: 1 } argDescriptor { - name: "weightsPoint" + name: "bias" argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "bias" - argType: INPUT_TENSOR - argIndex: 3 - } argDescriptor { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "*output" - argType: OUTPUT_TENSOR - } argDescriptor { name: "kH" argType: INT64 @@ -16434,29 +16500,6 @@ opList { } opList { name: "sconv2d_bp" - argDescriptor { - name: "*input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "*gradO" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "*weightsDepth" - argType: INPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "bias" - argType: INPUT_TENSOR - argIndex: 3 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "*gradI" argType: OUTPUT_TENSOR @@ -16476,6 +16519,29 @@ opList { argType: OUTPUT_TENSOR argIndex: 3 } + argDescriptor { + name: "*input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "*gradO" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "*weightsDepth" + argType: INPUT_TENSOR + argIndex: 2 + } + argDescriptor { + name: "weightsPoint" + argType: INPUT_TENSOR + argIndex: 3 + } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -16533,6 +16599,10 @@ opList { } opList { name: "segment_max" + argDescriptor { + name: "segmentedOutput" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16546,13 +16616,18 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "segmentedOutput" - argType: OUTPUT_TENSOR - } } opList { name: "segment_max_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "outIndices" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16571,18 +16646,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "outIndices" - argType: OUTPUT_TENSOR - argIndex: 1 - } } opList { name: "segment_mean" + argDescriptor { + name: "segmentedOutput" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16596,13 +16666,18 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "segmentedOutput" - argType: OUTPUT_TENSOR - } } opList { name: "segment_mean_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "outIndices" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16621,18 +16696,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "outIndices" - argType: OUTPUT_TENSOR - argIndex: 1 - } } opList { name: "segment_min" + argDescriptor { + name: "segmentedOutput" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16646,13 +16716,18 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "segmentedOutput" - argType: OUTPUT_TENSOR - } } opList { name: "segment_min_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "outIndices" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16671,18 +16746,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "outIndices" - argType: OUTPUT_TENSOR - argIndex: 1 - } } opList { name: "segment_prod" + argDescriptor { + name: "segmentedOutput" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16696,13 +16766,18 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "segmentedOutput" - argType: OUTPUT_TENSOR - } } opList { name: "segment_prod_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "outIndices" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16721,18 +16796,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "outIndices" - argType: OUTPUT_TENSOR - argIndex: 1 - } } opList { name: "segment_sum" + argDescriptor { + name: "segmentedOutput" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16746,13 +16816,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "segmentedOutput" - argType: OUTPUT_TENSOR - } } opList { name: "segment_sum_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "data" argType: INPUT_TENSOR @@ -16771,13 +16841,13 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "select" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "select" argDescriptor { name: "cond" argType: INPUT_TENSOR @@ -16796,13 +16866,17 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "selu" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "selu" + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16811,18 +16885,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "selu_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16832,14 +16902,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "seluderivative" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16848,18 +16922,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "sequence_mask" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "is_static_maxlen" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16869,102 +16943,72 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "is_static_maxlen" - argType: BOOL - } argDescriptor { name: "maxInd" argType: INT64 } argDescriptor { - name: "dataType" - argType: INT64 - argIndex: 1 + name: "dtype" + argType: DATA_TYPE } } opList { name: "set" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 - } argDescriptor { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "set_scalar" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "set_seed" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "seed" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "setrange" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "min" argType: DOUBLE @@ -16974,26 +17018,50 @@ opList { argType: DOUBLE argIndex: 1 } - opDeclarationType: LEGACY_XYZ -} -opList { - name: "setvalorless_scalar" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } + opDeclarationType: LEGACY_XYZ +} +opList { + name: "setvalorless_scalar" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: LEGACY_XYZ } opList { name: "sgd_updater" + argDescriptor { + name: "lr" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17003,34 +17071,26 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "lr" - argType: DOUBLE - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "shannonentropy" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "keepDims" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 } argDescriptor { name: "dimensions" @@ -17041,24 +17101,32 @@ opList { opList { name: "shape_of" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dtype" + argType: DATA_TYPE } } opList { name: "shapes_of" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17067,17 +17135,17 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } +} +opList { + name: "shift_bits" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "shift_bits" + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17091,51 +17159,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "sigm_cross_entropy_loss" argDescriptor { - name: "logits" - argType: INPUT_TENSOR - } - argDescriptor { - name: "weights" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "labels" - argType: INPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "labelsSmoothing" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "labelsSmoothing" - argType: DOUBLE - } - argDescriptor { - name: "reductionMode" - argType: INT64 - } -} -opList { - name: "sigm_cross_entropy_loss_grad" argDescriptor { name: "logits" argType: INPUT_TENSOR @@ -17150,10 +17185,21 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "reductionMode" + argType: INT64 + } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "sigm_cross_entropy_loss_grad" + argDescriptor { + name: "labelSmoothing" + argType: DOUBLE + } argDescriptor { name: "dLdp" argType: OUTPUT_TENSOR @@ -17169,16 +17215,38 @@ opList { argIndex: 2 } argDescriptor { - name: "labelSmoothing" - argType: DOUBLE + name: "logits" + argType: INPUT_TENSOR + } + argDescriptor { + name: "weights" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "labels" + argType: INPUT_TENSOR + argIndex: 2 } argDescriptor { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sigmoid" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17187,18 +17255,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "sigmoid_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17208,14 +17272,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "sign" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17224,38 +17292,38 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "sin" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE } opDeclarationType: LEGACY_XYZ } opList { name: "sinh" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17264,18 +17332,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "size" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17284,44 +17348,53 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "size_at" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "size_list" - argDescriptor { - name: "list" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "list" + argType: INPUT_TENSOR + } opDeclarationType: LIST_OP_IMPL } opList { name: "skipgram" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "isInference" + argType: BOOL + } + argDescriptor { + name: "isPreciseMode" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "target" argType: INPUT_TENSOR @@ -17381,19 +17454,6 @@ opList { argType: INPUT_TENSOR argIndex: 11 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "isInference" - argType: BOOL - } - argDescriptor { - name: "isPreciseMode" - argType: BOOL - argIndex: 1 - } argDescriptor { name: "numWorkers" argType: INT64 @@ -17407,6 +17467,10 @@ opList { } opList { name: "slice" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17421,21 +17485,21 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "size" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "slice_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17459,41 +17523,37 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "size" - argType: INT64 - } } opList { name: "softmax" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "dimension" argType: INT64 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "softmax_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17503,10 +17563,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimension" argType: INT64 @@ -17516,38 +17572,13 @@ opList { opList { name: "softmax_cross_entropy_loss" argDescriptor { - name: "logits" - argType: INPUT_TENSOR - } - argDescriptor { - name: "weights" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "labels" - argType: INPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "labelsSmoothing" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "labelsSmoothing" - argType: DOUBLE - } - argDescriptor { - name: "reductionMode" - argType: INT64 - } -} -opList { - name: "softmax_cross_entropy_loss_grad" argDescriptor { name: "logits" argType: INPUT_TENSOR @@ -17562,10 +17593,21 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "reductionMode" + argType: INT64 + } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "softmax_cross_entropy_loss_grad" + argDescriptor { + name: "labelsSmoothing" + argType: DOUBLE + } argDescriptor { name: "dLdp" argType: OUTPUT_TENSOR @@ -17581,40 +17623,34 @@ opList { argIndex: 2 } argDescriptor { - name: "labelsSmoothing" - argType: DOUBLE + name: "logits" + argType: INPUT_TENSOR + } + argDescriptor { + name: "weights" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "labels" + argType: INPUT_TENSOR + argIndex: 2 } argDescriptor { name: "reductionMode" argType: INT64 } -} -opList { - name: "softmax_cross_entropy_loss_with_logits" - argDescriptor { - name: "logits" - argType: INPUT_TENSOR - } - argDescriptor { - name: "labels" - argType: INPUT_TENSOR - argIndex: 1 - } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "softmax_cross_entropy_loss_with_logits" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "classesDim" - argType: INT64 - } -} -opList { - name: "softmax_cross_entropy_loss_with_logits_grad" argDescriptor { name: "logits" argType: INPUT_TENSOR @@ -17624,10 +17660,17 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "classesDim" + argType: INT64 + } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "softmax_cross_entropy_loss_with_logits_grad" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -17637,13 +17680,34 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "logits" + argType: INPUT_TENSOR + } + argDescriptor { + name: "labels" + argType: INPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "classesDim" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "softplus" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17652,18 +17716,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "softplus_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17673,14 +17733,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "softsign" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17689,18 +17753,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "softsign_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17710,14 +17770,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "softsignderivative" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17726,18 +17790,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "solve" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "useAdjoint" + argType: BOOL + } argDescriptor { name: "a" argType: INPUT_TENSOR @@ -17756,17 +17820,21 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "solve_ls" argDescriptor { - name: "useAdjoint" - argType: BOOL + name: "l2_factor" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "solve_ls" + argDescriptor { + name: "fastFlag" + argType: BOOL + } argDescriptor { name: "a" argType: INPUT_TENSOR @@ -17780,32 +17848,24 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "fastFlag" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "l2_factor" - argType: DOUBLE - } } opList { name: "somepoolingpool2d" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } } opList { name: "somepoolingpool2d_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17815,13 +17875,13 @@ opList { argType: INPUT_TENSOR argIndex: 1 } +} +opList { + name: "space_to_batch" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "space_to_batch" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17831,25 +17891,35 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "blockSize" + argType: INT64 + } + argDescriptor { + name: "paddingTop" + argType: INT64 + argIndex: 1 + } + argDescriptor { + name: "paddingBottom" + argType: INT64 + argIndex: 2 + } argDescriptor { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } +} +opList { + name: "space_to_batch_nd" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "blockSize" - argType: INT64 + name: "inPlace" + argType: BOOL } -} -opList { - name: "space_to_batch_nd" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17864,37 +17934,25 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "blocks" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "space_to_depth" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "block_size" argType: INT64 @@ -17904,9 +17962,17 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sparse_softmax_cross_entropy_loss_with_logits" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "labels" argType: INPUT_TENSOR @@ -17920,13 +17986,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "sparse_softmax_cross_entropy_loss_with_logits_grad" + argDescriptor { + name: "dLdp" + argType: OUTPUT_TENSOR + } argDescriptor { name: "labels" argType: INPUT_TENSOR @@ -17940,13 +18006,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "dLdp" - argType: OUTPUT_TENSOR - } } opList { name: "split" + argDescriptor { + name: "outArrs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "a" argType: INPUT_TENSOR @@ -17956,14 +18022,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outArrs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "numSplit" argType: INT64 @@ -17973,9 +18031,17 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "split_list" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "list" argType: INPUT_TENSOR @@ -17991,13 +18057,17 @@ opList { argIndex: 2 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "dtype" + argType: DATA_TYPE } opDeclarationType: LIST_OP_IMPL } opList { name: "split_string" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18011,13 +18081,13 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "split_v" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "split_v" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18032,14 +18102,6 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 @@ -18049,9 +18111,21 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sqrt" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18060,30 +18134,30 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "sqrtm" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "square" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18092,18 +18166,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "squaredsubtract" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18117,18 +18191,19 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "squaredsubtract_bp" + argDescriptor { + name: "gradX" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradY" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18147,18 +18222,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradX" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradY" - argType: OUTPUT_TENSOR - argIndex: 1 - } } opList { name: "squeeze" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18168,21 +18238,26 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "_a" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sru" + argDescriptor { + name: "h" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "c" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18211,18 +18286,18 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "h" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "c" - argType: OUTPUT_TENSOR - argIndex: 1 - } } opList { name: "sruCell" + argDescriptor { + name: "ht" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "ct" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "xt" argType: INPUT_TENSOR @@ -18246,6 +18321,9 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "sru_bi" argDescriptor { name: "ht" argType: OUTPUT_TENSOR @@ -18255,9 +18333,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } -} -opList { - name: "sru_bi" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18286,18 +18361,28 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "ht" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "ct" - argType: OUTPUT_TENSOR - argIndex: 1 - } } opList { name: "sru_bi_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "gradW" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "gradB" + argType: OUTPUT_TENSOR + argIndex: 2 + } + argDescriptor { + name: "gradC0" + argType: OUTPUT_TENSOR + argIndex: 3 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18341,8 +18426,11 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "sru_bp" argDescriptor { - name: "gradI" + name: "gradX" argType: OUTPUT_TENSOR } argDescriptor { @@ -18356,13 +18444,10 @@ opList { argIndex: 2 } argDescriptor { - name: "gradC0" + name: "gradInit" argType: OUTPUT_TENSOR argIndex: 3 } -} -opList { - name: "sru_bp" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18406,44 +18491,9 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradX" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "gradW" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "gradB" - argType: OUTPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "gradInit" - argType: OUTPUT_TENSOR - argIndex: 3 - } } opList { name: "stabilize" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "realMin" argType: DOUBLE @@ -18458,10 +18508,30 @@ opList { argType: DOUBLE argIndex: 2 } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "stack" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18471,33 +18541,37 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "stack_list" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "list" argType: INPUT_TENSOR } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "dtype" + argType: DATA_TYPE } opDeclarationType: LIST_OP_IMPL } opList { name: "standardize" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18507,10 +18581,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 @@ -18519,6 +18589,10 @@ opList { } opList { name: "standardize_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18533,21 +18607,31 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "static_bidirectional_rnn" + argDescriptor { + name: "h" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "hFWFinal" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "hBWFinal" + argType: OUTPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18596,23 +18680,18 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "static_rnn" argDescriptor { name: "h" argType: OUTPUT_TENSOR } argDescriptor { - name: "hFWFinal" + name: "hFinal" argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "hBWFinal" - argType: OUTPUT_TENSOR - argIndex: 2 - } -} -opList { - name: "static_rnn" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18641,21 +18720,12 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "h" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "hFinal" - argType: OUTPUT_TENSOR - argIndex: 1 - } } opList { name: "std" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "biasCorrected" @@ -18667,8 +18737,8 @@ opList { argIndex: 1 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "dimensions" @@ -18679,45 +18749,49 @@ opList { opList { name: "step" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "inPlace" - argType: BOOL + name: "cutoff" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "cutoff" - argType: DOUBLE + name: "inPlace" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "stop_gradient" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE } opDeclarationType: OP_IMPL } opList { name: "strided_slice" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18737,14 +18811,6 @@ opList { argType: INPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "begin_mask" argType: INT64 @@ -18769,9 +18835,17 @@ opList { argType: INT64 argIndex: 4 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "strided_slice_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18796,14 +18870,6 @@ opList { argType: INPUT_TENSOR argIndex: 4 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "begin_mask" argType: INT64 @@ -18828,25 +18894,38 @@ opList { argType: INT64 argIndex: 4 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sub_scalar" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "y" + argType: INPUT_TENSOR + argIndex: 1 } opDeclarationType: LEGACY_XYZ } opList { name: "subtract" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18860,36 +18939,10 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "subtract_bp" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "epsNext" - argType: INPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "gradX" argType: OUTPUT_TENSOR @@ -18903,20 +18956,17 @@ opList { name: "inPlace" argType: BOOL } -} -opList { - name: "sufficient_statistics" argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "dimensions" + name: "y" argType: INPUT_TENSOR argIndex: 1 } argDescriptor { - name: "shift" + name: "epsNext" argType: INPUT_TENSOR argIndex: 2 } @@ -18924,6 +18974,9 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "sufficient_statistics" argDescriptor { name: "dataCount" argType: OUTPUT_TENSOR @@ -18943,17 +18996,27 @@ opList { argType: OUTPUT_TENSOR argIndex: 3 } -} -opList { - name: "svd" argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "shift" + argType: INPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "svd" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -18967,6 +19030,10 @@ opList { argType: BOOL argIndex: 1 } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "fullUV" argType: INT64 @@ -18981,9 +19048,21 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "swish" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18992,18 +19071,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "switch" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "frameName" argType: STRING @@ -19017,13 +19092,17 @@ opList { argType: INPUT_TENSOR argIndex: 1 } +} +opList { + name: "tan" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "tan" + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19032,18 +19111,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "tanderivative" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19052,14 +19127,18 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "tanh" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19068,18 +19147,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "tanh_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19089,14 +19164,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "tear" + argDescriptor { + name: "outE" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19105,32 +19180,6 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outE" - argType: OUTPUT_TENSOR - } -} -opList { - name: "tensorarrayconcatv3" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } -} -opList { - name: "tensorarraysplitv3" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "tensorarrayv3" @@ -19145,32 +19194,23 @@ opList { } opList { name: "tensorarraywritev3" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } } opList { name: "tensordot" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "addedEdges" + name: "transposeX" argType: BOOL } argDescriptor { @@ -19183,6 +19223,15 @@ opList { argType: BOOL argIndex: 2 } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "y" + argType: INPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "dimensionsY" argType: INT64 @@ -19190,6 +19239,10 @@ opList { } opList { name: "tensormmul" + argDescriptor { + name: "c" + argType: OUTPUT_TENSOR + } argDescriptor { name: "a" argType: INPUT_TENSOR @@ -19199,14 +19252,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "c" - argType: OUTPUT_TENSOR - } argDescriptor { name: "axe0_size" argType: INT64 @@ -19216,9 +19261,22 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "tensormmul_bp" + argDescriptor { + name: "dLdA" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "dLdB" + argType: OUTPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "A" argType: INPUT_TENSOR @@ -19233,38 +19291,33 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "dLdA" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dLdB" - argType: OUTPUT_TENSOR - argIndex: 1 - } argDescriptor { name: "axe0Size" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "test_output_reshape" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: OP_IMPL } opList { name: "test_scalar" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19273,33 +19326,20 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "testcustom" - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "testop2i2o" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 - } argDescriptor { name: "xO" argType: OUTPUT_TENSOR @@ -19309,6 +19349,15 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "y" + argType: INPUT_TENSOR + argIndex: 1 + } opDeclarationType: OP_IMPL } opList { @@ -19321,6 +19370,14 @@ opList { } opList { name: "tf_atan2" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "y" argType: INPUT_TENSOR @@ -19334,38 +19391,38 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "thresholdedrelu" argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "inPlace" - argType: BOOL + name: "cutoff" + argType: DOUBLE } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "cutoff" - argType: DOUBLE + name: "inPlace" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "thresholdedrelu_bp" + argDescriptor { + name: "cutoff" + argType: DOUBLE + } + argDescriptor { + name: "dLdI" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19375,18 +19432,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dLdI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "cutoff" - argType: DOUBLE - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "tile" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "is_static_reps" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19396,25 +19453,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "is_static_reps" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "tile_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19424,21 +19477,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } argDescriptor { name: "repeat" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "tile_to_shape" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19447,13 +19500,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "tile_to_shape_bp" + argDescriptor { + name: "gradX" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19467,13 +19520,17 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "gradX" - argType: OUTPUT_TENSOR - } } opList { name: "timesoneminus" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19482,18 +19539,14 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "to_double" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19502,13 +19555,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "to_float16" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19517,13 +19570,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "to_float32" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19532,13 +19585,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "to_int32" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19547,13 +19600,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "to_int64" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19562,13 +19615,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "to_uint32" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19577,13 +19630,13 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "to_uint64" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19592,37 +19645,21 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "toggle_bits" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } opDeclarationType: OP_IMPL } opList { name: "top_k" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "needSort" - argType: BOOL - } argDescriptor { name: "values" argType: OUTPUT_TENSOR @@ -19632,13 +19669,29 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "needSort" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "k" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "trace" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19647,13 +19700,13 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "transpose" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "transpose" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19667,21 +19720,17 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "tri" - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "row" argType: INT64 @@ -19699,6 +19748,19 @@ opList { } opList { name: "triangular_solve" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "isLower" + argType: BOOL + } + argDescriptor { + name: "useAdjoint" + argType: BOOL + argIndex: 1 + } argDescriptor { name: "a" argType: INPUT_TENSOR @@ -19712,41 +19774,32 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "isLower" - argType: BOOL - } - argDescriptor { - name: "useAdjoint" - argType: BOOL - argIndex: 1 - } +} +opList { + name: "triu" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "triu" argDescriptor { name: "input" argType: INPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "diag" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "triu_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19756,21 +19809,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } argDescriptor { name: "diag" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "truncatediv" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19784,26 +19841,10 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "unique" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "values" argType: OUTPUT_TENSOR @@ -19813,9 +19854,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } -} -opList { - name: "unique_with_counts" argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19824,6 +19862,9 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "unique_with_counts" argDescriptor { name: "values" argType: OUTPUT_TENSOR @@ -19838,9 +19879,21 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_max" + argDescriptor { + name: "segmentedOutput" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19850,21 +19903,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "segmentedOutput" - argType: OUTPUT_TENSOR - } argDescriptor { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_max_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "data" argType: INPUT_TENSOR @@ -19879,21 +19932,21 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_mean" + argDescriptor { + name: "segmentedOutput" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19903,21 +19956,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "segmentedOutput" - argType: OUTPUT_TENSOR - } argDescriptor { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_mean_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "data" argType: INPUT_TENSOR @@ -19932,21 +19985,21 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_min" + argDescriptor { + name: "segmentedOutput" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19956,21 +20009,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "segmentedOutput" - argType: OUTPUT_TENSOR - } argDescriptor { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_min_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "data" argType: INPUT_TENSOR @@ -19985,21 +20038,21 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_prod" + argDescriptor { + name: "segmentedOutput" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20009,21 +20062,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "segmentedOutput" - argType: OUTPUT_TENSOR - } argDescriptor { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_prod_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20038,21 +20091,21 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_sqrt_n" + argDescriptor { + name: "segmentedOutput" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20062,21 +20115,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "segmentedOutput" - argType: OUTPUT_TENSOR - } argDescriptor { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_sqrt_n_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "data" argType: INPUT_TENSOR @@ -20091,21 +20144,21 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_sum" + argDescriptor { + name: "segmentedOutput" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20115,21 +20168,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "segmentedOutput" - argType: OUTPUT_TENSOR - } argDescriptor { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_sum_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "data" argType: INPUT_TENSOR @@ -20144,33 +20197,25 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unstack" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outArrs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "dimensions" argType: INT64 @@ -20180,29 +20225,25 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unstack_list" - argDescriptor { - name: "outputList" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "outputList" + argType: INPUT_TENSOR + } opDeclarationType: LIST_OP_IMPL } opList { name: "upsampling2d" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -20211,6 +20252,10 @@ opList { name: "nchw" argType: BOOL } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "factorH" argType: INT64 @@ -20225,9 +20270,21 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "upsampling2d_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "nchw" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20237,33 +20294,17 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "nchw" - argType: BOOL - } argDescriptor { name: "scaleW" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "upsampling3d" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -20272,6 +20313,10 @@ opList { name: "ncdhw" argType: BOOL } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "factorD" argType: INT64 @@ -20291,9 +20336,21 @@ opList { argType: INT64 argIndex: 3 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "upsampling3d_bp" + argDescriptor { + name: "gradI" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "ncdhw" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20303,28 +20360,20 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "gradI" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "ncdhw" - argType: BOOL - } argDescriptor { name: "isNCDHW" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "var" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "biasCorrected" @@ -20336,8 +20385,8 @@ opList { argIndex: 1 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "dimensions" @@ -20347,6 +20396,10 @@ opList { } opList { name: "weighted_cross_entropy_with_logits" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "targets" argType: INPUT_TENSOR @@ -20361,14 +20414,14 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: OP_IMPL } opList { name: "where_np" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "condition" argType: INPUT_TENSOR @@ -20387,13 +20440,13 @@ opList { name: "dtype" argType: DATA_TYPE } +} +opList { + name: "write_list" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } -} -opList { - name: "write_list" argDescriptor { name: "list" argType: INPUT_TENSOR @@ -20403,10 +20456,6 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "idx" argType: INT64 @@ -20415,6 +20464,14 @@ opList { } opList { name: "xor" + argDescriptor { + name: "comparable" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20428,34 +20485,30 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "comparable" - argType: DOUBLE - } opDeclarationType: LEGACY_XYZ } opList { name: "xor_scalar" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } opDeclarationType: LEGACY_XYZ } opList { name: "xw_plus_b" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20470,21 +20523,31 @@ opList { argType: INPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "bTranspose" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "xw_plus_b_bp" + argDescriptor { + name: "dLdx" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "dLdw" + argType: OUTPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "dLdb" + argType: OUTPUT_TENSOR + argIndex: 2 + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20504,39 +20567,25 @@ opList { argType: INPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } - argDescriptor { - name: "dLdx" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dLdw" - argType: OUTPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "dLdb" - argType: OUTPUT_TENSOR - argIndex: 2 - } argDescriptor { name: "bTranspose" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "yiq_to_rgb" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "dimC" argType: INT64 @@ -20545,14 +20594,14 @@ opList { } opList { name: "yuv_to_rgb" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } argDescriptor { name: "dimC" argType: INT64 @@ -20561,6 +20610,10 @@ opList { } opList { name: "zero_fraction" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20569,46 +20622,42 @@ opList { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } } opList { name: "zeros_as" - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "zeros_like" - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } } opList { name: "zeroslike" argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "outputs" + argType: OUTPUT_TENSOR } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "dataType" @@ -20617,6 +20666,14 @@ opList { } opList { name: "zeta" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20630,14 +20687,6 @@ opList { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { diff --git a/contrib/codegen-tools/libnd4j-gen/src/main/java/org/nd4j/descriptor/proposal/impl/JavaSourceArgDescriptorSource.java b/contrib/codegen-tools/libnd4j-gen/src/main/java/org/nd4j/descriptor/proposal/impl/JavaSourceArgDescriptorSource.java index cd63578d2..5d67599a9 100644 --- a/contrib/codegen-tools/libnd4j-gen/src/main/java/org/nd4j/descriptor/proposal/impl/JavaSourceArgDescriptorSource.java +++ b/contrib/codegen-tools/libnd4j-gen/src/main/java/org/nd4j/descriptor/proposal/impl/JavaSourceArgDescriptorSource.java @@ -496,6 +496,15 @@ public class JavaSourceArgDescriptorSource implements ArgDescriptorSource { .setArgIndex(boolIdx) .build()).build()); + argDescriptorProposals.add(ArgDescriptorProposal.builder() + .sourceOfProposal("java") + .proposalWeight(9999.0) + .descriptor(OpNamespace.ArgDescriptor.newBuilder() + .setArgType(OpNamespace.ArgDescriptor.ArgType.INPUT_TENSOR) + .setName("dimensions") + .setIsArray(false) + .setArgIndex(1) + .build()).build()); } @@ -542,6 +551,20 @@ public class JavaSourceArgDescriptorSource implements ArgDescriptorSource { } } + if(name.contains("loop_cond")) { + argDescriptorProposals.add(ArgDescriptorProposal.builder() + .sourceOfProposal("java") + .proposalWeight(9999.0) + .descriptor(OpNamespace.ArgDescriptor.newBuilder() + .setArgType(OpNamespace.ArgDescriptor.ArgType.INPUT_TENSOR) + .setName("input") + .setIsArray(false) + .setArgIndex(0) + .build()).build()); + + } + + if(name.equals("top_k")) { if(!containsProposalWithDescriptorName("sorted",argDescriptorProposals)) { argDescriptorProposals.add(ArgDescriptorProposal.builder() diff --git a/contrib/codegen-tools/libnd4j-gen/src/main/java/org/nd4j/descriptor/proposal/impl/Libnd4jArgDescriptorSource.java b/contrib/codegen-tools/libnd4j-gen/src/main/java/org/nd4j/descriptor/proposal/impl/Libnd4jArgDescriptorSource.java index b5b3f1060..fdb9ba46e 100644 --- a/contrib/codegen-tools/libnd4j-gen/src/main/java/org/nd4j/descriptor/proposal/impl/Libnd4jArgDescriptorSource.java +++ b/contrib/codegen-tools/libnd4j-gen/src/main/java/org/nd4j/descriptor/proposal/impl/Libnd4jArgDescriptorSource.java @@ -64,7 +64,7 @@ public class Libnd4jArgDescriptorSource implements ArgDescriptorSource { public final static String T_ARG = "T_ARG"; public final static String B_ARG = "B_ARG"; public final static String DECLARE_SYN = "DECLARE_SYN"; - public final static String DEFAULT_LIBND4J_DIRECTORY = "../../libnd4j"; + public final static String DEFAULT_LIBND4J_DIRECTORY = "../../../libnd4j"; public final static int BROADCASTABLE_OP_IMPL_DEFAULT_NIN = 2; public final static int BROADCASTABLE_OP_IMPL_DEFAULT_NOUT = 1; public final static String CUSTOM_OP_IMPL = "CUSTOM_OP_IMPL"; diff --git a/libnd4j/include/graph/Context.h b/libnd4j/include/graph/Context.h index 30a83c668..de6608b46 100644 --- a/libnd4j/include/graph/Context.h +++ b/libnd4j/include/graph/Context.h @@ -1,22 +1,19 @@ -/* - * ****************************************************************************** - * * - * * - * * This program and the accompanying materials are made available under the - * * terms of the Apache License, Version 2.0 which is available at - * * https://www.apache.org/licenses/LICENSE-2.0. - * * - * * See the NOTICE file distributed with this work for additional - * * information regarding copyright ownership. - * * 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. - * * - * * SPDX-License-Identifier: Apache-2.0 - * ***************************************************************************** - */ +/******************************************************************************* + * Copyright (c) 2015-2018 Skymind, Inc. + * Copyright (c) 2019-2020 Konduit K.K. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ******************************************************************************/ // // @author raver119@gmail.com diff --git a/libnd4j/include/graph/ContextPrototype.h b/libnd4j/include/graph/ContextPrototype.h index 18d64af9d..e61831fa7 100644 --- a/libnd4j/include/graph/ContextPrototype.h +++ b/libnd4j/include/graph/ContextPrototype.h @@ -1,22 +1,19 @@ -/* - * ****************************************************************************** - * * - * * - * * This program and the accompanying materials are made available under the - * * terms of the Apache License, Version 2.0 which is available at - * * https://www.apache.org/licenses/LICENSE-2.0. - * * - * * See the NOTICE file distributed with this work for additional - * * information regarding copyright ownership. - * * 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. - * * - * * SPDX-License-Identifier: Apache-2.0 - * ***************************************************************************** - */ +/******************************************************************************* + * Copyright (c) 2015-2018 Skymind, Inc. + * Copyright (c) 2019-2020 Konduit K.K. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://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. + * + * SPDX-License-Identifier: Apache-2.0 + ******************************************************************************/ // // @author raver119@gmail.com diff --git a/libnd4j/include/graph/generated/array_generated.h b/libnd4j/include/graph/generated/array_generated.h new file mode 100644 index 000000000..5c4c0d7af --- /dev/null +++ b/libnd4j/include/graph/generated/array_generated.h @@ -0,0 +1,280 @@ +// automatically generated by the FlatBuffers compiler, do not modify + + +#ifndef FLATBUFFERS_GENERATED_ARRAY_ND4J_GRAPH_H_ +#define FLATBUFFERS_GENERATED_ARRAY_ND4J_GRAPH_H_ + +#include "flatbuffers/flatbuffers.h" + +namespace sd { +namespace graph { + +struct FlatArray; + +enum ByteOrder { + ByteOrder_LE = 0, + ByteOrder_BE = 1, + ByteOrder_MIN = ByteOrder_LE, + ByteOrder_MAX = ByteOrder_BE +}; + +inline const ByteOrder (&EnumValuesByteOrder())[2] { + static const ByteOrder values[] = { + ByteOrder_LE, + ByteOrder_BE + }; + return values; +} + +inline const char * const *EnumNamesByteOrder() { + static const char * const names[] = { + "LE", + "BE", + nullptr + }; + return names; +} + +inline const char *EnumNameByteOrder(ByteOrder e) { + const size_t index = static_cast(e); + return EnumNamesByteOrder()[index]; +} + +enum DType { + DType_INHERIT = 0, + DType_BOOL = 1, + DType_FLOAT8 = 2, + DType_HALF = 3, + DType_HALF2 = 4, + DType_FLOAT = 5, + DType_DOUBLE = 6, + DType_INT8 = 7, + DType_INT16 = 8, + DType_INT32 = 9, + DType_INT64 = 10, + DType_UINT8 = 11, + DType_UINT16 = 12, + DType_UINT32 = 13, + DType_UINT64 = 14, + DType_QINT8 = 15, + DType_QINT16 = 16, + DType_BFLOAT16 = 17, + DType_UTF8 = 50, + DType_UTF16 = 51, + DType_UTF32 = 52, + DType_MIN = DType_INHERIT, + DType_MAX = DType_UTF32 +}; + +inline const DType (&EnumValuesDType())[21] { + static const DType values[] = { + DType_INHERIT, + DType_BOOL, + DType_FLOAT8, + DType_HALF, + DType_HALF2, + DType_FLOAT, + DType_DOUBLE, + DType_INT8, + DType_INT16, + DType_INT32, + DType_INT64, + DType_UINT8, + DType_UINT16, + DType_UINT32, + DType_UINT64, + DType_QINT8, + DType_QINT16, + DType_BFLOAT16, + DType_UTF8, + DType_UTF16, + DType_UTF32 + }; + return values; +} + +inline const char * const *EnumNamesDType() { + static const char * const names[] = { + "INHERIT", + "BOOL", + "FLOAT8", + "HALF", + "HALF2", + "FLOAT", + "DOUBLE", + "INT8", + "INT16", + "INT32", + "INT64", + "UINT8", + "UINT16", + "UINT32", + "UINT64", + "QINT8", + "QINT16", + "BFLOAT16", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "UTF8", + "UTF16", + "UTF32", + nullptr + }; + return names; +} + +inline const char *EnumNameDType(DType e) { + const size_t index = static_cast(e); + return EnumNamesDType()[index]; +} + +struct FlatArray FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_SHAPE = 4, + VT_BUFFER = 6, + VT_DTYPE = 8, + VT_BYTEORDER = 10 + }; + const flatbuffers::Vector *shape() const { + return GetPointer *>(VT_SHAPE); + } + const flatbuffers::Vector *buffer() const { + return GetPointer *>(VT_BUFFER); + } + DType dtype() const { + return static_cast(GetField(VT_DTYPE, 0)); + } + ByteOrder byteOrder() const { + return static_cast(GetField(VT_BYTEORDER, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_SHAPE) && + verifier.VerifyVector(shape()) && + VerifyOffset(verifier, VT_BUFFER) && + verifier.VerifyVector(buffer()) && + VerifyField(verifier, VT_DTYPE) && + VerifyField(verifier, VT_BYTEORDER) && + verifier.EndTable(); + } +}; + +struct FlatArrayBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_shape(flatbuffers::Offset> shape) { + fbb_.AddOffset(FlatArray::VT_SHAPE, shape); + } + void add_buffer(flatbuffers::Offset> buffer) { + fbb_.AddOffset(FlatArray::VT_BUFFER, buffer); + } + void add_dtype(DType dtype) { + fbb_.AddElement(FlatArray::VT_DTYPE, static_cast(dtype), 0); + } + void add_byteOrder(ByteOrder byteOrder) { + fbb_.AddElement(FlatArray::VT_BYTEORDER, static_cast(byteOrder), 0); + } + explicit FlatArrayBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + FlatArrayBuilder &operator=(const FlatArrayBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateFlatArray( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> shape = 0, + flatbuffers::Offset> buffer = 0, + DType dtype = DType_INHERIT, + ByteOrder byteOrder = ByteOrder_LE) { + FlatArrayBuilder builder_(_fbb); + builder_.add_buffer(buffer); + builder_.add_shape(shape); + builder_.add_byteOrder(byteOrder); + builder_.add_dtype(dtype); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateFlatArrayDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *shape = nullptr, + const std::vector *buffer = nullptr, + DType dtype = DType_INHERIT, + ByteOrder byteOrder = ByteOrder_LE) { + return sd::graph::CreateFlatArray( + _fbb, + shape ? _fbb.CreateVector(*shape) : 0, + buffer ? _fbb.CreateVector(*buffer) : 0, + dtype, + byteOrder); +} + +inline const sd::graph::FlatArray *GetFlatArray(const void *buf) { + return flatbuffers::GetRoot(buf); +} + +inline const sd::graph::FlatArray *GetSizePrefixedFlatArray(const void *buf) { + return flatbuffers::GetSizePrefixedRoot(buf); +} + +inline bool VerifyFlatArrayBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifyBuffer(nullptr); +} + +inline bool VerifySizePrefixedFlatArrayBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifySizePrefixedBuffer(nullptr); +} + +inline void FinishFlatArrayBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.Finish(root); +} + +inline void FinishSizePrefixedFlatArrayBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.FinishSizePrefixed(root); +} + +} // namespace graph +} // namespace sd + +#endif // FLATBUFFERS_GENERATED_ARRAY_ND4J_GRAPH_H_ diff --git a/libnd4j/include/graph/generated/array_generated.js b/libnd4j/include/graph/generated/array_generated.js new file mode 100644 index 000000000..758b0c092 --- /dev/null +++ b/libnd4j/include/graph/generated/array_generated.js @@ -0,0 +1,260 @@ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ + +/** + * @const + * @namespace + */ +var nd4j = nd4j || {}; + +/** + * @const + * @namespace + */ +nd4j.graph = nd4j.graph || {}; + +/** + * @enum + */ +nd4j.graph.ByteOrder = { + LE: 0, + BE: 1 +}; + +/** + * @enum + */ +nd4j.graph.DType = { + INHERIT: 0, + BOOL: 1, + FLOAT8: 2, + HALF: 3, + HALF2: 4, + FLOAT: 5, + DOUBLE: 6, + INT8: 7, + INT16: 8, + INT32: 9, + INT64: 10, + UINT8: 11, + UINT16: 12, + UINT32: 13, + UINT64: 14, + QINT8: 15, + QINT16: 16, + BFLOAT16: 17, + UTF8: 50, + UTF16: 51, + UTF32: 52 +}; + +/** + * @constructor + */ +nd4j.graph.FlatArray = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.FlatArray} + */ +nd4j.graph.FlatArray.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.FlatArray=} obj + * @returns {nd4j.graph.FlatArray} + */ +nd4j.graph.FlatArray.getRootAsFlatArray = function(bb, obj) { + return (obj || new nd4j.graph.FlatArray).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @param {number} index + * @returns {flatbuffers.Long} + */ +nd4j.graph.FlatArray.prototype.shape = function(index) { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readInt64(this.bb.__vector(this.bb_pos + offset) + index * 8) : this.bb.createLong(0, 0); +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatArray.prototype.shapeLength = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @returns {number} + */ +nd4j.graph.FlatArray.prototype.buffer = function(index) { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.readInt8(this.bb.__vector(this.bb_pos + offset) + index) : 0; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatArray.prototype.bufferLength = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {Int8Array} + */ +nd4j.graph.FlatArray.prototype.bufferArray = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? new Int8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null; +}; + +/** + * @returns {nd4j.graph.DType} + */ +nd4j.graph.FlatArray.prototype.dtype = function() { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? /** @type {nd4j.graph.DType} */ (this.bb.readInt8(this.bb_pos + offset)) : nd4j.graph.DType.INHERIT; +}; + +/** + * @returns {nd4j.graph.ByteOrder} + */ +nd4j.graph.FlatArray.prototype.byteOrder = function() { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? /** @type {nd4j.graph.ByteOrder} */ (this.bb.readInt8(this.bb_pos + offset)) : nd4j.graph.ByteOrder.LE; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.FlatArray.startFlatArray = function(builder) { + builder.startObject(4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} shapeOffset + */ +nd4j.graph.FlatArray.addShape = function(builder, shapeOffset) { + builder.addFieldOffset(0, shapeOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatArray.createShapeVector = function(builder, data) { + builder.startVector(8, data.length, 8); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt64(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatArray.startShapeVector = function(builder, numElems) { + builder.startVector(8, numElems, 8); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} bufferOffset + */ +nd4j.graph.FlatArray.addBuffer = function(builder, bufferOffset) { + builder.addFieldOffset(1, bufferOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatArray.createBufferVector = function(builder, data) { + builder.startVector(1, data.length, 1); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt8(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatArray.startBufferVector = function(builder, numElems) { + builder.startVector(1, numElems, 1); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {nd4j.graph.DType} dtype + */ +nd4j.graph.FlatArray.addDtype = function(builder, dtype) { + builder.addFieldInt8(2, dtype, nd4j.graph.DType.INHERIT); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {nd4j.graph.ByteOrder} byteOrder + */ +nd4j.graph.FlatArray.addByteOrder = function(builder, byteOrder) { + builder.addFieldInt8(3, byteOrder, nd4j.graph.ByteOrder.LE); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatArray.endFlatArray = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} offset + */ +nd4j.graph.FlatArray.finishFlatArrayBuffer = function(builder, offset) { + builder.finish(offset); +}; + +// Exports for Node.js and RequireJS +this.nd4j = nd4j; diff --git a/libnd4j/include/graph/generated/config_generated.h b/libnd4j/include/graph/generated/config_generated.h new file mode 100644 index 000000000..2c12027a2 --- /dev/null +++ b/libnd4j/include/graph/generated/config_generated.h @@ -0,0 +1,294 @@ +// automatically generated by the FlatBuffers compiler, do not modify + + +#ifndef FLATBUFFERS_GENERATED_CONFIG_ND4J_GRAPH_H_ +#define FLATBUFFERS_GENERATED_CONFIG_ND4J_GRAPH_H_ + +#include "flatbuffers/flatbuffers.h" + +namespace sd { +namespace graph { + +struct FlatConfiguration; + +enum ProfilingMode { + ProfilingMode_NONE = 0, + ProfilingMode_NAN_PANIC = 1, + ProfilingMode_INF_PANIC = 2, + ProfilingMode_ANY_PANIC = 3, + ProfilingMode_MIN = ProfilingMode_NONE, + ProfilingMode_MAX = ProfilingMode_ANY_PANIC +}; + +inline const ProfilingMode (&EnumValuesProfilingMode())[4] { + static const ProfilingMode values[] = { + ProfilingMode_NONE, + ProfilingMode_NAN_PANIC, + ProfilingMode_INF_PANIC, + ProfilingMode_ANY_PANIC + }; + return values; +} + +inline const char * const *EnumNamesProfilingMode() { + static const char * const names[] = { + "NONE", + "NAN_PANIC", + "INF_PANIC", + "ANY_PANIC", + nullptr + }; + return names; +} + +inline const char *EnumNameProfilingMode(ProfilingMode e) { + const size_t index = static_cast(e); + return EnumNamesProfilingMode()[index]; +} + +enum ExecutionMode { + ExecutionMode_SEQUENTIAL = 0, + ExecutionMode_STRICT = 1, + ExecutionMode_AUTO = 2, + ExecutionMode_MIN = ExecutionMode_SEQUENTIAL, + ExecutionMode_MAX = ExecutionMode_AUTO +}; + +inline const ExecutionMode (&EnumValuesExecutionMode())[3] { + static const ExecutionMode values[] = { + ExecutionMode_SEQUENTIAL, + ExecutionMode_STRICT, + ExecutionMode_AUTO + }; + return values; +} + +inline const char * const *EnumNamesExecutionMode() { + static const char * const names[] = { + "SEQUENTIAL", + "STRICT", + "AUTO", + nullptr + }; + return names; +} + +inline const char *EnumNameExecutionMode(ExecutionMode e) { + const size_t index = static_cast(e); + return EnumNamesExecutionMode()[index]; +} + +enum OutputMode { + OutputMode_IMPLICIT = 0, + OutputMode_EXPLICIT = 1, + OutputMode_EXPLICIT_AND_IMPLICIT = 2, + OutputMode_VARIABLE_SPACE = 3, + OutputMode_OPTIMIZED = 4, + OutputMode_MIN = OutputMode_IMPLICIT, + OutputMode_MAX = OutputMode_OPTIMIZED +}; + +inline const OutputMode (&EnumValuesOutputMode())[5] { + static const OutputMode values[] = { + OutputMode_IMPLICIT, + OutputMode_EXPLICIT, + OutputMode_EXPLICIT_AND_IMPLICIT, + OutputMode_VARIABLE_SPACE, + OutputMode_OPTIMIZED + }; + return values; +} + +inline const char * const *EnumNamesOutputMode() { + static const char * const names[] = { + "IMPLICIT", + "EXPLICIT", + "EXPLICIT_AND_IMPLICIT", + "VARIABLE_SPACE", + "OPTIMIZED", + nullptr + }; + return names; +} + +inline const char *EnumNameOutputMode(OutputMode e) { + const size_t index = static_cast(e); + return EnumNamesOutputMode()[index]; +} + +enum Direction { + Direction_FORWARD_ONLY = 0, + Direction_FORWARD_AND_BACKWARD = 1, + Direction_BACKWARD_ONLY = 2, + Direction_MIN = Direction_FORWARD_ONLY, + Direction_MAX = Direction_BACKWARD_ONLY +}; + +inline const Direction (&EnumValuesDirection())[3] { + static const Direction values[] = { + Direction_FORWARD_ONLY, + Direction_FORWARD_AND_BACKWARD, + Direction_BACKWARD_ONLY + }; + return values; +} + +inline const char * const *EnumNamesDirection() { + static const char * const names[] = { + "FORWARD_ONLY", + "FORWARD_AND_BACKWARD", + "BACKWARD_ONLY", + nullptr + }; + return names; +} + +inline const char *EnumNameDirection(Direction e) { + const size_t index = static_cast(e); + return EnumNamesDirection()[index]; +} + +struct FlatConfiguration FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_ID = 4, + VT_EXECUTIONMODE = 6, + VT_PROFILINGMODE = 8, + VT_OUTPUTMODE = 10, + VT_TIMESTATS = 12, + VT_FOOTPRINTFORWARD = 14, + VT_FOOTPRINTBACKWARD = 16, + VT_DIRECTION = 18 + }; + int64_t id() const { + return GetField(VT_ID, 0); + } + ExecutionMode executionMode() const { + return static_cast(GetField(VT_EXECUTIONMODE, 0)); + } + ProfilingMode profilingMode() const { + return static_cast(GetField(VT_PROFILINGMODE, 0)); + } + OutputMode outputMode() const { + return static_cast(GetField(VT_OUTPUTMODE, 0)); + } + bool timestats() const { + return GetField(VT_TIMESTATS, 0) != 0; + } + int64_t footprintForward() const { + return GetField(VT_FOOTPRINTFORWARD, 0); + } + int64_t footprintBackward() const { + return GetField(VT_FOOTPRINTBACKWARD, 0); + } + Direction direction() const { + return static_cast(GetField(VT_DIRECTION, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ID) && + VerifyField(verifier, VT_EXECUTIONMODE) && + VerifyField(verifier, VT_PROFILINGMODE) && + VerifyField(verifier, VT_OUTPUTMODE) && + VerifyField(verifier, VT_TIMESTATS) && + VerifyField(verifier, VT_FOOTPRINTFORWARD) && + VerifyField(verifier, VT_FOOTPRINTBACKWARD) && + VerifyField(verifier, VT_DIRECTION) && + verifier.EndTable(); + } +}; + +struct FlatConfigurationBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_id(int64_t id) { + fbb_.AddElement(FlatConfiguration::VT_ID, id, 0); + } + void add_executionMode(ExecutionMode executionMode) { + fbb_.AddElement(FlatConfiguration::VT_EXECUTIONMODE, static_cast(executionMode), 0); + } + void add_profilingMode(ProfilingMode profilingMode) { + fbb_.AddElement(FlatConfiguration::VT_PROFILINGMODE, static_cast(profilingMode), 0); + } + void add_outputMode(OutputMode outputMode) { + fbb_.AddElement(FlatConfiguration::VT_OUTPUTMODE, static_cast(outputMode), 0); + } + void add_timestats(bool timestats) { + fbb_.AddElement(FlatConfiguration::VT_TIMESTATS, static_cast(timestats), 0); + } + void add_footprintForward(int64_t footprintForward) { + fbb_.AddElement(FlatConfiguration::VT_FOOTPRINTFORWARD, footprintForward, 0); + } + void add_footprintBackward(int64_t footprintBackward) { + fbb_.AddElement(FlatConfiguration::VT_FOOTPRINTBACKWARD, footprintBackward, 0); + } + void add_direction(Direction direction) { + fbb_.AddElement(FlatConfiguration::VT_DIRECTION, static_cast(direction), 0); + } + explicit FlatConfigurationBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + FlatConfigurationBuilder &operator=(const FlatConfigurationBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateFlatConfiguration( + flatbuffers::FlatBufferBuilder &_fbb, + int64_t id = 0, + ExecutionMode executionMode = ExecutionMode_SEQUENTIAL, + ProfilingMode profilingMode = ProfilingMode_NONE, + OutputMode outputMode = OutputMode_IMPLICIT, + bool timestats = false, + int64_t footprintForward = 0, + int64_t footprintBackward = 0, + Direction direction = Direction_FORWARD_ONLY) { + FlatConfigurationBuilder builder_(_fbb); + builder_.add_footprintBackward(footprintBackward); + builder_.add_footprintForward(footprintForward); + builder_.add_id(id); + builder_.add_direction(direction); + builder_.add_timestats(timestats); + builder_.add_outputMode(outputMode); + builder_.add_profilingMode(profilingMode); + builder_.add_executionMode(executionMode); + return builder_.Finish(); +} + +inline const sd::graph::FlatConfiguration *GetFlatConfiguration(const void *buf) { + return flatbuffers::GetRoot(buf); +} + +inline const sd::graph::FlatConfiguration *GetSizePrefixedFlatConfiguration(const void *buf) { + return flatbuffers::GetSizePrefixedRoot(buf); +} + +inline bool VerifyFlatConfigurationBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifyBuffer(nullptr); +} + +inline bool VerifySizePrefixedFlatConfigurationBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifySizePrefixedBuffer(nullptr); +} + +inline void FinishFlatConfigurationBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.Finish(root); +} + +inline void FinishSizePrefixedFlatConfigurationBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.FinishSizePrefixed(root); +} + +} // namespace graph +} // namespace sd + +#endif // FLATBUFFERS_GENERATED_CONFIG_ND4J_GRAPH_H_ diff --git a/libnd4j/include/graph/generated/config_generated.js b/libnd4j/include/graph/generated/config_generated.js new file mode 100644 index 000000000..093851187 --- /dev/null +++ b/libnd4j/include/graph/generated/config_generated.js @@ -0,0 +1,260 @@ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ + +/** + * @const + * @namespace + */ +var nd4j = nd4j || {}; + +/** + * @const + * @namespace + */ +nd4j.graph = nd4j.graph || {}; + +/** + * @enum + */ +nd4j.graph.ProfilingMode = { + NONE: 0, + NAN_PANIC: 1, + INF_PANIC: 2, + ANY_PANIC: 3 +}; + +/** + * @enum + */ +nd4j.graph.ExecutionMode = { + SEQUENTIAL: 0, + STRICT: 1, + AUTO: 2 +}; + +/** + * @enum + */ +nd4j.graph.OutputMode = { + IMPLICIT: 0, + EXPLICIT: 1, + EXPLICIT_AND_IMPLICIT: 2, + VARIABLE_SPACE: 3, + OPTIMIZED: 4 +}; + +/** + * @enum + */ +nd4j.graph.Direction = { + FORWARD_ONLY: 0, + FORWARD_AND_BACKWARD: 1, + BACKWARD_ONLY: 2 +}; + +/** + * @constructor + */ +nd4j.graph.FlatConfiguration = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.FlatConfiguration} + */ +nd4j.graph.FlatConfiguration.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.FlatConfiguration=} obj + * @returns {nd4j.graph.FlatConfiguration} + */ +nd4j.graph.FlatConfiguration.getRootAsFlatConfiguration = function(bb, obj) { + return (obj || new nd4j.graph.FlatConfiguration).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.FlatConfiguration.prototype.id = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @returns {nd4j.graph.ExecutionMode} + */ +nd4j.graph.FlatConfiguration.prototype.executionMode = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? /** @type {nd4j.graph.ExecutionMode} */ (this.bb.readInt8(this.bb_pos + offset)) : nd4j.graph.ExecutionMode.SEQUENTIAL; +}; + +/** + * @returns {nd4j.graph.ProfilingMode} + */ +nd4j.graph.FlatConfiguration.prototype.profilingMode = function() { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? /** @type {nd4j.graph.ProfilingMode} */ (this.bb.readInt8(this.bb_pos + offset)) : nd4j.graph.ProfilingMode.NONE; +}; + +/** + * @returns {nd4j.graph.OutputMode} + */ +nd4j.graph.FlatConfiguration.prototype.outputMode = function() { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? /** @type {nd4j.graph.OutputMode} */ (this.bb.readInt8(this.bb_pos + offset)) : nd4j.graph.OutputMode.IMPLICIT; +}; + +/** + * @returns {boolean} + */ +nd4j.graph.FlatConfiguration.prototype.timestats = function() { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false; +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.FlatConfiguration.prototype.footprintForward = function() { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.FlatConfiguration.prototype.footprintBackward = function() { + var offset = this.bb.__offset(this.bb_pos, 16); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @returns {nd4j.graph.Direction} + */ +nd4j.graph.FlatConfiguration.prototype.direction = function() { + var offset = this.bb.__offset(this.bb_pos, 18); + return offset ? /** @type {nd4j.graph.Direction} */ (this.bb.readInt8(this.bb_pos + offset)) : nd4j.graph.Direction.FORWARD_ONLY; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.FlatConfiguration.startFlatConfiguration = function(builder) { + builder.startObject(8); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} id + */ +nd4j.graph.FlatConfiguration.addId = function(builder, id) { + builder.addFieldInt64(0, id, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {nd4j.graph.ExecutionMode} executionMode + */ +nd4j.graph.FlatConfiguration.addExecutionMode = function(builder, executionMode) { + builder.addFieldInt8(1, executionMode, nd4j.graph.ExecutionMode.SEQUENTIAL); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {nd4j.graph.ProfilingMode} profilingMode + */ +nd4j.graph.FlatConfiguration.addProfilingMode = function(builder, profilingMode) { + builder.addFieldInt8(2, profilingMode, nd4j.graph.ProfilingMode.NONE); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {nd4j.graph.OutputMode} outputMode + */ +nd4j.graph.FlatConfiguration.addOutputMode = function(builder, outputMode) { + builder.addFieldInt8(3, outputMode, nd4j.graph.OutputMode.IMPLICIT); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {boolean} timestats + */ +nd4j.graph.FlatConfiguration.addTimestats = function(builder, timestats) { + builder.addFieldInt8(4, +timestats, +false); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} footprintForward + */ +nd4j.graph.FlatConfiguration.addFootprintForward = function(builder, footprintForward) { + builder.addFieldInt64(5, footprintForward, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} footprintBackward + */ +nd4j.graph.FlatConfiguration.addFootprintBackward = function(builder, footprintBackward) { + builder.addFieldInt64(6, footprintBackward, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {nd4j.graph.Direction} direction + */ +nd4j.graph.FlatConfiguration.addDirection = function(builder, direction) { + builder.addFieldInt8(7, direction, nd4j.graph.Direction.FORWARD_ONLY); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatConfiguration.endFlatConfiguration = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} offset + */ +nd4j.graph.FlatConfiguration.finishFlatConfigurationBuffer = function(builder, offset) { + builder.finish(offset); +}; + +// Exports for Node.js and RequireJS +this.nd4j = nd4j; diff --git a/libnd4j/include/graph/generated/graph.grpc.fb.cc b/libnd4j/include/graph/generated/graph.grpc.fb.cc new file mode 100644 index 000000000..5146f49f2 --- /dev/null +++ b/libnd4j/include/graph/generated/graph.grpc.fb.cc @@ -0,0 +1,143 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: graph + +#include "graph_generated.h" +#include "graph.grpc.fb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +namespace sd { +namespace graph { + +static const char* GraphInferenceServer_method_names[] = { + "/nd4j.graph.GraphInferenceServer/RegisterGraph", + "/nd4j.graph.GraphInferenceServer/ForgetGraph", + "/nd4j.graph.GraphInferenceServer/ReplaceGraph", + "/nd4j.graph.GraphInferenceServer/InferenceRequest", +}; + +std::unique_ptr< GraphInferenceServer::Stub> GraphInferenceServer::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + std::unique_ptr< GraphInferenceServer::Stub> stub(new GraphInferenceServer::Stub(channel)); + return stub; +} + +GraphInferenceServer::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) + : channel_(channel) , rpcmethod_RegisterGraph_(GraphInferenceServer_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_ForgetGraph_(GraphInferenceServer_method_names[1], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_ReplaceGraph_(GraphInferenceServer_method_names[2], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_InferenceRequest_(GraphInferenceServer_method_names[3], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status GraphInferenceServer::Stub::RegisterGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, flatbuffers::grpc::Message* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_RegisterGraph_, context, request, response); +} + +::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* GraphInferenceServer::Stub::AsyncRegisterGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< flatbuffers::grpc::Message>::Create(channel_.get(), cq, rpcmethod_RegisterGraph_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* GraphInferenceServer::Stub::PrepareAsyncRegisterGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< flatbuffers::grpc::Message>::Create(channel_.get(), cq, rpcmethod_RegisterGraph_, context, request, false); +} + +::grpc::Status GraphInferenceServer::Stub::ForgetGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, flatbuffers::grpc::Message* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_ForgetGraph_, context, request, response); +} + +::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* GraphInferenceServer::Stub::AsyncForgetGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< flatbuffers::grpc::Message>::Create(channel_.get(), cq, rpcmethod_ForgetGraph_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* GraphInferenceServer::Stub::PrepareAsyncForgetGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< flatbuffers::grpc::Message>::Create(channel_.get(), cq, rpcmethod_ForgetGraph_, context, request, false); +} + +::grpc::Status GraphInferenceServer::Stub::ReplaceGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, flatbuffers::grpc::Message* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_ReplaceGraph_, context, request, response); +} + +::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* GraphInferenceServer::Stub::AsyncReplaceGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< flatbuffers::grpc::Message>::Create(channel_.get(), cq, rpcmethod_ReplaceGraph_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* GraphInferenceServer::Stub::PrepareAsyncReplaceGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< flatbuffers::grpc::Message>::Create(channel_.get(), cq, rpcmethod_ReplaceGraph_, context, request, false); +} + +::grpc::Status GraphInferenceServer::Stub::InferenceRequest(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, flatbuffers::grpc::Message* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_InferenceRequest_, context, request, response); +} + +::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* GraphInferenceServer::Stub::AsyncInferenceRequestRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< flatbuffers::grpc::Message>::Create(channel_.get(), cq, rpcmethod_InferenceRequest_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* GraphInferenceServer::Stub::PrepareAsyncInferenceRequestRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< flatbuffers::grpc::Message>::Create(channel_.get(), cq, rpcmethod_InferenceRequest_, context, request, false); +} + +GraphInferenceServer::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + GraphInferenceServer_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< GraphInferenceServer::Service, flatbuffers::grpc::Message, flatbuffers::grpc::Message>( + std::mem_fn(&GraphInferenceServer::Service::RegisterGraph), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + GraphInferenceServer_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< GraphInferenceServer::Service, flatbuffers::grpc::Message, flatbuffers::grpc::Message>( + std::mem_fn(&GraphInferenceServer::Service::ForgetGraph), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + GraphInferenceServer_method_names[2], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< GraphInferenceServer::Service, flatbuffers::grpc::Message, flatbuffers::grpc::Message>( + std::mem_fn(&GraphInferenceServer::Service::ReplaceGraph), this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + GraphInferenceServer_method_names[3], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< GraphInferenceServer::Service, flatbuffers::grpc::Message, flatbuffers::grpc::Message>( + std::mem_fn(&GraphInferenceServer::Service::InferenceRequest), this))); +} + +GraphInferenceServer::Service::~Service() { +} + +::grpc::Status GraphInferenceServer::Service::RegisterGraph(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status GraphInferenceServer::Service::ForgetGraph(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status GraphInferenceServer::Service::ReplaceGraph(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status GraphInferenceServer::Service::InferenceRequest(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace sd +} // namespace graph + diff --git a/libnd4j/include/graph/generated/graph.grpc.fb.h b/libnd4j/include/graph/generated/graph.grpc.fb.h new file mode 100644 index 000000000..0167f48d5 --- /dev/null +++ b/libnd4j/include/graph/generated/graph.grpc.fb.h @@ -0,0 +1,372 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: graph +#ifndef GRPC_graph__INCLUDED +#define GRPC_graph__INCLUDED + +#include "graph_generated.h" +#include "flatbuffers/grpc.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace grpc { +class CompletionQueue; +class Channel; +class ServerCompletionQueue; +class ServerContext; +} // namespace grpc + +namespace sd { +namespace graph { + +class GraphInferenceServer final { + public: + static constexpr char const* service_full_name() { + return "nd4j.graph.GraphInferenceServer"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + virtual ::grpc::Status RegisterGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, flatbuffers::grpc::Message* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>> AsyncRegisterGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>>(AsyncRegisterGraphRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>> PrepareAsyncRegisterGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>>(PrepareAsyncRegisterGraphRaw(context, request, cq)); + } + virtual ::grpc::Status ForgetGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, flatbuffers::grpc::Message* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>> AsyncForgetGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>>(AsyncForgetGraphRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>> PrepareAsyncForgetGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>>(PrepareAsyncForgetGraphRaw(context, request, cq)); + } + virtual ::grpc::Status ReplaceGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, flatbuffers::grpc::Message* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>> AsyncReplaceGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>>(AsyncReplaceGraphRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>> PrepareAsyncReplaceGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>>(PrepareAsyncReplaceGraphRaw(context, request, cq)); + } + virtual ::grpc::Status InferenceRequest(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, flatbuffers::grpc::Message* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>> AsyncInferenceRequest(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>>(AsyncInferenceRequestRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>> PrepareAsyncInferenceRequest(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>>(PrepareAsyncInferenceRequestRaw(context, request, cq)); + } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>* AsyncRegisterGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>* PrepareAsyncRegisterGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>* AsyncForgetGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>* PrepareAsyncForgetGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>* AsyncReplaceGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>* PrepareAsyncReplaceGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>* AsyncInferenceRequestRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< flatbuffers::grpc::Message>* PrepareAsyncInferenceRequestRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); + ::grpc::Status RegisterGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, flatbuffers::grpc::Message* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>> AsyncRegisterGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>>(AsyncRegisterGraphRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>> PrepareAsyncRegisterGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>>(PrepareAsyncRegisterGraphRaw(context, request, cq)); + } + ::grpc::Status ForgetGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, flatbuffers::grpc::Message* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>> AsyncForgetGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>>(AsyncForgetGraphRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>> PrepareAsyncForgetGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>>(PrepareAsyncForgetGraphRaw(context, request, cq)); + } + ::grpc::Status ReplaceGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, flatbuffers::grpc::Message* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>> AsyncReplaceGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>>(AsyncReplaceGraphRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>> PrepareAsyncReplaceGraph(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>>(PrepareAsyncReplaceGraphRaw(context, request, cq)); + } + ::grpc::Status InferenceRequest(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, flatbuffers::grpc::Message* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>> AsyncInferenceRequest(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>>(AsyncInferenceRequestRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>> PrepareAsyncInferenceRequest(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>>(PrepareAsyncInferenceRequestRaw(context, request, cq)); + } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* AsyncRegisterGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* PrepareAsyncRegisterGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* AsyncForgetGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* PrepareAsyncForgetGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* AsyncReplaceGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* PrepareAsyncReplaceGraphRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* AsyncInferenceRequestRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< flatbuffers::grpc::Message>* PrepareAsyncInferenceRequestRaw(::grpc::ClientContext* context, const flatbuffers::grpc::Message& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_RegisterGraph_; + const ::grpc::internal::RpcMethod rpcmethod_ForgetGraph_; + const ::grpc::internal::RpcMethod rpcmethod_ReplaceGraph_; + const ::grpc::internal::RpcMethod rpcmethod_InferenceRequest_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + virtual ::grpc::Status RegisterGraph(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response); + virtual ::grpc::Status ForgetGraph(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response); + virtual ::grpc::Status ReplaceGraph(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response); + virtual ::grpc::Status InferenceRequest(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response); + }; + template + class WithAsyncMethod_RegisterGraph : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_RegisterGraph() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_RegisterGraph() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RegisterGraph(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) final override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestRegisterGraph(::grpc::ServerContext* context, flatbuffers::grpc::Message* request, ::grpc::ServerAsyncResponseWriter< flatbuffers::grpc::Message>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_ForgetGraph : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_ForgetGraph() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_ForgetGraph() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ForgetGraph(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) final override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestForgetGraph(::grpc::ServerContext* context, flatbuffers::grpc::Message* request, ::grpc::ServerAsyncResponseWriter< flatbuffers::grpc::Message>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_ReplaceGraph : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_ReplaceGraph() { + ::grpc::Service::MarkMethodAsync(2); + } + ~WithAsyncMethod_ReplaceGraph() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ReplaceGraph(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) final override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestReplaceGraph(::grpc::ServerContext* context, flatbuffers::grpc::Message* request, ::grpc::ServerAsyncResponseWriter< flatbuffers::grpc::Message>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_InferenceRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_InferenceRequest() { + ::grpc::Service::MarkMethodAsync(3); + } + ~WithAsyncMethod_InferenceRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status InferenceRequest(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) final override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestInferenceRequest(::grpc::ServerContext* context, flatbuffers::grpc::Message* request, ::grpc::ServerAsyncResponseWriter< flatbuffers::grpc::Message>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(3, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_RegisterGraph< WithAsyncMethod_ForgetGraph< WithAsyncMethod_ReplaceGraph< WithAsyncMethod_InferenceRequest< Service > > > > AsyncService; + template + class WithGenericMethod_RegisterGraph : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_RegisterGraph() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_RegisterGraph() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status RegisterGraph(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) final override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_ForgetGraph : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_ForgetGraph() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_ForgetGraph() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ForgetGraph(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) final override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_ReplaceGraph : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_ReplaceGraph() { + ::grpc::Service::MarkMethodGeneric(2); + } + ~WithGenericMethod_ReplaceGraph() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ReplaceGraph(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) final override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_InferenceRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_InferenceRequest() { + ::grpc::Service::MarkMethodGeneric(3); + } + ~WithGenericMethod_InferenceRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status InferenceRequest(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) final override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithStreamedUnaryMethod_RegisterGraph : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithStreamedUnaryMethod_RegisterGraph() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< flatbuffers::grpc::Message, flatbuffers::grpc::Message>(std::bind(&WithStreamedUnaryMethod_RegisterGraph::StreamedRegisterGraph, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_RegisterGraph() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status RegisterGraph(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) final override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedRegisterGraph(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< flatbuffers::grpc::Message,flatbuffers::grpc::Message>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_ForgetGraph : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithStreamedUnaryMethod_ForgetGraph() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< flatbuffers::grpc::Message, flatbuffers::grpc::Message>(std::bind(&WithStreamedUnaryMethod_ForgetGraph::StreamedForgetGraph, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_ForgetGraph() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status ForgetGraph(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) final override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedForgetGraph(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< flatbuffers::grpc::Message,flatbuffers::grpc::Message>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_ReplaceGraph : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithStreamedUnaryMethod_ReplaceGraph() { + ::grpc::Service::MarkMethodStreamed(2, + new ::grpc::internal::StreamedUnaryHandler< flatbuffers::grpc::Message, flatbuffers::grpc::Message>(std::bind(&WithStreamedUnaryMethod_ReplaceGraph::StreamedReplaceGraph, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_ReplaceGraph() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status ReplaceGraph(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) final override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedReplaceGraph(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< flatbuffers::grpc::Message,flatbuffers::grpc::Message>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_InferenceRequest : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithStreamedUnaryMethod_InferenceRequest() { + ::grpc::Service::MarkMethodStreamed(3, + new ::grpc::internal::StreamedUnaryHandler< flatbuffers::grpc::Message, flatbuffers::grpc::Message>(std::bind(&WithStreamedUnaryMethod_InferenceRequest::StreamedInferenceRequest, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_InferenceRequest() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status InferenceRequest(::grpc::ServerContext* context, const flatbuffers::grpc::Message* request, flatbuffers::grpc::Message* response) final override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedInferenceRequest(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< flatbuffers::grpc::Message,flatbuffers::grpc::Message>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_RegisterGraph< WithStreamedUnaryMethod_ForgetGraph< WithStreamedUnaryMethod_ReplaceGraph< WithStreamedUnaryMethod_InferenceRequest< Service > > > > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_RegisterGraph< WithStreamedUnaryMethod_ForgetGraph< WithStreamedUnaryMethod_ReplaceGraph< WithStreamedUnaryMethod_InferenceRequest< Service > > > > StreamedService; +}; + +} // namespace graph +} // namespace sd + + +#endif // GRPC_graph__INCLUDED diff --git a/libnd4j/include/graph/generated/graph_generated.h b/libnd4j/include/graph/generated/graph_generated.h new file mode 100644 index 000000000..1285e4607 --- /dev/null +++ b/libnd4j/include/graph/generated/graph_generated.h @@ -0,0 +1,377 @@ +// automatically generated by the FlatBuffers compiler, do not modify + + +#ifndef FLATBUFFERS_GENERATED_GRAPH_ND4J_GRAPH_H_ +#define FLATBUFFERS_GENERATED_GRAPH_ND4J_GRAPH_H_ + +#include "flatbuffers/flatbuffers.h" + +#include "array_generated.h" +#include "config_generated.h" +#include "node_generated.h" +#include "properties_generated.h" +#include "request_generated.h" +#include "result_generated.h" +#include "utils_generated.h" +#include "variable_generated.h" + +namespace sd { +namespace graph { + +struct UpdaterState; + +struct FlatGraph; + +struct FlatDropRequest; + +struct FlatResponse; + +struct UpdaterState FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_PARAMNAME = 4, + VT_UPDATERSTATEKEYS = 6, + VT_UPDATERSTATEVALUES = 8 + }; + const flatbuffers::String *paramName() const { + return GetPointer(VT_PARAMNAME); + } + const flatbuffers::Vector> *updaterStateKeys() const { + return GetPointer> *>(VT_UPDATERSTATEKEYS); + } + const flatbuffers::Vector> *updaterStateValues() const { + return GetPointer> *>(VT_UPDATERSTATEVALUES); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_PARAMNAME) && + verifier.VerifyString(paramName()) && + VerifyOffset(verifier, VT_UPDATERSTATEKEYS) && + verifier.VerifyVector(updaterStateKeys()) && + verifier.VerifyVectorOfStrings(updaterStateKeys()) && + VerifyOffset(verifier, VT_UPDATERSTATEVALUES) && + verifier.VerifyVector(updaterStateValues()) && + verifier.VerifyVectorOfTables(updaterStateValues()) && + verifier.EndTable(); + } +}; + +struct UpdaterStateBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_paramName(flatbuffers::Offset paramName) { + fbb_.AddOffset(UpdaterState::VT_PARAMNAME, paramName); + } + void add_updaterStateKeys(flatbuffers::Offset>> updaterStateKeys) { + fbb_.AddOffset(UpdaterState::VT_UPDATERSTATEKEYS, updaterStateKeys); + } + void add_updaterStateValues(flatbuffers::Offset>> updaterStateValues) { + fbb_.AddOffset(UpdaterState::VT_UPDATERSTATEVALUES, updaterStateValues); + } + explicit UpdaterStateBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + UpdaterStateBuilder &operator=(const UpdaterStateBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUpdaterState( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset paramName = 0, + flatbuffers::Offset>> updaterStateKeys = 0, + flatbuffers::Offset>> updaterStateValues = 0) { + UpdaterStateBuilder builder_(_fbb); + builder_.add_updaterStateValues(updaterStateValues); + builder_.add_updaterStateKeys(updaterStateKeys); + builder_.add_paramName(paramName); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateUpdaterStateDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *paramName = nullptr, + const std::vector> *updaterStateKeys = nullptr, + const std::vector> *updaterStateValues = nullptr) { + return sd::graph::CreateUpdaterState( + _fbb, + paramName ? _fbb.CreateString(paramName) : 0, + updaterStateKeys ? _fbb.CreateVector>(*updaterStateKeys) : 0, + updaterStateValues ? _fbb.CreateVector>(*updaterStateValues) : 0); +} + +struct FlatGraph FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_ID = 4, + VT_VARIABLES = 6, + VT_NODES = 8, + VT_OUTPUTS = 10, + VT_CONFIGURATION = 12, + VT_PLACEHOLDERS = 14, + VT_LOSSVARIABLES = 16, + VT_TRAININGCONFIG = 18, + VT_UPDATERSTATE = 20 + }; + int64_t id() const { + return GetField(VT_ID, 0); + } + const flatbuffers::Vector> *variables() const { + return GetPointer> *>(VT_VARIABLES); + } + const flatbuffers::Vector> *nodes() const { + return GetPointer> *>(VT_NODES); + } + const flatbuffers::Vector> *outputs() const { + return GetPointer> *>(VT_OUTPUTS); + } + const FlatConfiguration *configuration() const { + return GetPointer(VT_CONFIGURATION); + } + const flatbuffers::Vector> *placeholders() const { + return GetPointer> *>(VT_PLACEHOLDERS); + } + const flatbuffers::Vector> *lossVariables() const { + return GetPointer> *>(VT_LOSSVARIABLES); + } + const flatbuffers::String *trainingConfig() const { + return GetPointer(VT_TRAININGCONFIG); + } + const flatbuffers::Vector> *updaterState() const { + return GetPointer> *>(VT_UPDATERSTATE); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ID) && + VerifyOffset(verifier, VT_VARIABLES) && + verifier.VerifyVector(variables()) && + verifier.VerifyVectorOfTables(variables()) && + VerifyOffset(verifier, VT_NODES) && + verifier.VerifyVector(nodes()) && + verifier.VerifyVectorOfTables(nodes()) && + VerifyOffset(verifier, VT_OUTPUTS) && + verifier.VerifyVector(outputs()) && + verifier.VerifyVectorOfTables(outputs()) && + VerifyOffset(verifier, VT_CONFIGURATION) && + verifier.VerifyTable(configuration()) && + VerifyOffset(verifier, VT_PLACEHOLDERS) && + verifier.VerifyVector(placeholders()) && + verifier.VerifyVectorOfStrings(placeholders()) && + VerifyOffset(verifier, VT_LOSSVARIABLES) && + verifier.VerifyVector(lossVariables()) && + verifier.VerifyVectorOfStrings(lossVariables()) && + VerifyOffset(verifier, VT_TRAININGCONFIG) && + verifier.VerifyString(trainingConfig()) && + VerifyOffset(verifier, VT_UPDATERSTATE) && + verifier.VerifyVector(updaterState()) && + verifier.VerifyVectorOfTables(updaterState()) && + verifier.EndTable(); + } +}; + +struct FlatGraphBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_id(int64_t id) { + fbb_.AddElement(FlatGraph::VT_ID, id, 0); + } + void add_variables(flatbuffers::Offset>> variables) { + fbb_.AddOffset(FlatGraph::VT_VARIABLES, variables); + } + void add_nodes(flatbuffers::Offset>> nodes) { + fbb_.AddOffset(FlatGraph::VT_NODES, nodes); + } + void add_outputs(flatbuffers::Offset>> outputs) { + fbb_.AddOffset(FlatGraph::VT_OUTPUTS, outputs); + } + void add_configuration(flatbuffers::Offset configuration) { + fbb_.AddOffset(FlatGraph::VT_CONFIGURATION, configuration); + } + void add_placeholders(flatbuffers::Offset>> placeholders) { + fbb_.AddOffset(FlatGraph::VT_PLACEHOLDERS, placeholders); + } + void add_lossVariables(flatbuffers::Offset>> lossVariables) { + fbb_.AddOffset(FlatGraph::VT_LOSSVARIABLES, lossVariables); + } + void add_trainingConfig(flatbuffers::Offset trainingConfig) { + fbb_.AddOffset(FlatGraph::VT_TRAININGCONFIG, trainingConfig); + } + void add_updaterState(flatbuffers::Offset>> updaterState) { + fbb_.AddOffset(FlatGraph::VT_UPDATERSTATE, updaterState); + } + explicit FlatGraphBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + FlatGraphBuilder &operator=(const FlatGraphBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateFlatGraph( + flatbuffers::FlatBufferBuilder &_fbb, + int64_t id = 0, + flatbuffers::Offset>> variables = 0, + flatbuffers::Offset>> nodes = 0, + flatbuffers::Offset>> outputs = 0, + flatbuffers::Offset configuration = 0, + flatbuffers::Offset>> placeholders = 0, + flatbuffers::Offset>> lossVariables = 0, + flatbuffers::Offset trainingConfig = 0, + flatbuffers::Offset>> updaterState = 0) { + FlatGraphBuilder builder_(_fbb); + builder_.add_id(id); + builder_.add_updaterState(updaterState); + builder_.add_trainingConfig(trainingConfig); + builder_.add_lossVariables(lossVariables); + builder_.add_placeholders(placeholders); + builder_.add_configuration(configuration); + builder_.add_outputs(outputs); + builder_.add_nodes(nodes); + builder_.add_variables(variables); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateFlatGraphDirect( + flatbuffers::FlatBufferBuilder &_fbb, + int64_t id = 0, + const std::vector> *variables = nullptr, + const std::vector> *nodes = nullptr, + const std::vector> *outputs = nullptr, + flatbuffers::Offset configuration = 0, + const std::vector> *placeholders = nullptr, + const std::vector> *lossVariables = nullptr, + const char *trainingConfig = nullptr, + const std::vector> *updaterState = nullptr) { + return sd::graph::CreateFlatGraph( + _fbb, + id, + variables ? _fbb.CreateVector>(*variables) : 0, + nodes ? _fbb.CreateVector>(*nodes) : 0, + outputs ? _fbb.CreateVector>(*outputs) : 0, + configuration, + placeholders ? _fbb.CreateVector>(*placeholders) : 0, + lossVariables ? _fbb.CreateVector>(*lossVariables) : 0, + trainingConfig ? _fbb.CreateString(trainingConfig) : 0, + updaterState ? _fbb.CreateVector>(*updaterState) : 0); +} + +struct FlatDropRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_ID = 4 + }; + int64_t id() const { + return GetField(VT_ID, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ID) && + verifier.EndTable(); + } +}; + +struct FlatDropRequestBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_id(int64_t id) { + fbb_.AddElement(FlatDropRequest::VT_ID, id, 0); + } + explicit FlatDropRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + FlatDropRequestBuilder &operator=(const FlatDropRequestBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateFlatDropRequest( + flatbuffers::FlatBufferBuilder &_fbb, + int64_t id = 0) { + FlatDropRequestBuilder builder_(_fbb); + builder_.add_id(id); + return builder_.Finish(); +} + +struct FlatResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_STATUS = 4 + }; + int32_t status() const { + return GetField(VT_STATUS, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_STATUS) && + verifier.EndTable(); + } +}; + +struct FlatResponseBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_status(int32_t status) { + fbb_.AddElement(FlatResponse::VT_STATUS, status, 0); + } + explicit FlatResponseBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + FlatResponseBuilder &operator=(const FlatResponseBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateFlatResponse( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t status = 0) { + FlatResponseBuilder builder_(_fbb); + builder_.add_status(status); + return builder_.Finish(); +} + +inline const sd::graph::FlatGraph *GetFlatGraph(const void *buf) { + return flatbuffers::GetRoot(buf); +} + +inline const sd::graph::FlatGraph *GetSizePrefixedFlatGraph(const void *buf) { + return flatbuffers::GetSizePrefixedRoot(buf); +} + +inline bool VerifyFlatGraphBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifyBuffer(nullptr); +} + +inline bool VerifySizePrefixedFlatGraphBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifySizePrefixedBuffer(nullptr); +} + +inline void FinishFlatGraphBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.Finish(root); +} + +inline void FinishSizePrefixedFlatGraphBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.FinishSizePrefixed(root); +} + +} // namespace graph +} // namespace sd + +#endif // FLATBUFFERS_GENERATED_GRAPH_ND4J_GRAPH_H_ diff --git a/libnd4j/include/graph/generated/graph_generated.js b/libnd4j/include/graph/generated/graph_generated.js new file mode 100644 index 000000000..24e5cea9d --- /dev/null +++ b/libnd4j/include/graph/generated/graph_generated.js @@ -0,0 +1,721 @@ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ + +/** + * @const + * @namespace + */ +var nd4j = nd4j || {}; + +/** + * @const + * @namespace + */ +nd4j.graph = nd4j.graph || {}; + +/** + * @constructor + */ +nd4j.graph.UpdaterState = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.UpdaterState} + */ +nd4j.graph.UpdaterState.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.UpdaterState=} obj + * @returns {nd4j.graph.UpdaterState} + */ +nd4j.graph.UpdaterState.getRootAsUpdaterState = function(bb, obj) { + return (obj || new nd4j.graph.UpdaterState).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.UpdaterState.prototype.paramName = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.UpdaterState.prototype.updaterStateKeys = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UpdaterState.prototype.updaterStateKeysLength = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {nd4j.graph.FlatArray=} obj + * @returns {nd4j.graph.FlatArray} + */ +nd4j.graph.UpdaterState.prototype.updaterStateValues = function(index, obj) { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? (obj || new nd4j.graph.FlatArray).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UpdaterState.prototype.updaterStateValuesLength = function() { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.UpdaterState.startUpdaterState = function(builder) { + builder.startObject(3); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} paramNameOffset + */ +nd4j.graph.UpdaterState.addParamName = function(builder, paramNameOffset) { + builder.addFieldOffset(0, paramNameOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} updaterStateKeysOffset + */ +nd4j.graph.UpdaterState.addUpdaterStateKeys = function(builder, updaterStateKeysOffset) { + builder.addFieldOffset(1, updaterStateKeysOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UpdaterState.createUpdaterStateKeysVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UpdaterState.startUpdaterStateKeysVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} updaterStateValuesOffset + */ +nd4j.graph.UpdaterState.addUpdaterStateValues = function(builder, updaterStateValuesOffset) { + builder.addFieldOffset(2, updaterStateValuesOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UpdaterState.createUpdaterStateValuesVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UpdaterState.startUpdaterStateValuesVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UpdaterState.endUpdaterState = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @constructor + */ +nd4j.graph.FlatGraph = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.FlatGraph} + */ +nd4j.graph.FlatGraph.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.FlatGraph=} obj + * @returns {nd4j.graph.FlatGraph} + */ +nd4j.graph.FlatGraph.getRootAsFlatGraph = function(bb, obj) { + return (obj || new nd4j.graph.FlatGraph).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.FlatGraph.prototype.id = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @param {number} index + * @param {nd4j.graph.FlatVariable=} obj + * @returns {nd4j.graph.FlatVariable} + */ +nd4j.graph.FlatGraph.prototype.variables = function(index, obj) { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? (obj || new nd4j.graph.FlatVariable).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatGraph.prototype.variablesLength = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {nd4j.graph.FlatNode=} obj + * @returns {nd4j.graph.FlatNode} + */ +nd4j.graph.FlatGraph.prototype.nodes = function(index, obj) { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? (obj || new nd4j.graph.FlatNode).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatGraph.prototype.nodesLength = function() { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {nd4j.graph.IntPair=} obj + * @returns {nd4j.graph.IntPair} + */ +nd4j.graph.FlatGraph.prototype.outputs = function(index, obj) { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? (obj || new nd4j.graph.IntPair).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatGraph.prototype.outputsLength = function() { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {nd4j.graph.FlatConfiguration=} obj + * @returns {nd4j.graph.FlatConfiguration|null} + */ +nd4j.graph.FlatGraph.prototype.configuration = function(obj) { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? (obj || new nd4j.graph.FlatConfiguration).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.FlatGraph.prototype.placeholders = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatGraph.prototype.placeholdersLength = function() { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.FlatGraph.prototype.lossVariables = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 16); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatGraph.prototype.lossVariablesLength = function() { + var offset = this.bb.__offset(this.bb_pos, 16); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.FlatGraph.prototype.trainingConfig = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 18); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @param {number} index + * @param {nd4j.graph.UpdaterState=} obj + * @returns {nd4j.graph.UpdaterState} + */ +nd4j.graph.FlatGraph.prototype.updaterState = function(index, obj) { + var offset = this.bb.__offset(this.bb_pos, 20); + return offset ? (obj || new nd4j.graph.UpdaterState).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatGraph.prototype.updaterStateLength = function() { + var offset = this.bb.__offset(this.bb_pos, 20); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.FlatGraph.startFlatGraph = function(builder) { + builder.startObject(9); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} id + */ +nd4j.graph.FlatGraph.addId = function(builder, id) { + builder.addFieldInt64(0, id, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} variablesOffset + */ +nd4j.graph.FlatGraph.addVariables = function(builder, variablesOffset) { + builder.addFieldOffset(1, variablesOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatGraph.createVariablesVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatGraph.startVariablesVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} nodesOffset + */ +nd4j.graph.FlatGraph.addNodes = function(builder, nodesOffset) { + builder.addFieldOffset(2, nodesOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatGraph.createNodesVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatGraph.startNodesVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} outputsOffset + */ +nd4j.graph.FlatGraph.addOutputs = function(builder, outputsOffset) { + builder.addFieldOffset(3, outputsOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatGraph.createOutputsVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatGraph.startOutputsVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} configurationOffset + */ +nd4j.graph.FlatGraph.addConfiguration = function(builder, configurationOffset) { + builder.addFieldOffset(4, configurationOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} placeholdersOffset + */ +nd4j.graph.FlatGraph.addPlaceholders = function(builder, placeholdersOffset) { + builder.addFieldOffset(5, placeholdersOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatGraph.createPlaceholdersVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatGraph.startPlaceholdersVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} lossVariablesOffset + */ +nd4j.graph.FlatGraph.addLossVariables = function(builder, lossVariablesOffset) { + builder.addFieldOffset(6, lossVariablesOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatGraph.createLossVariablesVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatGraph.startLossVariablesVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} trainingConfigOffset + */ +nd4j.graph.FlatGraph.addTrainingConfig = function(builder, trainingConfigOffset) { + builder.addFieldOffset(7, trainingConfigOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} updaterStateOffset + */ +nd4j.graph.FlatGraph.addUpdaterState = function(builder, updaterStateOffset) { + builder.addFieldOffset(8, updaterStateOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatGraph.createUpdaterStateVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatGraph.startUpdaterStateVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatGraph.endFlatGraph = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} offset + */ +nd4j.graph.FlatGraph.finishFlatGraphBuffer = function(builder, offset) { + builder.finish(offset); +}; + +/** + * @constructor + */ +nd4j.graph.FlatDropRequest = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.FlatDropRequest} + */ +nd4j.graph.FlatDropRequest.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.FlatDropRequest=} obj + * @returns {nd4j.graph.FlatDropRequest} + */ +nd4j.graph.FlatDropRequest.getRootAsFlatDropRequest = function(bb, obj) { + return (obj || new nd4j.graph.FlatDropRequest).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.FlatDropRequest.prototype.id = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.FlatDropRequest.startFlatDropRequest = function(builder) { + builder.startObject(1); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} id + */ +nd4j.graph.FlatDropRequest.addId = function(builder, id) { + builder.addFieldInt64(0, id, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatDropRequest.endFlatDropRequest = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @constructor + */ +nd4j.graph.FlatResponse = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.FlatResponse} + */ +nd4j.graph.FlatResponse.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.FlatResponse=} obj + * @returns {nd4j.graph.FlatResponse} + */ +nd4j.graph.FlatResponse.getRootAsFlatResponse = function(bb, obj) { + return (obj || new nd4j.graph.FlatResponse).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatResponse.prototype.status = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.FlatResponse.startFlatResponse = function(builder) { + builder.startObject(1); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} status + */ +nd4j.graph.FlatResponse.addStatus = function(builder, status) { + builder.addFieldInt32(0, status, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatResponse.endFlatResponse = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +// Exports for Node.js and RequireJS +this.nd4j = nd4j; diff --git a/libnd4j/include/graph/generated/nd4j/__init__.py b/libnd4j/include/graph/generated/nd4j/__init__.py new file mode 100644 index 000000000..ecf2a1c25 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/__init__.py @@ -0,0 +1,18 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + diff --git a/libnd4j/include/graph/generated/nd4j/graph/ByteOrder.cs b/libnd4j/include/graph/generated/nd4j/graph/ByteOrder.cs new file mode 100644 index 000000000..5b20d143f --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/ByteOrder.cs @@ -0,0 +1,15 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +public enum ByteOrder : sbyte +{ + LE = 0, + BE = 1, +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/ByteOrder.java b/libnd4j/include/graph/generated/nd4j/graph/ByteOrder.java new file mode 100644 index 000000000..b0d703b61 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/ByteOrder.java @@ -0,0 +1,14 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +public final class ByteOrder { + private ByteOrder() { } + public static final byte LE = 0; + public static final byte BE = 1; + + public static final String[] names = { "LE", "BE", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/ByteOrder.py b/libnd4j/include/graph/generated/nd4j/graph/ByteOrder.py new file mode 100644 index 000000000..8e3a0f0fb --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/ByteOrder.py @@ -0,0 +1,22 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +class ByteOrder(object): + LE = 0 + BE = 1 + diff --git a/libnd4j/include/graph/generated/nd4j/graph/DType.cs b/libnd4j/include/graph/generated/nd4j/graph/DType.cs new file mode 100644 index 000000000..f6fd2778c --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/DType.cs @@ -0,0 +1,34 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +public enum DType : sbyte +{ + INHERIT = 0, + BOOL = 1, + FLOAT8 = 2, + HALF = 3, + HALF2 = 4, + FLOAT = 5, + DOUBLE = 6, + INT8 = 7, + INT16 = 8, + INT32 = 9, + INT64 = 10, + UINT8 = 11, + UINT16 = 12, + UINT32 = 13, + UINT64 = 14, + QINT8 = 15, + QINT16 = 16, + BFLOAT16 = 17, + UTF8 = 50, + UTF16 = 51, + UTF32 = 52, +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/DType.java b/libnd4j/include/graph/generated/nd4j/graph/DType.java new file mode 100644 index 000000000..c1b394ca7 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/DType.java @@ -0,0 +1,33 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +public final class DType { + private DType() { } + public static final byte INHERIT = 0; + public static final byte BOOL = 1; + public static final byte FLOAT8 = 2; + public static final byte HALF = 3; + public static final byte HALF2 = 4; + public static final byte FLOAT = 5; + public static final byte DOUBLE = 6; + public static final byte INT8 = 7; + public static final byte INT16 = 8; + public static final byte INT32 = 9; + public static final byte INT64 = 10; + public static final byte UINT8 = 11; + public static final byte UINT16 = 12; + public static final byte UINT32 = 13; + public static final byte UINT64 = 14; + public static final byte QINT8 = 15; + public static final byte QINT16 = 16; + public static final byte BFLOAT16 = 17; + public static final byte UTF8 = 50; + public static final byte UTF16 = 51; + public static final byte UTF32 = 52; + + public static final String[] names = { "INHERIT", "BOOL", "FLOAT8", "HALF", "HALF2", "FLOAT", "DOUBLE", "INT8", "INT16", "INT32", "INT64", "UINT8", "UINT16", "UINT32", "UINT64", "QINT8", "QINT16", "BFLOAT16", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "UTF8", "UTF16", "UTF32", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/DType.py b/libnd4j/include/graph/generated/nd4j/graph/DType.py new file mode 100644 index 000000000..d15188647 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/DType.py @@ -0,0 +1,41 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +class DType(object): + INHERIT = 0 + BOOL = 1 + FLOAT8 = 2 + HALF = 3 + HALF2 = 4 + FLOAT = 5 + DOUBLE = 6 + INT8 = 7 + INT16 = 8 + INT32 = 9 + INT64 = 10 + UINT8 = 11 + UINT16 = 12 + UINT32 = 13 + UINT64 = 14 + QINT8 = 15 + QINT16 = 16 + BFLOAT16 = 17 + UTF8 = 50 + UTF16 = 51 + UTF32 = 52 + diff --git a/libnd4j/include/graph/generated/nd4j/graph/Direction.cs b/libnd4j/include/graph/generated/nd4j/graph/Direction.cs new file mode 100644 index 000000000..d93c1e947 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/Direction.cs @@ -0,0 +1,16 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +public enum Direction : sbyte +{ + FORWARD_ONLY = 0, + FORWARD_AND_BACKWARD = 1, + BACKWARD_ONLY = 2, +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/Direction.java b/libnd4j/include/graph/generated/nd4j/graph/Direction.java new file mode 100644 index 000000000..dd53517f6 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/Direction.java @@ -0,0 +1,15 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +public final class Direction { + private Direction() { } + public static final byte FORWARD_ONLY = 0; + public static final byte FORWARD_AND_BACKWARD = 1; + public static final byte BACKWARD_ONLY = 2; + + public static final String[] names = { "FORWARD_ONLY", "FORWARD_AND_BACKWARD", "BACKWARD_ONLY", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/Direction.py b/libnd4j/include/graph/generated/nd4j/graph/Direction.py new file mode 100644 index 000000000..9c6771d99 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/Direction.py @@ -0,0 +1,23 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +class Direction(object): + FORWARD_ONLY = 0 + FORWARD_AND_BACKWARD = 1 + BACKWARD_ONLY = 2 + diff --git a/libnd4j/include/graph/generated/nd4j/graph/ExecutionMode.cs b/libnd4j/include/graph/generated/nd4j/graph/ExecutionMode.cs new file mode 100644 index 000000000..77f54df5b --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/ExecutionMode.cs @@ -0,0 +1,16 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +public enum ExecutionMode : sbyte +{ + SEQUENTIAL = 0, + STRICT = 1, + AUTO = 2, +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/ExecutionMode.java b/libnd4j/include/graph/generated/nd4j/graph/ExecutionMode.java new file mode 100644 index 000000000..5db2864ef --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/ExecutionMode.java @@ -0,0 +1,15 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +public final class ExecutionMode { + private ExecutionMode() { } + public static final byte SEQUENTIAL = 0; + public static final byte STRICT = 1; + public static final byte AUTO = 2; + + public static final String[] names = { "SEQUENTIAL", "STRICT", "AUTO", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/ExecutionMode.py b/libnd4j/include/graph/generated/nd4j/graph/ExecutionMode.py new file mode 100644 index 000000000..ae66b0bf5 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/ExecutionMode.py @@ -0,0 +1,23 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +class ExecutionMode(object): + SEQUENTIAL = 0 + STRICT = 1 + AUTO = 2 + diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatArray.cs b/libnd4j/include/graph/generated/nd4j/graph/FlatArray.cs new file mode 100644 index 000000000..6a4aad3f2 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatArray.cs @@ -0,0 +1,72 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct FlatArray : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static FlatArray GetRootAsFlatArray(ByteBuffer _bb) { return GetRootAsFlatArray(_bb, new FlatArray()); } + public static FlatArray GetRootAsFlatArray(ByteBuffer _bb, FlatArray obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public FlatArray __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long Shape(int j) { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } + public int ShapeLength { get { int o = __p.__offset(4); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetShapeBytes() { return __p.__vector_as_span(4); } +#else + public ArraySegment? GetShapeBytes() { return __p.__vector_as_arraysegment(4); } +#endif + public long[] GetShapeArray() { return __p.__vector_as_array(4); } + public sbyte Buffer(int j) { int o = __p.__offset(6); return o != 0 ? __p.bb.GetSbyte(__p.__vector(o) + j * 1) : (sbyte)0; } + public int BufferLength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetBufferBytes() { return __p.__vector_as_span(6); } +#else + public ArraySegment? GetBufferBytes() { return __p.__vector_as_arraysegment(6); } +#endif + public sbyte[] GetBufferArray() { return __p.__vector_as_array(6); } + public DType Dtype { get { int o = __p.__offset(8); return o != 0 ? (DType)__p.bb.GetSbyte(o + __p.bb_pos) : DType.INHERIT; } } + public ByteOrder ByteOrder { get { int o = __p.__offset(10); return o != 0 ? (ByteOrder)__p.bb.GetSbyte(o + __p.bb_pos) : ByteOrder.LE; } } + + public static Offset CreateFlatArray(FlatBufferBuilder builder, + VectorOffset shapeOffset = default(VectorOffset), + VectorOffset bufferOffset = default(VectorOffset), + DType dtype = DType.INHERIT, + ByteOrder byteOrder = ByteOrder.LE) { + builder.StartObject(4); + FlatArray.AddBuffer(builder, bufferOffset); + FlatArray.AddShape(builder, shapeOffset); + FlatArray.AddByteOrder(builder, byteOrder); + FlatArray.AddDtype(builder, dtype); + return FlatArray.EndFlatArray(builder); + } + + public static void StartFlatArray(FlatBufferBuilder builder) { builder.StartObject(4); } + public static void AddShape(FlatBufferBuilder builder, VectorOffset shapeOffset) { builder.AddOffset(0, shapeOffset.Value, 0); } + public static VectorOffset CreateShapeVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); } + public static VectorOffset CreateShapeVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } + public static void StartShapeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } + public static void AddBuffer(FlatBufferBuilder builder, VectorOffset bufferOffset) { builder.AddOffset(1, bufferOffset.Value, 0); } + public static VectorOffset CreateBufferVector(FlatBufferBuilder builder, sbyte[] data) { builder.StartVector(1, data.Length, 1); for (int i = data.Length - 1; i >= 0; i--) builder.AddSbyte(data[i]); return builder.EndVector(); } + public static VectorOffset CreateBufferVectorBlock(FlatBufferBuilder builder, sbyte[] data) { builder.StartVector(1, data.Length, 1); builder.Add(data); return builder.EndVector(); } + public static void StartBufferVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(1, numElems, 1); } + public static void AddDtype(FlatBufferBuilder builder, DType dtype) { builder.AddSbyte(2, (sbyte)dtype, 0); } + public static void AddByteOrder(FlatBufferBuilder builder, ByteOrder byteOrder) { builder.AddSbyte(3, (sbyte)byteOrder, 0); } + public static Offset EndFlatArray(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } + public static void FinishFlatArrayBuffer(FlatBufferBuilder builder, Offset offset) { builder.Finish(offset.Value); } + public static void FinishSizePrefixedFlatArrayBuffer(FlatBufferBuilder builder, Offset offset) { builder.FinishSizePrefixed(offset.Value); } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatArray.java b/libnd4j/include/graph/generated/nd4j/graph/FlatArray.java new file mode 100644 index 000000000..81c43d04a --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatArray.java @@ -0,0 +1,57 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FlatArray extends Table { + public static FlatArray getRootAsFlatArray(ByteBuffer _bb) { return getRootAsFlatArray(_bb, new FlatArray()); } + public static FlatArray getRootAsFlatArray(ByteBuffer _bb, FlatArray obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public FlatArray __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long shape(int j) { int o = __offset(4); return o != 0 ? bb.getLong(__vector(o) + j * 8) : 0; } + public int shapeLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer shapeAsByteBuffer() { return __vector_as_bytebuffer(4, 8); } + public ByteBuffer shapeInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 8); } + public byte buffer(int j) { int o = __offset(6); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int bufferLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer bufferAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer bufferInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + public byte dtype() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) : 0; } + public byte byteOrder() { int o = __offset(10); return o != 0 ? bb.get(o + bb_pos) : 0; } + + public static int createFlatArray(FlatBufferBuilder builder, + int shapeOffset, + int bufferOffset, + byte dtype, + byte byteOrder) { + builder.startObject(4); + FlatArray.addBuffer(builder, bufferOffset); + FlatArray.addShape(builder, shapeOffset); + FlatArray.addByteOrder(builder, byteOrder); + FlatArray.addDtype(builder, dtype); + return FlatArray.endFlatArray(builder); + } + + public static void startFlatArray(FlatBufferBuilder builder) { builder.startObject(4); } + public static void addShape(FlatBufferBuilder builder, int shapeOffset) { builder.addOffset(0, shapeOffset, 0); } + public static int createShapeVector(FlatBufferBuilder builder, long[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addLong(data[i]); return builder.endVector(); } + public static void startShapeVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); } + public static void addBuffer(FlatBufferBuilder builder, int bufferOffset) { builder.addOffset(1, bufferOffset, 0); } + public static int createBufferVector(FlatBufferBuilder builder, byte[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addByte(data[i]); return builder.endVector(); } + public static void startBufferVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addDtype(FlatBufferBuilder builder, byte dtype) { builder.addByte(2, dtype, 0); } + public static void addByteOrder(FlatBufferBuilder builder, byte byteOrder) { builder.addByte(3, byteOrder, 0); } + public static int endFlatArray(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } + public static void finishFlatArrayBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); } + public static void finishSizePrefixedFlatArrayBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset); } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatArray.py b/libnd4j/include/graph/generated/nd4j/graph/FlatArray.py new file mode 100644 index 000000000..c6ff07d5f --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatArray.py @@ -0,0 +1,100 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class FlatArray(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsFlatArray(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = FlatArray() + x.Init(buf, n + offset) + return x + + # FlatArray + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # FlatArray + def Shape(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) + return 0 + + # FlatArray + def ShapeAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) + return 0 + + # FlatArray + def ShapeLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatArray + def Buffer(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.Int8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1)) + return 0 + + # FlatArray + def BufferAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int8Flags, o) + return 0 + + # FlatArray + def BufferLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatArray + def Dtype(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) + return 0 + + # FlatArray + def ByteOrder(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) + return 0 + +def FlatArrayStart(builder): builder.StartObject(4) +def FlatArrayAddShape(builder, shape): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(shape), 0) +def FlatArrayStartShapeVector(builder, numElems): return builder.StartVector(8, numElems, 8) +def FlatArrayAddBuffer(builder, buffer): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(buffer), 0) +def FlatArrayStartBufferVector(builder, numElems): return builder.StartVector(1, numElems, 1) +def FlatArrayAddDtype(builder, dtype): builder.PrependInt8Slot(2, dtype, 0) +def FlatArrayAddByteOrder(builder, byteOrder): builder.PrependInt8Slot(3, byteOrder, 0) +def FlatArrayEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatArrayList.cs b/libnd4j/include/graph/generated/nd4j/graph/FlatArrayList.cs new file mode 100644 index 000000000..dd2e17d32 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatArrayList.cs @@ -0,0 +1,42 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct FlatArrayList : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static FlatArrayList GetRootAsFlatArrayList(ByteBuffer _bb) { return GetRootAsFlatArrayList(_bb, new FlatArrayList()); } + public static FlatArrayList GetRootAsFlatArrayList(ByteBuffer _bb, FlatArrayList obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public FlatArrayList __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public FlatArray? List(int j) { int o = __p.__offset(4); return o != 0 ? (FlatArray?)(new FlatArray()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } + public int ListLength { get { int o = __p.__offset(4); return o != 0 ? __p.__vector_len(o) : 0; } } + + public static Offset CreateFlatArrayList(FlatBufferBuilder builder, + VectorOffset listOffset = default(VectorOffset)) { + builder.StartObject(1); + FlatArrayList.AddList(builder, listOffset); + return FlatArrayList.EndFlatArrayList(builder); + } + + public static void StartFlatArrayList(FlatBufferBuilder builder) { builder.StartObject(1); } + public static void AddList(FlatBufferBuilder builder, VectorOffset listOffset) { builder.AddOffset(0, listOffset.Value, 0); } + public static VectorOffset CreateListVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateListVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartListVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static Offset EndFlatArrayList(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatArrayList.java b/libnd4j/include/graph/generated/nd4j/graph/FlatArrayList.java new file mode 100644 index 000000000..74f1dbd29 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatArrayList.java @@ -0,0 +1,37 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FlatArrayList extends Table { + public static FlatArrayList getRootAsFlatArrayList(ByteBuffer _bb) { return getRootAsFlatArrayList(_bb, new FlatArrayList()); } + public static FlatArrayList getRootAsFlatArrayList(ByteBuffer _bb, FlatArrayList obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public FlatArrayList __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public FlatArray list(int j) { return list(new FlatArray(), j); } + public FlatArray list(FlatArray obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int listLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + + public static int createFlatArrayList(FlatBufferBuilder builder, + int listOffset) { + builder.startObject(1); + FlatArrayList.addList(builder, listOffset); + return FlatArrayList.endFlatArrayList(builder); + } + + public static void startFlatArrayList(FlatBufferBuilder builder) { builder.startObject(1); } + public static void addList(FlatBufferBuilder builder, int listOffset) { builder.addOffset(0, listOffset, 0); } + public static int createListVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startListVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endFlatArrayList(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatArrayList.py b/libnd4j/include/graph/generated/nd4j/graph/FlatArrayList.py new file mode 100644 index 000000000..dc0465bc0 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatArrayList.py @@ -0,0 +1,58 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class FlatArrayList(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsFlatArrayList(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = FlatArrayList() + x.Init(buf, n + offset) + return x + + # FlatArrayList + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # FlatArrayList + def List(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + x = self._tab.Vector(o) + x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 + x = self._tab.Indirect(x) + from .FlatArray import FlatArray + obj = FlatArray() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # FlatArrayList + def ListLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + +def FlatArrayListStart(builder): builder.StartObject(1) +def FlatArrayListAddList(builder, list): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(list), 0) +def FlatArrayListStartListVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatArrayListEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatConfiguration.cs b/libnd4j/include/graph/generated/nd4j/graph/FlatConfiguration.cs new file mode 100644 index 000000000..5c2edbf9b --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatConfiguration.cs @@ -0,0 +1,68 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct FlatConfiguration : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static FlatConfiguration GetRootAsFlatConfiguration(ByteBuffer _bb) { return GetRootAsFlatConfiguration(_bb, new FlatConfiguration()); } + public static FlatConfiguration GetRootAsFlatConfiguration(ByteBuffer _bb, FlatConfiguration obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public FlatConfiguration __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long Id { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + public ExecutionMode ExecutionMode { get { int o = __p.__offset(6); return o != 0 ? (ExecutionMode)__p.bb.GetSbyte(o + __p.bb_pos) : ExecutionMode.SEQUENTIAL; } } + public ProfilingMode ProfilingMode { get { int o = __p.__offset(8); return o != 0 ? (ProfilingMode)__p.bb.GetSbyte(o + __p.bb_pos) : ProfilingMode.NONE; } } + public OutputMode OutputMode { get { int o = __p.__offset(10); return o != 0 ? (OutputMode)__p.bb.GetSbyte(o + __p.bb_pos) : OutputMode.IMPLICIT; } } + public bool Timestats { get { int o = __p.__offset(12); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } } + public long FootprintForward { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + public long FootprintBackward { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + public Direction Direction { get { int o = __p.__offset(18); return o != 0 ? (Direction)__p.bb.GetSbyte(o + __p.bb_pos) : Direction.FORWARD_ONLY; } } + + public static Offset CreateFlatConfiguration(FlatBufferBuilder builder, + long id = 0, + ExecutionMode executionMode = ExecutionMode.SEQUENTIAL, + ProfilingMode profilingMode = ProfilingMode.NONE, + OutputMode outputMode = OutputMode.IMPLICIT, + bool timestats = false, + long footprintForward = 0, + long footprintBackward = 0, + Direction direction = Direction.FORWARD_ONLY) { + builder.StartObject(8); + FlatConfiguration.AddFootprintBackward(builder, footprintBackward); + FlatConfiguration.AddFootprintForward(builder, footprintForward); + FlatConfiguration.AddId(builder, id); + FlatConfiguration.AddDirection(builder, direction); + FlatConfiguration.AddTimestats(builder, timestats); + FlatConfiguration.AddOutputMode(builder, outputMode); + FlatConfiguration.AddProfilingMode(builder, profilingMode); + FlatConfiguration.AddExecutionMode(builder, executionMode); + return FlatConfiguration.EndFlatConfiguration(builder); + } + + public static void StartFlatConfiguration(FlatBufferBuilder builder) { builder.StartObject(8); } + public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } + public static void AddExecutionMode(FlatBufferBuilder builder, ExecutionMode executionMode) { builder.AddSbyte(1, (sbyte)executionMode, 0); } + public static void AddProfilingMode(FlatBufferBuilder builder, ProfilingMode profilingMode) { builder.AddSbyte(2, (sbyte)profilingMode, 0); } + public static void AddOutputMode(FlatBufferBuilder builder, OutputMode outputMode) { builder.AddSbyte(3, (sbyte)outputMode, 0); } + public static void AddTimestats(FlatBufferBuilder builder, bool timestats) { builder.AddBool(4, timestats, false); } + public static void AddFootprintForward(FlatBufferBuilder builder, long footprintForward) { builder.AddLong(5, footprintForward, 0); } + public static void AddFootprintBackward(FlatBufferBuilder builder, long footprintBackward) { builder.AddLong(6, footprintBackward, 0); } + public static void AddDirection(FlatBufferBuilder builder, Direction direction) { builder.AddSbyte(7, (sbyte)direction, 0); } + public static Offset EndFlatConfiguration(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } + public static void FinishFlatConfigurationBuffer(FlatBufferBuilder builder, Offset offset) { builder.Finish(offset.Value); } + public static void FinishSizePrefixedFlatConfigurationBuffer(FlatBufferBuilder builder, Offset offset) { builder.FinishSizePrefixed(offset.Value); } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatConfiguration.java b/libnd4j/include/graph/generated/nd4j/graph/FlatConfiguration.java new file mode 100644 index 000000000..e104f49d6 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatConfiguration.java @@ -0,0 +1,63 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FlatConfiguration extends Table { + public static FlatConfiguration getRootAsFlatConfiguration(ByteBuffer _bb) { return getRootAsFlatConfiguration(_bb, new FlatConfiguration()); } + public static FlatConfiguration getRootAsFlatConfiguration(ByteBuffer _bb, FlatConfiguration obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public FlatConfiguration __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long id() { int o = __offset(4); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public byte executionMode() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; } + public byte profilingMode() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) : 0; } + public byte outputMode() { int o = __offset(10); return o != 0 ? bb.get(o + bb_pos) : 0; } + public boolean timestats() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public long footprintForward() { int o = __offset(14); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public long footprintBackward() { int o = __offset(16); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public byte direction() { int o = __offset(18); return o != 0 ? bb.get(o + bb_pos) : 0; } + + public static int createFlatConfiguration(FlatBufferBuilder builder, + long id, + byte executionMode, + byte profilingMode, + byte outputMode, + boolean timestats, + long footprintForward, + long footprintBackward, + byte direction) { + builder.startObject(8); + FlatConfiguration.addFootprintBackward(builder, footprintBackward); + FlatConfiguration.addFootprintForward(builder, footprintForward); + FlatConfiguration.addId(builder, id); + FlatConfiguration.addDirection(builder, direction); + FlatConfiguration.addTimestats(builder, timestats); + FlatConfiguration.addOutputMode(builder, outputMode); + FlatConfiguration.addProfilingMode(builder, profilingMode); + FlatConfiguration.addExecutionMode(builder, executionMode); + return FlatConfiguration.endFlatConfiguration(builder); + } + + public static void startFlatConfiguration(FlatBufferBuilder builder) { builder.startObject(8); } + public static void addId(FlatBufferBuilder builder, long id) { builder.addLong(0, id, 0L); } + public static void addExecutionMode(FlatBufferBuilder builder, byte executionMode) { builder.addByte(1, executionMode, 0); } + public static void addProfilingMode(FlatBufferBuilder builder, byte profilingMode) { builder.addByte(2, profilingMode, 0); } + public static void addOutputMode(FlatBufferBuilder builder, byte outputMode) { builder.addByte(3, outputMode, 0); } + public static void addTimestats(FlatBufferBuilder builder, boolean timestats) { builder.addBoolean(4, timestats, false); } + public static void addFootprintForward(FlatBufferBuilder builder, long footprintForward) { builder.addLong(5, footprintForward, 0L); } + public static void addFootprintBackward(FlatBufferBuilder builder, long footprintBackward) { builder.addLong(6, footprintBackward, 0L); } + public static void addDirection(FlatBufferBuilder builder, byte direction) { builder.addByte(7, direction, 0); } + public static int endFlatConfiguration(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } + public static void finishFlatConfigurationBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); } + public static void finishSizePrefixedFlatConfigurationBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset); } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatConfiguration.py b/libnd4j/include/graph/generated/nd4j/graph/FlatConfiguration.py new file mode 100644 index 000000000..dac07fdec --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatConfiguration.py @@ -0,0 +1,100 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class FlatConfiguration(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsFlatConfiguration(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = FlatConfiguration() + x.Init(buf, n + offset) + return x + + # FlatConfiguration + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # FlatConfiguration + def Id(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + + # FlatConfiguration + def ExecutionMode(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) + return 0 + + # FlatConfiguration + def ProfilingMode(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) + return 0 + + # FlatConfiguration + def OutputMode(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) + return 0 + + # FlatConfiguration + def Timestats(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) + return False + + # FlatConfiguration + def FootprintForward(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + + # FlatConfiguration + def FootprintBackward(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + + # FlatConfiguration + def Direction(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) + return 0 + +def FlatConfigurationStart(builder): builder.StartObject(8) +def FlatConfigurationAddId(builder, id): builder.PrependInt64Slot(0, id, 0) +def FlatConfigurationAddExecutionMode(builder, executionMode): builder.PrependInt8Slot(1, executionMode, 0) +def FlatConfigurationAddProfilingMode(builder, profilingMode): builder.PrependInt8Slot(2, profilingMode, 0) +def FlatConfigurationAddOutputMode(builder, outputMode): builder.PrependInt8Slot(3, outputMode, 0) +def FlatConfigurationAddTimestats(builder, timestats): builder.PrependBoolSlot(4, timestats, 0) +def FlatConfigurationAddFootprintForward(builder, footprintForward): builder.PrependInt64Slot(5, footprintForward, 0) +def FlatConfigurationAddFootprintBackward(builder, footprintBackward): builder.PrependInt64Slot(6, footprintBackward, 0) +def FlatConfigurationAddDirection(builder, direction): builder.PrependInt8Slot(7, direction, 0) +def FlatConfigurationEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatDropRequest.cs b/libnd4j/include/graph/generated/nd4j/graph/FlatDropRequest.cs new file mode 100644 index 000000000..6d2f5f68b --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatDropRequest.cs @@ -0,0 +1,38 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct FlatDropRequest : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static FlatDropRequest GetRootAsFlatDropRequest(ByteBuffer _bb) { return GetRootAsFlatDropRequest(_bb, new FlatDropRequest()); } + public static FlatDropRequest GetRootAsFlatDropRequest(ByteBuffer _bb, FlatDropRequest obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public FlatDropRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long Id { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + + public static Offset CreateFlatDropRequest(FlatBufferBuilder builder, + long id = 0) { + builder.StartObject(1); + FlatDropRequest.AddId(builder, id); + return FlatDropRequest.EndFlatDropRequest(builder); + } + + public static void StartFlatDropRequest(FlatBufferBuilder builder) { builder.StartObject(1); } + public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } + public static Offset EndFlatDropRequest(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatDropRequest.java b/libnd4j/include/graph/generated/nd4j/graph/FlatDropRequest.java new file mode 100644 index 000000000..548722be3 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatDropRequest.java @@ -0,0 +1,33 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FlatDropRequest extends Table { + public static FlatDropRequest getRootAsFlatDropRequest(ByteBuffer _bb) { return getRootAsFlatDropRequest(_bb, new FlatDropRequest()); } + public static FlatDropRequest getRootAsFlatDropRequest(ByteBuffer _bb, FlatDropRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public FlatDropRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long id() { int o = __offset(4); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + + public static int createFlatDropRequest(FlatBufferBuilder builder, + long id) { + builder.startObject(1); + FlatDropRequest.addId(builder, id); + return FlatDropRequest.endFlatDropRequest(builder); + } + + public static void startFlatDropRequest(FlatBufferBuilder builder) { builder.startObject(1); } + public static void addId(FlatBufferBuilder builder, long id) { builder.addLong(0, id, 0L); } + public static int endFlatDropRequest(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatDropRequest.py b/libnd4j/include/graph/generated/nd4j/graph/FlatDropRequest.py new file mode 100644 index 000000000..25da10bc5 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatDropRequest.py @@ -0,0 +1,44 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class FlatDropRequest(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsFlatDropRequest(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = FlatDropRequest() + x.Init(buf, n + offset) + return x + + # FlatDropRequest + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # FlatDropRequest + def Id(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + +def FlatDropRequestStart(builder): builder.StartObject(1) +def FlatDropRequestAddId(builder, id): builder.PrependInt64Slot(0, id, 0) +def FlatDropRequestEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatGraph.cs b/libnd4j/include/graph/generated/nd4j/graph/FlatGraph.cs new file mode 100644 index 000000000..15978e301 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatGraph.cs @@ -0,0 +1,102 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct FlatGraph : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static FlatGraph GetRootAsFlatGraph(ByteBuffer _bb) { return GetRootAsFlatGraph(_bb, new FlatGraph()); } + public static FlatGraph GetRootAsFlatGraph(ByteBuffer _bb, FlatGraph obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public FlatGraph __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long Id { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + public FlatVariable? Variables(int j) { int o = __p.__offset(6); return o != 0 ? (FlatVariable?)(new FlatVariable()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } + public int VariablesLength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } } + public FlatNode? Nodes(int j) { int o = __p.__offset(8); return o != 0 ? (FlatNode?)(new FlatNode()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } + public int NodesLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } } + public IntPair? Outputs(int j) { int o = __p.__offset(10); return o != 0 ? (IntPair?)(new IntPair()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } + public int OutputsLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } } + public FlatConfiguration? Configuration { get { int o = __p.__offset(12); return o != 0 ? (FlatConfiguration?)(new FlatConfiguration()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } + public string Placeholders(int j) { int o = __p.__offset(14); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int PlaceholdersLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } } + public string LossVariables(int j) { int o = __p.__offset(16); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int LossVariablesLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } } + public string TrainingConfig { get { int o = __p.__offset(18); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetTrainingConfigBytes() { return __p.__vector_as_span(18); } +#else + public ArraySegment? GetTrainingConfigBytes() { return __p.__vector_as_arraysegment(18); } +#endif + public byte[] GetTrainingConfigArray() { return __p.__vector_as_array(18); } + public UpdaterState? UpdaterState(int j) { int o = __p.__offset(20); return o != 0 ? (UpdaterState?)(new UpdaterState()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } + public int UpdaterStateLength { get { int o = __p.__offset(20); return o != 0 ? __p.__vector_len(o) : 0; } } + + public static Offset CreateFlatGraph(FlatBufferBuilder builder, + long id = 0, + VectorOffset variablesOffset = default(VectorOffset), + VectorOffset nodesOffset = default(VectorOffset), + VectorOffset outputsOffset = default(VectorOffset), + Offset configurationOffset = default(Offset), + VectorOffset placeholdersOffset = default(VectorOffset), + VectorOffset lossVariablesOffset = default(VectorOffset), + StringOffset trainingConfigOffset = default(StringOffset), + VectorOffset updaterStateOffset = default(VectorOffset)) { + builder.StartObject(9); + FlatGraph.AddId(builder, id); + FlatGraph.AddUpdaterState(builder, updaterStateOffset); + FlatGraph.AddTrainingConfig(builder, trainingConfigOffset); + FlatGraph.AddLossVariables(builder, lossVariablesOffset); + FlatGraph.AddPlaceholders(builder, placeholdersOffset); + FlatGraph.AddConfiguration(builder, configurationOffset); + FlatGraph.AddOutputs(builder, outputsOffset); + FlatGraph.AddNodes(builder, nodesOffset); + FlatGraph.AddVariables(builder, variablesOffset); + return FlatGraph.EndFlatGraph(builder); + } + + public static void StartFlatGraph(FlatBufferBuilder builder) { builder.StartObject(9); } + public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } + public static void AddVariables(FlatBufferBuilder builder, VectorOffset variablesOffset) { builder.AddOffset(1, variablesOffset.Value, 0); } + public static VectorOffset CreateVariablesVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateVariablesVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartVariablesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddNodes(FlatBufferBuilder builder, VectorOffset nodesOffset) { builder.AddOffset(2, nodesOffset.Value, 0); } + public static VectorOffset CreateNodesVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateNodesVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartNodesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddOutputs(FlatBufferBuilder builder, VectorOffset outputsOffset) { builder.AddOffset(3, outputsOffset.Value, 0); } + public static VectorOffset CreateOutputsVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateOutputsVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartOutputsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddConfiguration(FlatBufferBuilder builder, Offset configurationOffset) { builder.AddOffset(4, configurationOffset.Value, 0); } + public static void AddPlaceholders(FlatBufferBuilder builder, VectorOffset placeholdersOffset) { builder.AddOffset(5, placeholdersOffset.Value, 0); } + public static VectorOffset CreatePlaceholdersVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreatePlaceholdersVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartPlaceholdersVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddLossVariables(FlatBufferBuilder builder, VectorOffset lossVariablesOffset) { builder.AddOffset(6, lossVariablesOffset.Value, 0); } + public static VectorOffset CreateLossVariablesVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateLossVariablesVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartLossVariablesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddTrainingConfig(FlatBufferBuilder builder, StringOffset trainingConfigOffset) { builder.AddOffset(7, trainingConfigOffset.Value, 0); } + public static void AddUpdaterState(FlatBufferBuilder builder, VectorOffset updaterStateOffset) { builder.AddOffset(8, updaterStateOffset.Value, 0); } + public static VectorOffset CreateUpdaterStateVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateUpdaterStateVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartUpdaterStateVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static Offset EndFlatGraph(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } + public static void FinishFlatGraphBuffer(FlatBufferBuilder builder, Offset offset) { builder.Finish(offset.Value); } + public static void FinishSizePrefixedFlatGraphBuffer(FlatBufferBuilder builder, Offset offset) { builder.FinishSizePrefixed(offset.Value); } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatGraph.java b/libnd4j/include/graph/generated/nd4j/graph/FlatGraph.java new file mode 100644 index 000000000..660d9e431 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatGraph.java @@ -0,0 +1,92 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FlatGraph extends Table { + public static FlatGraph getRootAsFlatGraph(ByteBuffer _bb) { return getRootAsFlatGraph(_bb, new FlatGraph()); } + public static FlatGraph getRootAsFlatGraph(ByteBuffer _bb, FlatGraph obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public FlatGraph __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long id() { int o = __offset(4); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public FlatVariable variables(int j) { return variables(new FlatVariable(), j); } + public FlatVariable variables(FlatVariable obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int variablesLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public FlatNode nodes(int j) { return nodes(new FlatNode(), j); } + public FlatNode nodes(FlatNode obj, int j) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int nodesLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } + public IntPair outputs(int j) { return outputs(new IntPair(), j); } + public IntPair outputs(IntPair obj, int j) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int outputsLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } + public FlatConfiguration configuration() { return configuration(new FlatConfiguration()); } + public FlatConfiguration configuration(FlatConfiguration obj) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public String placeholders(int j) { int o = __offset(14); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int placeholdersLength() { int o = __offset(14); return o != 0 ? __vector_len(o) : 0; } + public String lossVariables(int j) { int o = __offset(16); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int lossVariablesLength() { int o = __offset(16); return o != 0 ? __vector_len(o) : 0; } + public String trainingConfig() { int o = __offset(18); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer trainingConfigAsByteBuffer() { return __vector_as_bytebuffer(18, 1); } + public ByteBuffer trainingConfigInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 18, 1); } + public UpdaterState updaterState(int j) { return updaterState(new UpdaterState(), j); } + public UpdaterState updaterState(UpdaterState obj, int j) { int o = __offset(20); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int updaterStateLength() { int o = __offset(20); return o != 0 ? __vector_len(o) : 0; } + + public static int createFlatGraph(FlatBufferBuilder builder, + long id, + int variablesOffset, + int nodesOffset, + int outputsOffset, + int configurationOffset, + int placeholdersOffset, + int lossVariablesOffset, + int trainingConfigOffset, + int updaterStateOffset) { + builder.startObject(9); + FlatGraph.addId(builder, id); + FlatGraph.addUpdaterState(builder, updaterStateOffset); + FlatGraph.addTrainingConfig(builder, trainingConfigOffset); + FlatGraph.addLossVariables(builder, lossVariablesOffset); + FlatGraph.addPlaceholders(builder, placeholdersOffset); + FlatGraph.addConfiguration(builder, configurationOffset); + FlatGraph.addOutputs(builder, outputsOffset); + FlatGraph.addNodes(builder, nodesOffset); + FlatGraph.addVariables(builder, variablesOffset); + return FlatGraph.endFlatGraph(builder); + } + + public static void startFlatGraph(FlatBufferBuilder builder) { builder.startObject(9); } + public static void addId(FlatBufferBuilder builder, long id) { builder.addLong(0, id, 0L); } + public static void addVariables(FlatBufferBuilder builder, int variablesOffset) { builder.addOffset(1, variablesOffset, 0); } + public static int createVariablesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startVariablesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addNodes(FlatBufferBuilder builder, int nodesOffset) { builder.addOffset(2, nodesOffset, 0); } + public static int createNodesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startNodesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addOutputs(FlatBufferBuilder builder, int outputsOffset) { builder.addOffset(3, outputsOffset, 0); } + public static int createOutputsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startOutputsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addConfiguration(FlatBufferBuilder builder, int configurationOffset) { builder.addOffset(4, configurationOffset, 0); } + public static void addPlaceholders(FlatBufferBuilder builder, int placeholdersOffset) { builder.addOffset(5, placeholdersOffset, 0); } + public static int createPlaceholdersVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startPlaceholdersVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addLossVariables(FlatBufferBuilder builder, int lossVariablesOffset) { builder.addOffset(6, lossVariablesOffset, 0); } + public static int createLossVariablesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startLossVariablesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addTrainingConfig(FlatBufferBuilder builder, int trainingConfigOffset) { builder.addOffset(7, trainingConfigOffset, 0); } + public static void addUpdaterState(FlatBufferBuilder builder, int updaterStateOffset) { builder.addOffset(8, updaterStateOffset, 0); } + public static int createUpdaterStateVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startUpdaterStateVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endFlatGraph(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } + public static void finishFlatGraphBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); } + public static void finishSizePrefixedFlatGraphBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset); } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatGraph.py b/libnd4j/include/graph/generated/nd4j/graph/FlatGraph.py new file mode 100644 index 000000000..1a89489ab --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatGraph.py @@ -0,0 +1,186 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class FlatGraph(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsFlatGraph(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = FlatGraph() + x.Init(buf, n + offset) + return x + + # FlatGraph + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # FlatGraph + def Id(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + + # FlatGraph + def Variables(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + x = self._tab.Vector(o) + x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 + x = self._tab.Indirect(x) + from .FlatVariable import FlatVariable + obj = FlatVariable() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # FlatGraph + def VariablesLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatGraph + def Nodes(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + x = self._tab.Vector(o) + x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 + x = self._tab.Indirect(x) + from .FlatNode import FlatNode + obj = FlatNode() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # FlatGraph + def NodesLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatGraph + def Outputs(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + x = self._tab.Vector(o) + x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 + x = self._tab.Indirect(x) + from .IntPair import IntPair + obj = IntPair() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # FlatGraph + def OutputsLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatGraph + def Configuration(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + x = self._tab.Indirect(o + self._tab.Pos) + from .FlatConfiguration import FlatConfiguration + obj = FlatConfiguration() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # FlatGraph + def Placeholders(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # FlatGraph + def PlaceholdersLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatGraph + def LossVariables(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # FlatGraph + def LossVariablesLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatGraph + def TrainingConfig(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + + # FlatGraph + def UpdaterState(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20)) + if o != 0: + x = self._tab.Vector(o) + x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 + x = self._tab.Indirect(x) + from .UpdaterState import UpdaterState + obj = UpdaterState() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # FlatGraph + def UpdaterStateLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + +def FlatGraphStart(builder): builder.StartObject(9) +def FlatGraphAddId(builder, id): builder.PrependInt64Slot(0, id, 0) +def FlatGraphAddVariables(builder, variables): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(variables), 0) +def FlatGraphStartVariablesVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatGraphAddNodes(builder, nodes): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(nodes), 0) +def FlatGraphStartNodesVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatGraphAddOutputs(builder, outputs): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(outputs), 0) +def FlatGraphStartOutputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatGraphAddConfiguration(builder, configuration): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(configuration), 0) +def FlatGraphAddPlaceholders(builder, placeholders): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(placeholders), 0) +def FlatGraphStartPlaceholdersVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatGraphAddLossVariables(builder, lossVariables): builder.PrependUOffsetTRelativeSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(lossVariables), 0) +def FlatGraphStartLossVariablesVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatGraphAddTrainingConfig(builder, trainingConfig): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(trainingConfig), 0) +def FlatGraphAddUpdaterState(builder, updaterState): builder.PrependUOffsetTRelativeSlot(8, flatbuffers.number_types.UOffsetTFlags.py_type(updaterState), 0) +def FlatGraphStartUpdaterStateVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatGraphEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatInferenceRequest.cs b/libnd4j/include/graph/generated/nd4j/graph/FlatInferenceRequest.cs new file mode 100644 index 000000000..88e36dad5 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatInferenceRequest.cs @@ -0,0 +1,52 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct FlatInferenceRequest : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static FlatInferenceRequest GetRootAsFlatInferenceRequest(ByteBuffer _bb) { return GetRootAsFlatInferenceRequest(_bb, new FlatInferenceRequest()); } + public static FlatInferenceRequest GetRootAsFlatInferenceRequest(ByteBuffer _bb, FlatInferenceRequest obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public FlatInferenceRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long Id { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + public FlatVariable? Variables(int j) { int o = __p.__offset(6); return o != 0 ? (FlatVariable?)(new FlatVariable()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } + public int VariablesLength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } } + public FlatConfiguration? Configuration { get { int o = __p.__offset(8); return o != 0 ? (FlatConfiguration?)(new FlatConfiguration()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } + + public static Offset CreateFlatInferenceRequest(FlatBufferBuilder builder, + long id = 0, + VectorOffset variablesOffset = default(VectorOffset), + Offset configurationOffset = default(Offset)) { + builder.StartObject(3); + FlatInferenceRequest.AddId(builder, id); + FlatInferenceRequest.AddConfiguration(builder, configurationOffset); + FlatInferenceRequest.AddVariables(builder, variablesOffset); + return FlatInferenceRequest.EndFlatInferenceRequest(builder); + } + + public static void StartFlatInferenceRequest(FlatBufferBuilder builder) { builder.StartObject(3); } + public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } + public static void AddVariables(FlatBufferBuilder builder, VectorOffset variablesOffset) { builder.AddOffset(1, variablesOffset.Value, 0); } + public static VectorOffset CreateVariablesVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateVariablesVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartVariablesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddConfiguration(FlatBufferBuilder builder, Offset configurationOffset) { builder.AddOffset(2, configurationOffset.Value, 0); } + public static Offset EndFlatInferenceRequest(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } + public static void FinishFlatInferenceRequestBuffer(FlatBufferBuilder builder, Offset offset) { builder.Finish(offset.Value); } + public static void FinishSizePrefixedFlatInferenceRequestBuffer(FlatBufferBuilder builder, Offset offset) { builder.FinishSizePrefixed(offset.Value); } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatInferenceRequest.java b/libnd4j/include/graph/generated/nd4j/graph/FlatInferenceRequest.java new file mode 100644 index 000000000..fc907bcd8 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatInferenceRequest.java @@ -0,0 +1,48 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FlatInferenceRequest extends Table { + public static FlatInferenceRequest getRootAsFlatInferenceRequest(ByteBuffer _bb) { return getRootAsFlatInferenceRequest(_bb, new FlatInferenceRequest()); } + public static FlatInferenceRequest getRootAsFlatInferenceRequest(ByteBuffer _bb, FlatInferenceRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public FlatInferenceRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long id() { int o = __offset(4); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public FlatVariable variables(int j) { return variables(new FlatVariable(), j); } + public FlatVariable variables(FlatVariable obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int variablesLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public FlatConfiguration configuration() { return configuration(new FlatConfiguration()); } + public FlatConfiguration configuration(FlatConfiguration obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createFlatInferenceRequest(FlatBufferBuilder builder, + long id, + int variablesOffset, + int configurationOffset) { + builder.startObject(3); + FlatInferenceRequest.addId(builder, id); + FlatInferenceRequest.addConfiguration(builder, configurationOffset); + FlatInferenceRequest.addVariables(builder, variablesOffset); + return FlatInferenceRequest.endFlatInferenceRequest(builder); + } + + public static void startFlatInferenceRequest(FlatBufferBuilder builder) { builder.startObject(3); } + public static void addId(FlatBufferBuilder builder, long id) { builder.addLong(0, id, 0L); } + public static void addVariables(FlatBufferBuilder builder, int variablesOffset) { builder.addOffset(1, variablesOffset, 0); } + public static int createVariablesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startVariablesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addConfiguration(FlatBufferBuilder builder, int configurationOffset) { builder.addOffset(2, configurationOffset, 0); } + public static int endFlatInferenceRequest(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } + public static void finishFlatInferenceRequestBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); } + public static void finishSizePrefixedFlatInferenceRequestBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset); } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatInferenceRequest.py b/libnd4j/include/graph/generated/nd4j/graph/FlatInferenceRequest.py new file mode 100644 index 000000000..7bd30dbb6 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatInferenceRequest.py @@ -0,0 +1,78 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class FlatInferenceRequest(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsFlatInferenceRequest(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = FlatInferenceRequest() + x.Init(buf, n + offset) + return x + + # FlatInferenceRequest + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # FlatInferenceRequest + def Id(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + + # FlatInferenceRequest + def Variables(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + x = self._tab.Vector(o) + x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 + x = self._tab.Indirect(x) + from .FlatVariable import FlatVariable + obj = FlatVariable() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # FlatInferenceRequest + def VariablesLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatInferenceRequest + def Configuration(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + x = self._tab.Indirect(o + self._tab.Pos) + from .FlatConfiguration import FlatConfiguration + obj = FlatConfiguration() + obj.Init(self._tab.Bytes, x) + return obj + return None + +def FlatInferenceRequestStart(builder): builder.StartObject(3) +def FlatInferenceRequestAddId(builder, id): builder.PrependInt64Slot(0, id, 0) +def FlatInferenceRequestAddVariables(builder, variables): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(variables), 0) +def FlatInferenceRequestStartVariablesVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatInferenceRequestAddConfiguration(builder, configuration): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(configuration), 0) +def FlatInferenceRequestEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatNode.cs b/libnd4j/include/graph/generated/nd4j/graph/FlatNode.cs new file mode 100644 index 000000000..3f951c0e9 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatNode.cs @@ -0,0 +1,250 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct FlatNode : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static FlatNode GetRootAsFlatNode(ByteBuffer _bb) { return GetRootAsFlatNode(_bb, new FlatNode()); } + public static FlatNode GetRootAsFlatNode(ByteBuffer _bb, FlatNode obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public FlatNode __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int Id { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } + public string Name { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetNameBytes() { return __p.__vector_as_span(6); } +#else + public ArraySegment? GetNameBytes() { return __p.__vector_as_arraysegment(6); } +#endif + public byte[] GetNameArray() { return __p.__vector_as_array(6); } + public OpType OpType { get { int o = __p.__offset(8); return o != 0 ? (OpType)__p.bb.GetSbyte(o + __p.bb_pos) : OpType.TRANSFORM_FLOAT; } } + public long OpNum { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + public FlatProperties? Properties(int j) { int o = __p.__offset(12); return o != 0 ? (FlatProperties?)(new FlatProperties()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } + public int PropertiesLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } } + public int Input(int j) { int o = __p.__offset(14); return o != 0 ? __p.bb.GetInt(__p.__vector(o) + j * 4) : (int)0; } + public int InputLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetInputBytes() { return __p.__vector_as_span(14); } +#else + public ArraySegment? GetInputBytes() { return __p.__vector_as_arraysegment(14); } +#endif + public int[] GetInputArray() { return __p.__vector_as_array(14); } + public IntPair? InputPaired(int j) { int o = __p.__offset(16); return o != 0 ? (IntPair?)(new IntPair()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } + public int InputPairedLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } } + public int Output(int j) { int o = __p.__offset(18); return o != 0 ? __p.bb.GetInt(__p.__vector(o) + j * 4) : (int)0; } + public int OutputLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetOutputBytes() { return __p.__vector_as_span(18); } +#else + public ArraySegment? GetOutputBytes() { return __p.__vector_as_arraysegment(18); } +#endif + public int[] GetOutputArray() { return __p.__vector_as_array(18); } + public double ExtraParams(int j) { int o = __p.__offset(20); return o != 0 ? __p.bb.GetDouble(__p.__vector(o) + j * 8) : (double)0; } + public int ExtraParamsLength { get { int o = __p.__offset(20); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetExtraParamsBytes() { return __p.__vector_as_span(20); } +#else + public ArraySegment? GetExtraParamsBytes() { return __p.__vector_as_arraysegment(20); } +#endif + public double[] GetExtraParamsArray() { return __p.__vector_as_array(20); } + public long ExtraInteger(int j) { int o = __p.__offset(22); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } + public int ExtraIntegerLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetExtraIntegerBytes() { return __p.__vector_as_span(22); } +#else + public ArraySegment? GetExtraIntegerBytes() { return __p.__vector_as_arraysegment(22); } +#endif + public long[] GetExtraIntegerArray() { return __p.__vector_as_array(22); } + public bool ExtraBools(int j) { int o = __p.__offset(24); return o != 0 ? 0!=__p.bb.Get(__p.__vector(o) + j * 1) : false; } + public int ExtraBoolsLength { get { int o = __p.__offset(24); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetExtraBoolsBytes() { return __p.__vector_as_span(24); } +#else + public ArraySegment? GetExtraBoolsBytes() { return __p.__vector_as_arraysegment(24); } +#endif + public bool[] GetExtraBoolsArray() { return __p.__vector_as_array(24); } + public int Dimensions(int j) { int o = __p.__offset(26); return o != 0 ? __p.bb.GetInt(__p.__vector(o) + j * 4) : (int)0; } + public int DimensionsLength { get { int o = __p.__offset(26); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetDimensionsBytes() { return __p.__vector_as_span(26); } +#else + public ArraySegment? GetDimensionsBytes() { return __p.__vector_as_arraysegment(26); } +#endif + public int[] GetDimensionsArray() { return __p.__vector_as_array(26); } + public int Device { get { int o = __p.__offset(28); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } + public int ScopeId { get { int o = __p.__offset(30); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } + public string ScopeName { get { int o = __p.__offset(32); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetScopeNameBytes() { return __p.__vector_as_span(32); } +#else + public ArraySegment? GetScopeNameBytes() { return __p.__vector_as_arraysegment(32); } +#endif + public byte[] GetScopeNameArray() { return __p.__vector_as_array(32); } + public string OutputNames(int j) { int o = __p.__offset(34); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int OutputNamesLength { get { int o = __p.__offset(34); return o != 0 ? __p.__vector_len(o) : 0; } } + public string OpName { get { int o = __p.__offset(36); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetOpNameBytes() { return __p.__vector_as_span(36); } +#else + public ArraySegment? GetOpNameBytes() { return __p.__vector_as_arraysegment(36); } +#endif + public byte[] GetOpNameArray() { return __p.__vector_as_array(36); } + public DType OutputTypes(int j) { int o = __p.__offset(38); return o != 0 ? (DType)__p.bb.GetSbyte(__p.__vector(o) + j * 1) : (DType)0; } + public int OutputTypesLength { get { int o = __p.__offset(38); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetOutputTypesBytes() { return __p.__vector_as_span(38); } +#else + public ArraySegment? GetOutputTypesBytes() { return __p.__vector_as_arraysegment(38); } +#endif + public DType[] GetOutputTypesArray() { return __p.__vector_as_array(38); } + public FlatArray? Scalar { get { int o = __p.__offset(40); return o != 0 ? (FlatArray?)(new FlatArray()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } + public string ControlDeps(int j) { int o = __p.__offset(42); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int ControlDepsLength { get { int o = __p.__offset(42); return o != 0 ? __p.__vector_len(o) : 0; } } + public string VarControlDeps(int j) { int o = __p.__offset(44); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int VarControlDepsLength { get { int o = __p.__offset(44); return o != 0 ? __p.__vector_len(o) : 0; } } + public string ControlDepFor(int j) { int o = __p.__offset(46); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int ControlDepForLength { get { int o = __p.__offset(46); return o != 0 ? __p.__vector_len(o) : 0; } } + public DType ExtraTypes(int j) { int o = __p.__offset(48); return o != 0 ? (DType)__p.bb.GetSbyte(__p.__vector(o) + j * 1) : (DType)0; } + public int ExtraTypesLength { get { int o = __p.__offset(48); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetExtraTypesBytes() { return __p.__vector_as_span(48); } +#else + public ArraySegment? GetExtraTypesBytes() { return __p.__vector_as_arraysegment(48); } +#endif + public DType[] GetExtraTypesArray() { return __p.__vector_as_array(48); } + + public static Offset CreateFlatNode(FlatBufferBuilder builder, + int id = 0, + StringOffset nameOffset = default(StringOffset), + OpType opType = OpType.TRANSFORM_FLOAT, + long opNum = 0, + VectorOffset propertiesOffset = default(VectorOffset), + VectorOffset inputOffset = default(VectorOffset), + VectorOffset inputPairedOffset = default(VectorOffset), + VectorOffset outputOffset = default(VectorOffset), + VectorOffset extraParamsOffset = default(VectorOffset), + VectorOffset extraIntegerOffset = default(VectorOffset), + VectorOffset extraBoolsOffset = default(VectorOffset), + VectorOffset dimensionsOffset = default(VectorOffset), + int device = 0, + int scope_id = 0, + StringOffset scope_nameOffset = default(StringOffset), + VectorOffset outputNamesOffset = default(VectorOffset), + StringOffset opNameOffset = default(StringOffset), + VectorOffset outputTypesOffset = default(VectorOffset), + Offset scalarOffset = default(Offset), + VectorOffset controlDepsOffset = default(VectorOffset), + VectorOffset varControlDepsOffset = default(VectorOffset), + VectorOffset controlDepForOffset = default(VectorOffset), + VectorOffset extraTypesOffset = default(VectorOffset)) { + builder.StartObject(23); + FlatNode.AddOpNum(builder, opNum); + FlatNode.AddExtraTypes(builder, extraTypesOffset); + FlatNode.AddControlDepFor(builder, controlDepForOffset); + FlatNode.AddVarControlDeps(builder, varControlDepsOffset); + FlatNode.AddControlDeps(builder, controlDepsOffset); + FlatNode.AddScalar(builder, scalarOffset); + FlatNode.AddOutputTypes(builder, outputTypesOffset); + FlatNode.AddOpName(builder, opNameOffset); + FlatNode.AddOutputNames(builder, outputNamesOffset); + FlatNode.AddScopeName(builder, scope_nameOffset); + FlatNode.AddScopeId(builder, scope_id); + FlatNode.AddDevice(builder, device); + FlatNode.AddDimensions(builder, dimensionsOffset); + FlatNode.AddExtraBools(builder, extraBoolsOffset); + FlatNode.AddExtraInteger(builder, extraIntegerOffset); + FlatNode.AddExtraParams(builder, extraParamsOffset); + FlatNode.AddOutput(builder, outputOffset); + FlatNode.AddInputPaired(builder, inputPairedOffset); + FlatNode.AddInput(builder, inputOffset); + FlatNode.AddProperties(builder, propertiesOffset); + FlatNode.AddName(builder, nameOffset); + FlatNode.AddId(builder, id); + FlatNode.AddOpType(builder, opType); + return FlatNode.EndFlatNode(builder); + } + + public static void StartFlatNode(FlatBufferBuilder builder) { builder.StartObject(23); } + public static void AddId(FlatBufferBuilder builder, int id) { builder.AddInt(0, id, 0); } + public static void AddName(FlatBufferBuilder builder, StringOffset nameOffset) { builder.AddOffset(1, nameOffset.Value, 0); } + public static void AddOpType(FlatBufferBuilder builder, OpType opType) { builder.AddSbyte(2, (sbyte)opType, 0); } + public static void AddOpNum(FlatBufferBuilder builder, long opNum) { builder.AddLong(3, opNum, 0); } + public static void AddProperties(FlatBufferBuilder builder, VectorOffset propertiesOffset) { builder.AddOffset(4, propertiesOffset.Value, 0); } + public static VectorOffset CreatePropertiesVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreatePropertiesVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartPropertiesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddInput(FlatBufferBuilder builder, VectorOffset inputOffset) { builder.AddOffset(5, inputOffset.Value, 0); } + public static VectorOffset CreateInputVector(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt(data[i]); return builder.EndVector(); } + public static VectorOffset CreateInputVectorBlock(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartInputVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddInputPaired(FlatBufferBuilder builder, VectorOffset inputPairedOffset) { builder.AddOffset(6, inputPairedOffset.Value, 0); } + public static VectorOffset CreateInputPairedVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateInputPairedVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartInputPairedVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddOutput(FlatBufferBuilder builder, VectorOffset outputOffset) { builder.AddOffset(7, outputOffset.Value, 0); } + public static VectorOffset CreateOutputVector(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt(data[i]); return builder.EndVector(); } + public static VectorOffset CreateOutputVectorBlock(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartOutputVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddExtraParams(FlatBufferBuilder builder, VectorOffset extraParamsOffset) { builder.AddOffset(8, extraParamsOffset.Value, 0); } + public static VectorOffset CreateExtraParamsVector(FlatBufferBuilder builder, double[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddDouble(data[i]); return builder.EndVector(); } + public static VectorOffset CreateExtraParamsVectorBlock(FlatBufferBuilder builder, double[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } + public static void StartExtraParamsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } + public static void AddExtraInteger(FlatBufferBuilder builder, VectorOffset extraIntegerOffset) { builder.AddOffset(9, extraIntegerOffset.Value, 0); } + public static VectorOffset CreateExtraIntegerVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); } + public static VectorOffset CreateExtraIntegerVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } + public static void StartExtraIntegerVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } + public static void AddExtraBools(FlatBufferBuilder builder, VectorOffset extraBoolsOffset) { builder.AddOffset(10, extraBoolsOffset.Value, 0); } + public static VectorOffset CreateExtraBoolsVector(FlatBufferBuilder builder, bool[] data) { builder.StartVector(1, data.Length, 1); for (int i = data.Length - 1; i >= 0; i--) builder.AddBool(data[i]); return builder.EndVector(); } + public static VectorOffset CreateExtraBoolsVectorBlock(FlatBufferBuilder builder, bool[] data) { builder.StartVector(1, data.Length, 1); builder.Add(data); return builder.EndVector(); } + public static void StartExtraBoolsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(1, numElems, 1); } + public static void AddDimensions(FlatBufferBuilder builder, VectorOffset dimensionsOffset) { builder.AddOffset(11, dimensionsOffset.Value, 0); } + public static VectorOffset CreateDimensionsVector(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt(data[i]); return builder.EndVector(); } + public static VectorOffset CreateDimensionsVectorBlock(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartDimensionsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddDevice(FlatBufferBuilder builder, int device) { builder.AddInt(12, device, 0); } + public static void AddScopeId(FlatBufferBuilder builder, int scopeId) { builder.AddInt(13, scopeId, 0); } + public static void AddScopeName(FlatBufferBuilder builder, StringOffset scopeNameOffset) { builder.AddOffset(14, scopeNameOffset.Value, 0); } + public static void AddOutputNames(FlatBufferBuilder builder, VectorOffset outputNamesOffset) { builder.AddOffset(15, outputNamesOffset.Value, 0); } + public static VectorOffset CreateOutputNamesVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateOutputNamesVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartOutputNamesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddOpName(FlatBufferBuilder builder, StringOffset opNameOffset) { builder.AddOffset(16, opNameOffset.Value, 0); } + public static void AddOutputTypes(FlatBufferBuilder builder, VectorOffset outputTypesOffset) { builder.AddOffset(17, outputTypesOffset.Value, 0); } + public static VectorOffset CreateOutputTypesVector(FlatBufferBuilder builder, DType[] data) { builder.StartVector(1, data.Length, 1); for (int i = data.Length - 1; i >= 0; i--) builder.AddSbyte((sbyte)data[i]); return builder.EndVector(); } + public static VectorOffset CreateOutputTypesVectorBlock(FlatBufferBuilder builder, DType[] data) { builder.StartVector(1, data.Length, 1); builder.Add(data); return builder.EndVector(); } + public static void StartOutputTypesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(1, numElems, 1); } + public static void AddScalar(FlatBufferBuilder builder, Offset scalarOffset) { builder.AddOffset(18, scalarOffset.Value, 0); } + public static void AddControlDeps(FlatBufferBuilder builder, VectorOffset controlDepsOffset) { builder.AddOffset(19, controlDepsOffset.Value, 0); } + public static VectorOffset CreateControlDepsVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateControlDepsVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartControlDepsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddVarControlDeps(FlatBufferBuilder builder, VectorOffset varControlDepsOffset) { builder.AddOffset(20, varControlDepsOffset.Value, 0); } + public static VectorOffset CreateVarControlDepsVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateVarControlDepsVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartVarControlDepsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddControlDepFor(FlatBufferBuilder builder, VectorOffset controlDepForOffset) { builder.AddOffset(21, controlDepForOffset.Value, 0); } + public static VectorOffset CreateControlDepForVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateControlDepForVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartControlDepForVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddExtraTypes(FlatBufferBuilder builder, VectorOffset extraTypesOffset) { builder.AddOffset(22, extraTypesOffset.Value, 0); } + public static VectorOffset CreateExtraTypesVector(FlatBufferBuilder builder, DType[] data) { builder.StartVector(1, data.Length, 1); for (int i = data.Length - 1; i >= 0; i--) builder.AddSbyte((sbyte)data[i]); return builder.EndVector(); } + public static VectorOffset CreateExtraTypesVectorBlock(FlatBufferBuilder builder, DType[] data) { builder.StartVector(1, data.Length, 1); builder.Add(data); return builder.EndVector(); } + public static void StartExtraTypesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(1, numElems, 1); } + public static Offset EndFlatNode(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } + public static void FinishFlatNodeBuffer(FlatBufferBuilder builder, Offset offset) { builder.Finish(offset.Value); } + public static void FinishSizePrefixedFlatNodeBuffer(FlatBufferBuilder builder, Offset offset) { builder.FinishSizePrefixed(offset.Value); } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatNode.java b/libnd4j/include/graph/generated/nd4j/graph/FlatNode.java new file mode 100644 index 000000000..2fe0a0ee9 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatNode.java @@ -0,0 +1,190 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FlatNode extends Table { + public static FlatNode getRootAsFlatNode(ByteBuffer _bb) { return getRootAsFlatNode(_bb, new FlatNode()); } + public static FlatNode getRootAsFlatNode(ByteBuffer _bb, FlatNode obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public FlatNode __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int id() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public String name() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + public byte opType() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) : 0; } + public long opNum() { int o = __offset(10); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public FlatProperties properties(int j) { return properties(new FlatProperties(), j); } + public FlatProperties properties(FlatProperties obj, int j) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int propertiesLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; } + public int input(int j) { int o = __offset(14); return o != 0 ? bb.getInt(__vector(o) + j * 4) : 0; } + public int inputLength() { int o = __offset(14); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer inputAsByteBuffer() { return __vector_as_bytebuffer(14, 4); } + public ByteBuffer inputInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 14, 4); } + public IntPair inputPaired(int j) { return inputPaired(new IntPair(), j); } + public IntPair inputPaired(IntPair obj, int j) { int o = __offset(16); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int inputPairedLength() { int o = __offset(16); return o != 0 ? __vector_len(o) : 0; } + public int output(int j) { int o = __offset(18); return o != 0 ? bb.getInt(__vector(o) + j * 4) : 0; } + public int outputLength() { int o = __offset(18); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer outputAsByteBuffer() { return __vector_as_bytebuffer(18, 4); } + public ByteBuffer outputInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 18, 4); } + public double extraParams(int j) { int o = __offset(20); return o != 0 ? bb.getDouble(__vector(o) + j * 8) : 0; } + public int extraParamsLength() { int o = __offset(20); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer extraParamsAsByteBuffer() { return __vector_as_bytebuffer(20, 8); } + public ByteBuffer extraParamsInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 20, 8); } + public long extraInteger(int j) { int o = __offset(22); return o != 0 ? bb.getLong(__vector(o) + j * 8) : 0; } + public int extraIntegerLength() { int o = __offset(22); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer extraIntegerAsByteBuffer() { return __vector_as_bytebuffer(22, 8); } + public ByteBuffer extraIntegerInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 22, 8); } + public boolean extraBools(int j) { int o = __offset(24); return o != 0 ? 0!=bb.get(__vector(o) + j * 1) : false; } + public int extraBoolsLength() { int o = __offset(24); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer extraBoolsAsByteBuffer() { return __vector_as_bytebuffer(24, 1); } + public ByteBuffer extraBoolsInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 24, 1); } + public int dimensions(int j) { int o = __offset(26); return o != 0 ? bb.getInt(__vector(o) + j * 4) : 0; } + public int dimensionsLength() { int o = __offset(26); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer dimensionsAsByteBuffer() { return __vector_as_bytebuffer(26, 4); } + public ByteBuffer dimensionsInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 26, 4); } + public int device() { int o = __offset(28); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public int scopeId() { int o = __offset(30); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public String scopeName() { int o = __offset(32); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer scopeNameAsByteBuffer() { return __vector_as_bytebuffer(32, 1); } + public ByteBuffer scopeNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 32, 1); } + public String outputNames(int j) { int o = __offset(34); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int outputNamesLength() { int o = __offset(34); return o != 0 ? __vector_len(o) : 0; } + public String opName() { int o = __offset(36); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer opNameAsByteBuffer() { return __vector_as_bytebuffer(36, 1); } + public ByteBuffer opNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 36, 1); } + public byte outputTypes(int j) { int o = __offset(38); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int outputTypesLength() { int o = __offset(38); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer outputTypesAsByteBuffer() { return __vector_as_bytebuffer(38, 1); } + public ByteBuffer outputTypesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 38, 1); } + public FlatArray scalar() { return scalar(new FlatArray()); } + public FlatArray scalar(FlatArray obj) { int o = __offset(40); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public String controlDeps(int j) { int o = __offset(42); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int controlDepsLength() { int o = __offset(42); return o != 0 ? __vector_len(o) : 0; } + public String varControlDeps(int j) { int o = __offset(44); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int varControlDepsLength() { int o = __offset(44); return o != 0 ? __vector_len(o) : 0; } + public String controlDepFor(int j) { int o = __offset(46); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int controlDepForLength() { int o = __offset(46); return o != 0 ? __vector_len(o) : 0; } + public byte extraTypes(int j) { int o = __offset(48); return o != 0 ? bb.get(__vector(o) + j * 1) : 0; } + public int extraTypesLength() { int o = __offset(48); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer extraTypesAsByteBuffer() { return __vector_as_bytebuffer(48, 1); } + public ByteBuffer extraTypesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 48, 1); } + + public static int createFlatNode(FlatBufferBuilder builder, + int id, + int nameOffset, + byte opType, + long opNum, + int propertiesOffset, + int inputOffset, + int inputPairedOffset, + int outputOffset, + int extraParamsOffset, + int extraIntegerOffset, + int extraBoolsOffset, + int dimensionsOffset, + int device, + int scope_id, + int scope_nameOffset, + int outputNamesOffset, + int opNameOffset, + int outputTypesOffset, + int scalarOffset, + int controlDepsOffset, + int varControlDepsOffset, + int controlDepForOffset, + int extraTypesOffset) { + builder.startObject(23); + FlatNode.addOpNum(builder, opNum); + FlatNode.addExtraTypes(builder, extraTypesOffset); + FlatNode.addControlDepFor(builder, controlDepForOffset); + FlatNode.addVarControlDeps(builder, varControlDepsOffset); + FlatNode.addControlDeps(builder, controlDepsOffset); + FlatNode.addScalar(builder, scalarOffset); + FlatNode.addOutputTypes(builder, outputTypesOffset); + FlatNode.addOpName(builder, opNameOffset); + FlatNode.addOutputNames(builder, outputNamesOffset); + FlatNode.addScopeName(builder, scope_nameOffset); + FlatNode.addScopeId(builder, scope_id); + FlatNode.addDevice(builder, device); + FlatNode.addDimensions(builder, dimensionsOffset); + FlatNode.addExtraBools(builder, extraBoolsOffset); + FlatNode.addExtraInteger(builder, extraIntegerOffset); + FlatNode.addExtraParams(builder, extraParamsOffset); + FlatNode.addOutput(builder, outputOffset); + FlatNode.addInputPaired(builder, inputPairedOffset); + FlatNode.addInput(builder, inputOffset); + FlatNode.addProperties(builder, propertiesOffset); + FlatNode.addName(builder, nameOffset); + FlatNode.addId(builder, id); + FlatNode.addOpType(builder, opType); + return FlatNode.endFlatNode(builder); + } + + public static void startFlatNode(FlatBufferBuilder builder) { builder.startObject(23); } + public static void addId(FlatBufferBuilder builder, int id) { builder.addInt(0, id, 0); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(1, nameOffset, 0); } + public static void addOpType(FlatBufferBuilder builder, byte opType) { builder.addByte(2, opType, 0); } + public static void addOpNum(FlatBufferBuilder builder, long opNum) { builder.addLong(3, opNum, 0L); } + public static void addProperties(FlatBufferBuilder builder, int propertiesOffset) { builder.addOffset(4, propertiesOffset, 0); } + public static int createPropertiesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startPropertiesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addInput(FlatBufferBuilder builder, int inputOffset) { builder.addOffset(5, inputOffset, 0); } + public static int createInputVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addInt(data[i]); return builder.endVector(); } + public static void startInputVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addInputPaired(FlatBufferBuilder builder, int inputPairedOffset) { builder.addOffset(6, inputPairedOffset, 0); } + public static int createInputPairedVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startInputPairedVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addOutput(FlatBufferBuilder builder, int outputOffset) { builder.addOffset(7, outputOffset, 0); } + public static int createOutputVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addInt(data[i]); return builder.endVector(); } + public static void startOutputVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addExtraParams(FlatBufferBuilder builder, int extraParamsOffset) { builder.addOffset(8, extraParamsOffset, 0); } + public static int createExtraParamsVector(FlatBufferBuilder builder, double[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addDouble(data[i]); return builder.endVector(); } + public static void startExtraParamsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); } + public static void addExtraInteger(FlatBufferBuilder builder, int extraIntegerOffset) { builder.addOffset(9, extraIntegerOffset, 0); } + public static int createExtraIntegerVector(FlatBufferBuilder builder, long[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addLong(data[i]); return builder.endVector(); } + public static void startExtraIntegerVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); } + public static void addExtraBools(FlatBufferBuilder builder, int extraBoolsOffset) { builder.addOffset(10, extraBoolsOffset, 0); } + public static int createExtraBoolsVector(FlatBufferBuilder builder, boolean[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addBoolean(data[i]); return builder.endVector(); } + public static void startExtraBoolsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addDimensions(FlatBufferBuilder builder, int dimensionsOffset) { builder.addOffset(11, dimensionsOffset, 0); } + public static int createDimensionsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addInt(data[i]); return builder.endVector(); } + public static void startDimensionsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addDevice(FlatBufferBuilder builder, int device) { builder.addInt(12, device, 0); } + public static void addScopeId(FlatBufferBuilder builder, int scopeId) { builder.addInt(13, scopeId, 0); } + public static void addScopeName(FlatBufferBuilder builder, int scopeNameOffset) { builder.addOffset(14, scopeNameOffset, 0); } + public static void addOutputNames(FlatBufferBuilder builder, int outputNamesOffset) { builder.addOffset(15, outputNamesOffset, 0); } + public static int createOutputNamesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startOutputNamesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addOpName(FlatBufferBuilder builder, int opNameOffset) { builder.addOffset(16, opNameOffset, 0); } + public static void addOutputTypes(FlatBufferBuilder builder, int outputTypesOffset) { builder.addOffset(17, outputTypesOffset, 0); } + public static int createOutputTypesVector(FlatBufferBuilder builder, byte[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addByte(data[i]); return builder.endVector(); } + public static void startOutputTypesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addScalar(FlatBufferBuilder builder, int scalarOffset) { builder.addOffset(18, scalarOffset, 0); } + public static void addControlDeps(FlatBufferBuilder builder, int controlDepsOffset) { builder.addOffset(19, controlDepsOffset, 0); } + public static int createControlDepsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startControlDepsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addVarControlDeps(FlatBufferBuilder builder, int varControlDepsOffset) { builder.addOffset(20, varControlDepsOffset, 0); } + public static int createVarControlDepsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startVarControlDepsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addControlDepFor(FlatBufferBuilder builder, int controlDepForOffset) { builder.addOffset(21, controlDepForOffset, 0); } + public static int createControlDepForVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startControlDepForVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addExtraTypes(FlatBufferBuilder builder, int extraTypesOffset) { builder.addOffset(22, extraTypesOffset, 0); } + public static int createExtraTypesVector(FlatBufferBuilder builder, byte[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addByte(data[i]); return builder.endVector(); } + public static void startExtraTypesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static int endFlatNode(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } + public static void finishFlatNodeBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); } + public static void finishSizePrefixedFlatNodeBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset); } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatNode.py b/libnd4j/include/graph/generated/nd4j/graph/FlatNode.py new file mode 100644 index 000000000..61b80e28e --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatNode.py @@ -0,0 +1,416 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class FlatNode(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsFlatNode(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = FlatNode() + x.Init(buf, n + offset) + return x + + # FlatNode + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # FlatNode + def Id(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + + # FlatNode + def Name(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + + # FlatNode + def OpType(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) + return 0 + + # FlatNode + def OpNum(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + + # FlatNode + def Properties(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + x = self._tab.Vector(o) + x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 + x = self._tab.Indirect(x) + from .FlatProperties import FlatProperties + obj = FlatProperties() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # FlatNode + def PropertiesLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatNode + def Input(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return 0 + + # FlatNode + def InputAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) + return 0 + + # FlatNode + def InputLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatNode + def InputPaired(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) + if o != 0: + x = self._tab.Vector(o) + x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 + x = self._tab.Indirect(x) + from .IntPair import IntPair + obj = IntPair() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # FlatNode + def InputPairedLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatNode + def Output(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return 0 + + # FlatNode + def OutputAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) + return 0 + + # FlatNode + def OutputLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatNode + def ExtraParams(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.Float64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) + return 0 + + # FlatNode + def ExtraParamsAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Float64Flags, o) + return 0 + + # FlatNode + def ExtraParamsLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatNode + def ExtraInteger(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) + return 0 + + # FlatNode + def ExtraIntegerAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) + return 0 + + # FlatNode + def ExtraIntegerLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatNode + def ExtraBools(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(24)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.BoolFlags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1)) + return 0 + + # FlatNode + def ExtraBoolsAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(24)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.BoolFlags, o) + return 0 + + # FlatNode + def ExtraBoolsLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(24)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatNode + def Dimensions(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(26)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return 0 + + # FlatNode + def DimensionsAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(26)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) + return 0 + + # FlatNode + def DimensionsLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(26)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatNode + def Device(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(28)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + + # FlatNode + def ScopeId(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(30)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + + # FlatNode + def ScopeName(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(32)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + + # FlatNode + def OutputNames(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(34)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # FlatNode + def OutputNamesLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(34)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatNode + def OpName(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(36)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + + # FlatNode + def OutputTypes(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(38)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.Int8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1)) + return 0 + + # FlatNode + def OutputTypesAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(38)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int8Flags, o) + return 0 + + # FlatNode + def OutputTypesLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(38)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatNode + def Scalar(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(40)) + if o != 0: + x = self._tab.Indirect(o + self._tab.Pos) + from .FlatArray import FlatArray + obj = FlatArray() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # FlatNode + def ControlDeps(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(42)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # FlatNode + def ControlDepsLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(42)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatNode + def VarControlDeps(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(44)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # FlatNode + def VarControlDepsLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(44)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatNode + def ControlDepFor(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(46)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # FlatNode + def ControlDepForLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(46)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatNode + def ExtraTypes(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(48)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.Int8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1)) + return 0 + + # FlatNode + def ExtraTypesAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(48)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int8Flags, o) + return 0 + + # FlatNode + def ExtraTypesLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(48)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + +def FlatNodeStart(builder): builder.StartObject(23) +def FlatNodeAddId(builder, id): builder.PrependInt32Slot(0, id, 0) +def FlatNodeAddName(builder, name): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) +def FlatNodeAddOpType(builder, opType): builder.PrependInt8Slot(2, opType, 0) +def FlatNodeAddOpNum(builder, opNum): builder.PrependInt64Slot(3, opNum, 0) +def FlatNodeAddProperties(builder, properties): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(properties), 0) +def FlatNodeStartPropertiesVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatNodeAddInput(builder, input): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(input), 0) +def FlatNodeStartInputVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatNodeAddInputPaired(builder, inputPaired): builder.PrependUOffsetTRelativeSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(inputPaired), 0) +def FlatNodeStartInputPairedVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatNodeAddOutput(builder, output): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(output), 0) +def FlatNodeStartOutputVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatNodeAddExtraParams(builder, extraParams): builder.PrependUOffsetTRelativeSlot(8, flatbuffers.number_types.UOffsetTFlags.py_type(extraParams), 0) +def FlatNodeStartExtraParamsVector(builder, numElems): return builder.StartVector(8, numElems, 8) +def FlatNodeAddExtraInteger(builder, extraInteger): builder.PrependUOffsetTRelativeSlot(9, flatbuffers.number_types.UOffsetTFlags.py_type(extraInteger), 0) +def FlatNodeStartExtraIntegerVector(builder, numElems): return builder.StartVector(8, numElems, 8) +def FlatNodeAddExtraBools(builder, extraBools): builder.PrependUOffsetTRelativeSlot(10, flatbuffers.number_types.UOffsetTFlags.py_type(extraBools), 0) +def FlatNodeStartExtraBoolsVector(builder, numElems): return builder.StartVector(1, numElems, 1) +def FlatNodeAddDimensions(builder, dimensions): builder.PrependUOffsetTRelativeSlot(11, flatbuffers.number_types.UOffsetTFlags.py_type(dimensions), 0) +def FlatNodeStartDimensionsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatNodeAddDevice(builder, device): builder.PrependInt32Slot(12, device, 0) +def FlatNodeAddScopeId(builder, scopeId): builder.PrependInt32Slot(13, scopeId, 0) +def FlatNodeAddScopeName(builder, scopeName): builder.PrependUOffsetTRelativeSlot(14, flatbuffers.number_types.UOffsetTFlags.py_type(scopeName), 0) +def FlatNodeAddOutputNames(builder, outputNames): builder.PrependUOffsetTRelativeSlot(15, flatbuffers.number_types.UOffsetTFlags.py_type(outputNames), 0) +def FlatNodeStartOutputNamesVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatNodeAddOpName(builder, opName): builder.PrependUOffsetTRelativeSlot(16, flatbuffers.number_types.UOffsetTFlags.py_type(opName), 0) +def FlatNodeAddOutputTypes(builder, outputTypes): builder.PrependUOffsetTRelativeSlot(17, flatbuffers.number_types.UOffsetTFlags.py_type(outputTypes), 0) +def FlatNodeStartOutputTypesVector(builder, numElems): return builder.StartVector(1, numElems, 1) +def FlatNodeAddScalar(builder, scalar): builder.PrependUOffsetTRelativeSlot(18, flatbuffers.number_types.UOffsetTFlags.py_type(scalar), 0) +def FlatNodeAddControlDeps(builder, controlDeps): builder.PrependUOffsetTRelativeSlot(19, flatbuffers.number_types.UOffsetTFlags.py_type(controlDeps), 0) +def FlatNodeStartControlDepsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatNodeAddVarControlDeps(builder, varControlDeps): builder.PrependUOffsetTRelativeSlot(20, flatbuffers.number_types.UOffsetTFlags.py_type(varControlDeps), 0) +def FlatNodeStartVarControlDepsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatNodeAddControlDepFor(builder, controlDepFor): builder.PrependUOffsetTRelativeSlot(21, flatbuffers.number_types.UOffsetTFlags.py_type(controlDepFor), 0) +def FlatNodeStartControlDepForVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatNodeAddExtraTypes(builder, extraTypes): builder.PrependUOffsetTRelativeSlot(22, flatbuffers.number_types.UOffsetTFlags.py_type(extraTypes), 0) +def FlatNodeStartExtraTypesVector(builder, numElems): return builder.StartVector(1, numElems, 1) +def FlatNodeEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatProperties.cs b/libnd4j/include/graph/generated/nd4j/graph/FlatProperties.cs new file mode 100644 index 000000000..471dd9f3d --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatProperties.cs @@ -0,0 +1,132 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct FlatProperties : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static FlatProperties GetRootAsFlatProperties(ByteBuffer _bb) { return GetRootAsFlatProperties(_bb, new FlatProperties()); } + public static FlatProperties GetRootAsFlatProperties(ByteBuffer _bb, FlatProperties obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public FlatProperties __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public string Name { get { int o = __p.__offset(4); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetNameBytes() { return __p.__vector_as_span(4); } +#else + public ArraySegment? GetNameBytes() { return __p.__vector_as_arraysegment(4); } +#endif + public byte[] GetNameArray() { return __p.__vector_as_array(4); } + public int I(int j) { int o = __p.__offset(6); return o != 0 ? __p.bb.GetInt(__p.__vector(o) + j * 4) : (int)0; } + public int ILength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetIBytes() { return __p.__vector_as_span(6); } +#else + public ArraySegment? GetIBytes() { return __p.__vector_as_arraysegment(6); } +#endif + public int[] GetIArray() { return __p.__vector_as_array(6); } + public long L(int j) { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } + public int LLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetLBytes() { return __p.__vector_as_span(8); } +#else + public ArraySegment? GetLBytes() { return __p.__vector_as_arraysegment(8); } +#endif + public long[] GetLArray() { return __p.__vector_as_array(8); } + public double D(int j) { int o = __p.__offset(10); return o != 0 ? __p.bb.GetDouble(__p.__vector(o) + j * 8) : (double)0; } + public int DLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetDBytes() { return __p.__vector_as_span(10); } +#else + public ArraySegment? GetDBytes() { return __p.__vector_as_arraysegment(10); } +#endif + public double[] GetDArray() { return __p.__vector_as_array(10); } + public FlatArray? A(int j) { int o = __p.__offset(12); return o != 0 ? (FlatArray?)(new FlatArray()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } + public int ALength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } } + public bool B(int j) { int o = __p.__offset(14); return o != 0 ? 0!=__p.bb.Get(__p.__vector(o) + j * 1) : false; } + public int BLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetBBytes() { return __p.__vector_as_span(14); } +#else + public ArraySegment? GetBBytes() { return __p.__vector_as_arraysegment(14); } +#endif + public bool[] GetBArray() { return __p.__vector_as_array(14); } + public string S(int j) { int o = __p.__offset(16); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int SLength { get { int o = __p.__offset(16); return o != 0 ? __p.__vector_len(o) : 0; } } + public int Shape(int j) { int o = __p.__offset(18); return o != 0 ? __p.bb.GetInt(__p.__vector(o) + j * 4) : (int)0; } + public int ShapeLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetShapeBytes() { return __p.__vector_as_span(18); } +#else + public ArraySegment? GetShapeBytes() { return __p.__vector_as_arraysegment(18); } +#endif + public int[] GetShapeArray() { return __p.__vector_as_array(18); } + + public static Offset CreateFlatProperties(FlatBufferBuilder builder, + StringOffset nameOffset = default(StringOffset), + VectorOffset iOffset = default(VectorOffset), + VectorOffset lOffset = default(VectorOffset), + VectorOffset dOffset = default(VectorOffset), + VectorOffset aOffset = default(VectorOffset), + VectorOffset bOffset = default(VectorOffset), + VectorOffset sOffset = default(VectorOffset), + VectorOffset shapeOffset = default(VectorOffset)) { + builder.StartObject(8); + FlatProperties.AddShape(builder, shapeOffset); + FlatProperties.AddS(builder, sOffset); + FlatProperties.AddB(builder, bOffset); + FlatProperties.AddA(builder, aOffset); + FlatProperties.AddD(builder, dOffset); + FlatProperties.AddL(builder, lOffset); + FlatProperties.AddI(builder, iOffset); + FlatProperties.AddName(builder, nameOffset); + return FlatProperties.EndFlatProperties(builder); + } + + public static void StartFlatProperties(FlatBufferBuilder builder) { builder.StartObject(8); } + public static void AddName(FlatBufferBuilder builder, StringOffset nameOffset) { builder.AddOffset(0, nameOffset.Value, 0); } + public static void AddI(FlatBufferBuilder builder, VectorOffset iOffset) { builder.AddOffset(1, iOffset.Value, 0); } + public static VectorOffset CreateIVector(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt(data[i]); return builder.EndVector(); } + public static VectorOffset CreateIVectorBlock(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartIVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddL(FlatBufferBuilder builder, VectorOffset lOffset) { builder.AddOffset(2, lOffset.Value, 0); } + public static VectorOffset CreateLVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); } + public static VectorOffset CreateLVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } + public static void StartLVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } + public static void AddD(FlatBufferBuilder builder, VectorOffset dOffset) { builder.AddOffset(3, dOffset.Value, 0); } + public static VectorOffset CreateDVector(FlatBufferBuilder builder, double[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddDouble(data[i]); return builder.EndVector(); } + public static VectorOffset CreateDVectorBlock(FlatBufferBuilder builder, double[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } + public static void StartDVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } + public static void AddA(FlatBufferBuilder builder, VectorOffset aOffset) { builder.AddOffset(4, aOffset.Value, 0); } + public static VectorOffset CreateAVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateAVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartAVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddB(FlatBufferBuilder builder, VectorOffset bOffset) { builder.AddOffset(5, bOffset.Value, 0); } + public static VectorOffset CreateBVector(FlatBufferBuilder builder, bool[] data) { builder.StartVector(1, data.Length, 1); for (int i = data.Length - 1; i >= 0; i--) builder.AddBool(data[i]); return builder.EndVector(); } + public static VectorOffset CreateBVectorBlock(FlatBufferBuilder builder, bool[] data) { builder.StartVector(1, data.Length, 1); builder.Add(data); return builder.EndVector(); } + public static void StartBVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(1, numElems, 1); } + public static void AddS(FlatBufferBuilder builder, VectorOffset sOffset) { builder.AddOffset(6, sOffset.Value, 0); } + public static VectorOffset CreateSVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateSVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartSVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddShape(FlatBufferBuilder builder, VectorOffset shapeOffset) { builder.AddOffset(7, shapeOffset.Value, 0); } + public static VectorOffset CreateShapeVector(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt(data[i]); return builder.EndVector(); } + public static VectorOffset CreateShapeVectorBlock(FlatBufferBuilder builder, int[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartShapeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static Offset EndFlatProperties(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } + public static void FinishFlatPropertiesBuffer(FlatBufferBuilder builder, Offset offset) { builder.Finish(offset.Value); } + public static void FinishSizePrefixedFlatPropertiesBuffer(FlatBufferBuilder builder, Offset offset) { builder.FinishSizePrefixed(offset.Value); } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatProperties.java b/libnd4j/include/graph/generated/nd4j/graph/FlatProperties.java new file mode 100644 index 000000000..72df15cde --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatProperties.java @@ -0,0 +1,97 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FlatProperties extends Table { + public static FlatProperties getRootAsFlatProperties(ByteBuffer _bb) { return getRootAsFlatProperties(_bb, new FlatProperties()); } + public static FlatProperties getRootAsFlatProperties(ByteBuffer _bb, FlatProperties obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public FlatProperties __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public int i(int j) { int o = __offset(6); return o != 0 ? bb.getInt(__vector(o) + j * 4) : 0; } + public int iLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer iAsByteBuffer() { return __vector_as_bytebuffer(6, 4); } + public ByteBuffer iInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 4); } + public long l(int j) { int o = __offset(8); return o != 0 ? bb.getLong(__vector(o) + j * 8) : 0; } + public int lLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer lAsByteBuffer() { return __vector_as_bytebuffer(8, 8); } + public ByteBuffer lInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 8); } + public double d(int j) { int o = __offset(10); return o != 0 ? bb.getDouble(__vector(o) + j * 8) : 0; } + public int dLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer dAsByteBuffer() { return __vector_as_bytebuffer(10, 8); } + public ByteBuffer dInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 10, 8); } + public FlatArray a(int j) { return a(new FlatArray(), j); } + public FlatArray a(FlatArray obj, int j) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int aLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; } + public boolean b(int j) { int o = __offset(14); return o != 0 ? 0!=bb.get(__vector(o) + j * 1) : false; } + public int bLength() { int o = __offset(14); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer bAsByteBuffer() { return __vector_as_bytebuffer(14, 1); } + public ByteBuffer bInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 14, 1); } + public String s(int j) { int o = __offset(16); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int sLength() { int o = __offset(16); return o != 0 ? __vector_len(o) : 0; } + public int shape(int j) { int o = __offset(18); return o != 0 ? bb.getInt(__vector(o) + j * 4) : 0; } + public int shapeLength() { int o = __offset(18); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer shapeAsByteBuffer() { return __vector_as_bytebuffer(18, 4); } + public ByteBuffer shapeInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 18, 4); } + + public static int createFlatProperties(FlatBufferBuilder builder, + int nameOffset, + int iOffset, + int lOffset, + int dOffset, + int aOffset, + int bOffset, + int sOffset, + int shapeOffset) { + builder.startObject(8); + FlatProperties.addShape(builder, shapeOffset); + FlatProperties.addS(builder, sOffset); + FlatProperties.addB(builder, bOffset); + FlatProperties.addA(builder, aOffset); + FlatProperties.addD(builder, dOffset); + FlatProperties.addL(builder, lOffset); + FlatProperties.addI(builder, iOffset); + FlatProperties.addName(builder, nameOffset); + return FlatProperties.endFlatProperties(builder); + } + + public static void startFlatProperties(FlatBufferBuilder builder) { builder.startObject(8); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); } + public static void addI(FlatBufferBuilder builder, int iOffset) { builder.addOffset(1, iOffset, 0); } + public static int createIVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addInt(data[i]); return builder.endVector(); } + public static void startIVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addL(FlatBufferBuilder builder, int lOffset) { builder.addOffset(2, lOffset, 0); } + public static int createLVector(FlatBufferBuilder builder, long[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addLong(data[i]); return builder.endVector(); } + public static void startLVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); } + public static void addD(FlatBufferBuilder builder, int dOffset) { builder.addOffset(3, dOffset, 0); } + public static int createDVector(FlatBufferBuilder builder, double[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addDouble(data[i]); return builder.endVector(); } + public static void startDVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); } + public static void addA(FlatBufferBuilder builder, int aOffset) { builder.addOffset(4, aOffset, 0); } + public static int createAVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startAVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addB(FlatBufferBuilder builder, int bOffset) { builder.addOffset(5, bOffset, 0); } + public static int createBVector(FlatBufferBuilder builder, boolean[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addBoolean(data[i]); return builder.endVector(); } + public static void startBVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addS(FlatBufferBuilder builder, int sOffset) { builder.addOffset(6, sOffset, 0); } + public static int createSVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startSVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addShape(FlatBufferBuilder builder, int shapeOffset) { builder.addOffset(7, shapeOffset, 0); } + public static int createShapeVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addInt(data[i]); return builder.endVector(); } + public static void startShapeVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endFlatProperties(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } + public static void finishFlatPropertiesBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); } + public static void finishSizePrefixedFlatPropertiesBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset); } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatProperties.py b/libnd4j/include/graph/generated/nd4j/graph/FlatProperties.py new file mode 100644 index 000000000..e5a5ad5bf --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatProperties.py @@ -0,0 +1,203 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class FlatProperties(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsFlatProperties(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = FlatProperties() + x.Init(buf, n + offset) + return x + + # FlatProperties + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # FlatProperties + def Name(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + + # FlatProperties + def I(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return 0 + + # FlatProperties + def IAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) + return 0 + + # FlatProperties + def ILength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatProperties + def L(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) + return 0 + + # FlatProperties + def LAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) + return 0 + + # FlatProperties + def LLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatProperties + def D(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.Float64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) + return 0 + + # FlatProperties + def DAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Float64Flags, o) + return 0 + + # FlatProperties + def DLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatProperties + def A(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + x = self._tab.Vector(o) + x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 + x = self._tab.Indirect(x) + from .FlatArray import FlatArray + obj = FlatArray() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # FlatProperties + def ALength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatProperties + def B(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.BoolFlags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1)) + return 0 + + # FlatProperties + def BAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.BoolFlags, o) + return 0 + + # FlatProperties + def BLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatProperties + def S(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # FlatProperties + def SLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatProperties + def Shape(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return 0 + + # FlatProperties + def ShapeAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) + return 0 + + # FlatProperties + def ShapeLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + +def FlatPropertiesStart(builder): builder.StartObject(8) +def FlatPropertiesAddName(builder, name): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) +def FlatPropertiesAddI(builder, i): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(i), 0) +def FlatPropertiesStartIVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatPropertiesAddL(builder, l): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(l), 0) +def FlatPropertiesStartLVector(builder, numElems): return builder.StartVector(8, numElems, 8) +def FlatPropertiesAddD(builder, d): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(d), 0) +def FlatPropertiesStartDVector(builder, numElems): return builder.StartVector(8, numElems, 8) +def FlatPropertiesAddA(builder, a): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(a), 0) +def FlatPropertiesStartAVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatPropertiesAddB(builder, b): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(b), 0) +def FlatPropertiesStartBVector(builder, numElems): return builder.StartVector(1, numElems, 1) +def FlatPropertiesAddS(builder, s): builder.PrependUOffsetTRelativeSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(s), 0) +def FlatPropertiesStartSVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatPropertiesAddShape(builder, shape): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(shape), 0) +def FlatPropertiesStartShapeVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatPropertiesEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatResponse.cs b/libnd4j/include/graph/generated/nd4j/graph/FlatResponse.cs new file mode 100644 index 000000000..2acd7728d --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatResponse.cs @@ -0,0 +1,38 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct FlatResponse : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static FlatResponse GetRootAsFlatResponse(ByteBuffer _bb) { return GetRootAsFlatResponse(_bb, new FlatResponse()); } + public static FlatResponse GetRootAsFlatResponse(ByteBuffer _bb, FlatResponse obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public FlatResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int Status { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } + + public static Offset CreateFlatResponse(FlatBufferBuilder builder, + int status = 0) { + builder.StartObject(1); + FlatResponse.AddStatus(builder, status); + return FlatResponse.EndFlatResponse(builder); + } + + public static void StartFlatResponse(FlatBufferBuilder builder) { builder.StartObject(1); } + public static void AddStatus(FlatBufferBuilder builder, int status) { builder.AddInt(0, status, 0); } + public static Offset EndFlatResponse(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatResponse.java b/libnd4j/include/graph/generated/nd4j/graph/FlatResponse.java new file mode 100644 index 000000000..2fed88d5a --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatResponse.java @@ -0,0 +1,33 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FlatResponse extends Table { + public static FlatResponse getRootAsFlatResponse(ByteBuffer _bb) { return getRootAsFlatResponse(_bb, new FlatResponse()); } + public static FlatResponse getRootAsFlatResponse(ByteBuffer _bb, FlatResponse obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public FlatResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int status() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + + public static int createFlatResponse(FlatBufferBuilder builder, + int status) { + builder.startObject(1); + FlatResponse.addStatus(builder, status); + return FlatResponse.endFlatResponse(builder); + } + + public static void startFlatResponse(FlatBufferBuilder builder) { builder.startObject(1); } + public static void addStatus(FlatBufferBuilder builder, int status) { builder.addInt(0, status, 0); } + public static int endFlatResponse(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatResponse.py b/libnd4j/include/graph/generated/nd4j/graph/FlatResponse.py new file mode 100644 index 000000000..a9df9b4ee --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatResponse.py @@ -0,0 +1,44 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class FlatResponse(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsFlatResponse(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = FlatResponse() + x.Init(buf, n + offset) + return x + + # FlatResponse + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # FlatResponse + def Status(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + +def FlatResponseStart(builder): builder.StartObject(1) +def FlatResponseAddStatus(builder, status): builder.PrependInt32Slot(0, status, 0) +def FlatResponseEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatResult.cs b/libnd4j/include/graph/generated/nd4j/graph/FlatResult.cs new file mode 100644 index 000000000..20147a93e --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatResult.cs @@ -0,0 +1,64 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct FlatResult : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static FlatResult GetRootAsFlatResult(ByteBuffer _bb) { return GetRootAsFlatResult(_bb, new FlatResult()); } + public static FlatResult GetRootAsFlatResult(ByteBuffer _bb, FlatResult obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public FlatResult __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long Id { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + public FlatVariable? Variables(int j) { int o = __p.__offset(6); return o != 0 ? (FlatVariable?)(new FlatVariable()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } + public int VariablesLength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } } + public FlatTiming? Timing(int j) { int o = __p.__offset(8); return o != 0 ? (FlatTiming?)(new FlatTiming()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } + public int TimingLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } } + public long FootprintForward { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + public long FootprintBackward { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + + public static Offset CreateFlatResult(FlatBufferBuilder builder, + long id = 0, + VectorOffset variablesOffset = default(VectorOffset), + VectorOffset timingOffset = default(VectorOffset), + long footprintForward = 0, + long footprintBackward = 0) { + builder.StartObject(5); + FlatResult.AddFootprintBackward(builder, footprintBackward); + FlatResult.AddFootprintForward(builder, footprintForward); + FlatResult.AddId(builder, id); + FlatResult.AddTiming(builder, timingOffset); + FlatResult.AddVariables(builder, variablesOffset); + return FlatResult.EndFlatResult(builder); + } + + public static void StartFlatResult(FlatBufferBuilder builder) { builder.StartObject(5); } + public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); } + public static void AddVariables(FlatBufferBuilder builder, VectorOffset variablesOffset) { builder.AddOffset(1, variablesOffset.Value, 0); } + public static VectorOffset CreateVariablesVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateVariablesVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartVariablesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddTiming(FlatBufferBuilder builder, VectorOffset timingOffset) { builder.AddOffset(2, timingOffset.Value, 0); } + public static VectorOffset CreateTimingVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateTimingVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartTimingVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddFootprintForward(FlatBufferBuilder builder, long footprintForward) { builder.AddLong(3, footprintForward, 0); } + public static void AddFootprintBackward(FlatBufferBuilder builder, long footprintBackward) { builder.AddLong(4, footprintBackward, 0); } + public static Offset EndFlatResult(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } + public static void FinishFlatResultBuffer(FlatBufferBuilder builder, Offset offset) { builder.Finish(offset.Value); } + public static void FinishSizePrefixedFlatResultBuffer(FlatBufferBuilder builder, Offset offset) { builder.FinishSizePrefixed(offset.Value); } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatResult.java b/libnd4j/include/graph/generated/nd4j/graph/FlatResult.java new file mode 100644 index 000000000..8424e3ad2 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatResult.java @@ -0,0 +1,59 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FlatResult extends Table { + public static FlatResult getRootAsFlatResult(ByteBuffer _bb) { return getRootAsFlatResult(_bb, new FlatResult()); } + public static FlatResult getRootAsFlatResult(ByteBuffer _bb, FlatResult obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public FlatResult __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long id() { int o = __offset(4); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public FlatVariable variables(int j) { return variables(new FlatVariable(), j); } + public FlatVariable variables(FlatVariable obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int variablesLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public FlatTiming timing(int j) { return timing(new FlatTiming(), j); } + public FlatTiming timing(FlatTiming obj, int j) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int timingLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } + public long footprintForward() { int o = __offset(10); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public long footprintBackward() { int o = __offset(12); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + + public static int createFlatResult(FlatBufferBuilder builder, + long id, + int variablesOffset, + int timingOffset, + long footprintForward, + long footprintBackward) { + builder.startObject(5); + FlatResult.addFootprintBackward(builder, footprintBackward); + FlatResult.addFootprintForward(builder, footprintForward); + FlatResult.addId(builder, id); + FlatResult.addTiming(builder, timingOffset); + FlatResult.addVariables(builder, variablesOffset); + return FlatResult.endFlatResult(builder); + } + + public static void startFlatResult(FlatBufferBuilder builder) { builder.startObject(5); } + public static void addId(FlatBufferBuilder builder, long id) { builder.addLong(0, id, 0L); } + public static void addVariables(FlatBufferBuilder builder, int variablesOffset) { builder.addOffset(1, variablesOffset, 0); } + public static int createVariablesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startVariablesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addTiming(FlatBufferBuilder builder, int timingOffset) { builder.addOffset(2, timingOffset, 0); } + public static int createTimingVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startTimingVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addFootprintForward(FlatBufferBuilder builder, long footprintForward) { builder.addLong(3, footprintForward, 0L); } + public static void addFootprintBackward(FlatBufferBuilder builder, long footprintBackward) { builder.addLong(4, footprintBackward, 0L); } + public static int endFlatResult(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } + public static void finishFlatResultBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); } + public static void finishSizePrefixedFlatResultBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset); } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatResult.py b/libnd4j/include/graph/generated/nd4j/graph/FlatResult.py new file mode 100644 index 000000000..48c43fe11 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatResult.py @@ -0,0 +1,104 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class FlatResult(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsFlatResult(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = FlatResult() + x.Init(buf, n + offset) + return x + + # FlatResult + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # FlatResult + def Id(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + + # FlatResult + def Variables(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + x = self._tab.Vector(o) + x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 + x = self._tab.Indirect(x) + from .FlatVariable import FlatVariable + obj = FlatVariable() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # FlatResult + def VariablesLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatResult + def Timing(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + x = self._tab.Vector(o) + x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 + x = self._tab.Indirect(x) + from .FlatTiming import FlatTiming + obj = FlatTiming() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # FlatResult + def TimingLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatResult + def FootprintForward(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + + # FlatResult + def FootprintBackward(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + +def FlatResultStart(builder): builder.StartObject(5) +def FlatResultAddId(builder, id): builder.PrependInt64Slot(0, id, 0) +def FlatResultAddVariables(builder, variables): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(variables), 0) +def FlatResultStartVariablesVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatResultAddTiming(builder, timing): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(timing), 0) +def FlatResultStartTimingVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatResultAddFootprintForward(builder, footprintForward): builder.PrependInt64Slot(3, footprintForward, 0) +def FlatResultAddFootprintBackward(builder, footprintBackward): builder.PrependInt64Slot(4, footprintBackward, 0) +def FlatResultEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatTiming.cs b/libnd4j/include/graph/generated/nd4j/graph/FlatTiming.cs new file mode 100644 index 000000000..16aa8895c --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatTiming.cs @@ -0,0 +1,52 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct FlatTiming : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static FlatTiming GetRootAsFlatTiming(ByteBuffer _bb) { return GetRootAsFlatTiming(_bb, new FlatTiming()); } + public static FlatTiming GetRootAsFlatTiming(ByteBuffer _bb, FlatTiming obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public FlatTiming __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int Id { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } + public string Name { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetNameBytes() { return __p.__vector_as_span(6); } +#else + public ArraySegment? GetNameBytes() { return __p.__vector_as_arraysegment(6); } +#endif + public byte[] GetNameArray() { return __p.__vector_as_array(6); } + public LongPair? Timing { get { int o = __p.__offset(8); return o != 0 ? (LongPair?)(new LongPair()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } + + public static Offset CreateFlatTiming(FlatBufferBuilder builder, + int id = 0, + StringOffset nameOffset = default(StringOffset), + Offset timingOffset = default(Offset)) { + builder.StartObject(3); + FlatTiming.AddTiming(builder, timingOffset); + FlatTiming.AddName(builder, nameOffset); + FlatTiming.AddId(builder, id); + return FlatTiming.EndFlatTiming(builder); + } + + public static void StartFlatTiming(FlatBufferBuilder builder) { builder.StartObject(3); } + public static void AddId(FlatBufferBuilder builder, int id) { builder.AddInt(0, id, 0); } + public static void AddName(FlatBufferBuilder builder, StringOffset nameOffset) { builder.AddOffset(1, nameOffset.Value, 0); } + public static void AddTiming(FlatBufferBuilder builder, Offset timingOffset) { builder.AddOffset(2, timingOffset.Value, 0); } + public static Offset EndFlatTiming(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatTiming.java b/libnd4j/include/graph/generated/nd4j/graph/FlatTiming.java new file mode 100644 index 000000000..926bf6811 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatTiming.java @@ -0,0 +1,44 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FlatTiming extends Table { + public static FlatTiming getRootAsFlatTiming(ByteBuffer _bb) { return getRootAsFlatTiming(_bb, new FlatTiming()); } + public static FlatTiming getRootAsFlatTiming(ByteBuffer _bb, FlatTiming obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public FlatTiming __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int id() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public String name() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + public LongPair timing() { return timing(new LongPair()); } + public LongPair timing(LongPair obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createFlatTiming(FlatBufferBuilder builder, + int id, + int nameOffset, + int timingOffset) { + builder.startObject(3); + FlatTiming.addTiming(builder, timingOffset); + FlatTiming.addName(builder, nameOffset); + FlatTiming.addId(builder, id); + return FlatTiming.endFlatTiming(builder); + } + + public static void startFlatTiming(FlatBufferBuilder builder) { builder.startObject(3); } + public static void addId(FlatBufferBuilder builder, int id) { builder.addInt(0, id, 0); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(1, nameOffset, 0); } + public static void addTiming(FlatBufferBuilder builder, int timingOffset) { builder.addOffset(2, timingOffset, 0); } + public static int endFlatTiming(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatTiming.py b/libnd4j/include/graph/generated/nd4j/graph/FlatTiming.py new file mode 100644 index 000000000..3ecaa2380 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatTiming.py @@ -0,0 +1,64 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class FlatTiming(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsFlatTiming(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = FlatTiming() + x.Init(buf, n + offset) + return x + + # FlatTiming + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # FlatTiming + def Id(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + + # FlatTiming + def Name(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + + # FlatTiming + def Timing(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + x = self._tab.Indirect(o + self._tab.Pos) + from .LongPair import LongPair + obj = LongPair() + obj.Init(self._tab.Bytes, x) + return obj + return None + +def FlatTimingStart(builder): builder.StartObject(3) +def FlatTimingAddId(builder, id): builder.PrependInt32Slot(0, id, 0) +def FlatTimingAddName(builder, name): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) +def FlatTimingAddTiming(builder, timing): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(timing), 0) +def FlatTimingEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatVariable.cs b/libnd4j/include/graph/generated/nd4j/graph/FlatVariable.cs new file mode 100644 index 000000000..9331965be --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatVariable.cs @@ -0,0 +1,104 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct FlatVariable : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static FlatVariable GetRootAsFlatVariable(ByteBuffer _bb) { return GetRootAsFlatVariable(_bb, new FlatVariable()); } + public static FlatVariable GetRootAsFlatVariable(ByteBuffer _bb, FlatVariable obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public FlatVariable __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public IntPair? Id { get { int o = __p.__offset(4); return o != 0 ? (IntPair?)(new IntPair()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } + public string Name { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetNameBytes() { return __p.__vector_as_span(6); } +#else + public ArraySegment? GetNameBytes() { return __p.__vector_as_arraysegment(6); } +#endif + public byte[] GetNameArray() { return __p.__vector_as_array(6); } + public DType Dtype { get { int o = __p.__offset(8); return o != 0 ? (DType)__p.bb.GetSbyte(o + __p.bb_pos) : DType.INHERIT; } } + public long Shape(int j) { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } + public int ShapeLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetShapeBytes() { return __p.__vector_as_span(10); } +#else + public ArraySegment? GetShapeBytes() { return __p.__vector_as_arraysegment(10); } +#endif + public long[] GetShapeArray() { return __p.__vector_as_array(10); } + public FlatArray? Ndarray { get { int o = __p.__offset(12); return o != 0 ? (FlatArray?)(new FlatArray()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } + public int Device { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } + public VarType Variabletype { get { int o = __p.__offset(16); return o != 0 ? (VarType)__p.bb.GetSbyte(o + __p.bb_pos) : VarType.VARIABLE; } } + public string ControlDeps(int j) { int o = __p.__offset(18); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int ControlDepsLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } } + public string ControlDepForOp(int j) { int o = __p.__offset(20); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int ControlDepForOpLength { get { int o = __p.__offset(20); return o != 0 ? __p.__vector_len(o) : 0; } } + public string ControlDepsForVar(int j) { int o = __p.__offset(22); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int ControlDepsForVarLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } } + + public static Offset CreateFlatVariable(FlatBufferBuilder builder, + Offset idOffset = default(Offset), + StringOffset nameOffset = default(StringOffset), + DType dtype = DType.INHERIT, + VectorOffset shapeOffset = default(VectorOffset), + Offset ndarrayOffset = default(Offset), + int device = 0, + VarType variabletype = VarType.VARIABLE, + VectorOffset controlDepsOffset = default(VectorOffset), + VectorOffset controlDepForOpOffset = default(VectorOffset), + VectorOffset controlDepsForVarOffset = default(VectorOffset)) { + builder.StartObject(10); + FlatVariable.AddControlDepsForVar(builder, controlDepsForVarOffset); + FlatVariable.AddControlDepForOp(builder, controlDepForOpOffset); + FlatVariable.AddControlDeps(builder, controlDepsOffset); + FlatVariable.AddDevice(builder, device); + FlatVariable.AddNdarray(builder, ndarrayOffset); + FlatVariable.AddShape(builder, shapeOffset); + FlatVariable.AddName(builder, nameOffset); + FlatVariable.AddId(builder, idOffset); + FlatVariable.AddVariabletype(builder, variabletype); + FlatVariable.AddDtype(builder, dtype); + return FlatVariable.EndFlatVariable(builder); + } + + public static void StartFlatVariable(FlatBufferBuilder builder) { builder.StartObject(10); } + public static void AddId(FlatBufferBuilder builder, Offset idOffset) { builder.AddOffset(0, idOffset.Value, 0); } + public static void AddName(FlatBufferBuilder builder, StringOffset nameOffset) { builder.AddOffset(1, nameOffset.Value, 0); } + public static void AddDtype(FlatBufferBuilder builder, DType dtype) { builder.AddSbyte(2, (sbyte)dtype, 0); } + public static void AddShape(FlatBufferBuilder builder, VectorOffset shapeOffset) { builder.AddOffset(3, shapeOffset.Value, 0); } + public static VectorOffset CreateShapeVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); } + public static VectorOffset CreateShapeVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } + public static void StartShapeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } + public static void AddNdarray(FlatBufferBuilder builder, Offset ndarrayOffset) { builder.AddOffset(4, ndarrayOffset.Value, 0); } + public static void AddDevice(FlatBufferBuilder builder, int device) { builder.AddInt(5, device, 0); } + public static void AddVariabletype(FlatBufferBuilder builder, VarType variabletype) { builder.AddSbyte(6, (sbyte)variabletype, 0); } + public static void AddControlDeps(FlatBufferBuilder builder, VectorOffset controlDepsOffset) { builder.AddOffset(7, controlDepsOffset.Value, 0); } + public static VectorOffset CreateControlDepsVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateControlDepsVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartControlDepsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddControlDepForOp(FlatBufferBuilder builder, VectorOffset controlDepForOpOffset) { builder.AddOffset(8, controlDepForOpOffset.Value, 0); } + public static VectorOffset CreateControlDepForOpVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateControlDepForOpVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartControlDepForOpVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddControlDepsForVar(FlatBufferBuilder builder, VectorOffset controlDepsForVarOffset) { builder.AddOffset(9, controlDepsForVarOffset.Value, 0); } + public static VectorOffset CreateControlDepsForVarVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateControlDepsForVarVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartControlDepsForVarVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static Offset EndFlatVariable(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } + public static void FinishFlatVariableBuffer(FlatBufferBuilder builder, Offset offset) { builder.Finish(offset.Value); } + public static void FinishSizePrefixedFlatVariableBuffer(FlatBufferBuilder builder, Offset offset) { builder.FinishSizePrefixed(offset.Value); } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatVariable.java b/libnd4j/include/graph/generated/nd4j/graph/FlatVariable.java new file mode 100644 index 000000000..d73c990bb --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatVariable.java @@ -0,0 +1,89 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FlatVariable extends Table { + public static FlatVariable getRootAsFlatVariable(ByteBuffer _bb) { return getRootAsFlatVariable(_bb, new FlatVariable()); } + public static FlatVariable getRootAsFlatVariable(ByteBuffer _bb, FlatVariable obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public FlatVariable __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public IntPair id() { return id(new IntPair()); } + public IntPair id(IntPair obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public String name() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + public byte dtype() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) : 0; } + public long shape(int j) { int o = __offset(10); return o != 0 ? bb.getLong(__vector(o) + j * 8) : 0; } + public int shapeLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer shapeAsByteBuffer() { return __vector_as_bytebuffer(10, 8); } + public ByteBuffer shapeInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 10, 8); } + public FlatArray ndarray() { return ndarray(new FlatArray()); } + public FlatArray ndarray(FlatArray obj) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public int device() { int o = __offset(14); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public byte variabletype() { int o = __offset(16); return o != 0 ? bb.get(o + bb_pos) : 0; } + public String controlDeps(int j) { int o = __offset(18); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int controlDepsLength() { int o = __offset(18); return o != 0 ? __vector_len(o) : 0; } + public String controlDepForOp(int j) { int o = __offset(20); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int controlDepForOpLength() { int o = __offset(20); return o != 0 ? __vector_len(o) : 0; } + public String controlDepsForVar(int j) { int o = __offset(22); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int controlDepsForVarLength() { int o = __offset(22); return o != 0 ? __vector_len(o) : 0; } + + public static int createFlatVariable(FlatBufferBuilder builder, + int idOffset, + int nameOffset, + byte dtype, + int shapeOffset, + int ndarrayOffset, + int device, + byte variabletype, + int controlDepsOffset, + int controlDepForOpOffset, + int controlDepsForVarOffset) { + builder.startObject(10); + FlatVariable.addControlDepsForVar(builder, controlDepsForVarOffset); + FlatVariable.addControlDepForOp(builder, controlDepForOpOffset); + FlatVariable.addControlDeps(builder, controlDepsOffset); + FlatVariable.addDevice(builder, device); + FlatVariable.addNdarray(builder, ndarrayOffset); + FlatVariable.addShape(builder, shapeOffset); + FlatVariable.addName(builder, nameOffset); + FlatVariable.addId(builder, idOffset); + FlatVariable.addVariabletype(builder, variabletype); + FlatVariable.addDtype(builder, dtype); + return FlatVariable.endFlatVariable(builder); + } + + public static void startFlatVariable(FlatBufferBuilder builder) { builder.startObject(10); } + public static void addId(FlatBufferBuilder builder, int idOffset) { builder.addOffset(0, idOffset, 0); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(1, nameOffset, 0); } + public static void addDtype(FlatBufferBuilder builder, byte dtype) { builder.addByte(2, dtype, 0); } + public static void addShape(FlatBufferBuilder builder, int shapeOffset) { builder.addOffset(3, shapeOffset, 0); } + public static int createShapeVector(FlatBufferBuilder builder, long[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addLong(data[i]); return builder.endVector(); } + public static void startShapeVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); } + public static void addNdarray(FlatBufferBuilder builder, int ndarrayOffset) { builder.addOffset(4, ndarrayOffset, 0); } + public static void addDevice(FlatBufferBuilder builder, int device) { builder.addInt(5, device, 0); } + public static void addVariabletype(FlatBufferBuilder builder, byte variabletype) { builder.addByte(6, variabletype, 0); } + public static void addControlDeps(FlatBufferBuilder builder, int controlDepsOffset) { builder.addOffset(7, controlDepsOffset, 0); } + public static int createControlDepsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startControlDepsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addControlDepForOp(FlatBufferBuilder builder, int controlDepForOpOffset) { builder.addOffset(8, controlDepForOpOffset, 0); } + public static int createControlDepForOpVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startControlDepForOpVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addControlDepsForVar(FlatBufferBuilder builder, int controlDepsForVarOffset) { builder.addOffset(9, controlDepsForVarOffset, 0); } + public static int createControlDepsForVarVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startControlDepsForVarVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endFlatVariable(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } + public static void finishFlatVariableBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); } + public static void finishSizePrefixedFlatVariableBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset); } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/FlatVariable.py b/libnd4j/include/graph/generated/nd4j/graph/FlatVariable.py new file mode 100644 index 000000000..2c2a42374 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FlatVariable.py @@ -0,0 +1,167 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class FlatVariable(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsFlatVariable(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = FlatVariable() + x.Init(buf, n + offset) + return x + + # FlatVariable + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # FlatVariable + def Id(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + x = self._tab.Indirect(o + self._tab.Pos) + from .IntPair import IntPair + obj = IntPair() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # FlatVariable + def Name(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + + # FlatVariable + def Dtype(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) + return 0 + + # FlatVariable + def Shape(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) + return 0 + + # FlatVariable + def ShapeAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) + return 0 + + # FlatVariable + def ShapeLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatVariable + def Ndarray(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + x = self._tab.Indirect(o + self._tab.Pos) + from .FlatArray import FlatArray + obj = FlatArray() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # FlatVariable + def Device(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + + # FlatVariable + def Variabletype(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) + return 0 + + # FlatVariable + def ControlDeps(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # FlatVariable + def ControlDepsLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatVariable + def ControlDepForOp(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # FlatVariable + def ControlDepForOpLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # FlatVariable + def ControlDepsForVar(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # FlatVariable + def ControlDepsForVarLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + +def FlatVariableStart(builder): builder.StartObject(10) +def FlatVariableAddId(builder, id): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(id), 0) +def FlatVariableAddName(builder, name): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) +def FlatVariableAddDtype(builder, dtype): builder.PrependInt8Slot(2, dtype, 0) +def FlatVariableAddShape(builder, shape): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(shape), 0) +def FlatVariableStartShapeVector(builder, numElems): return builder.StartVector(8, numElems, 8) +def FlatVariableAddNdarray(builder, ndarray): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(ndarray), 0) +def FlatVariableAddDevice(builder, device): builder.PrependInt32Slot(5, device, 0) +def FlatVariableAddVariabletype(builder, variabletype): builder.PrependInt8Slot(6, variabletype, 0) +def FlatVariableAddControlDeps(builder, controlDeps): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(controlDeps), 0) +def FlatVariableStartControlDepsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatVariableAddControlDepForOp(builder, controlDepForOp): builder.PrependUOffsetTRelativeSlot(8, flatbuffers.number_types.UOffsetTFlags.py_type(controlDepForOp), 0) +def FlatVariableStartControlDepForOpVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatVariableAddControlDepsForVar(builder, controlDepsForVar): builder.PrependUOffsetTRelativeSlot(9, flatbuffers.number_types.UOffsetTFlags.py_type(controlDepsForVar), 0) +def FlatVariableStartControlDepsForVarVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def FlatVariableEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/FrameIteration.cs b/libnd4j/include/graph/generated/nd4j/graph/FrameIteration.cs new file mode 100644 index 000000000..6b73ff261 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FrameIteration.cs @@ -0,0 +1,48 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct FrameIteration : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static FrameIteration GetRootAsFrameIteration(ByteBuffer _bb) { return GetRootAsFrameIteration(_bb, new FrameIteration()); } + public static FrameIteration GetRootAsFrameIteration(ByteBuffer _bb, FrameIteration obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public FrameIteration __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public string Frame { get { int o = __p.__offset(4); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetFrameBytes() { return __p.__vector_as_span(4); } +#else + public ArraySegment? GetFrameBytes() { return __p.__vector_as_arraysegment(4); } +#endif + public byte[] GetFrameArray() { return __p.__vector_as_array(4); } + public ushort Iteration { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetUshort(o + __p.bb_pos) : (ushort)0; } } + + public static Offset CreateFrameIteration(FlatBufferBuilder builder, + StringOffset frameOffset = default(StringOffset), + ushort iteration = 0) { + builder.StartObject(2); + FrameIteration.AddFrame(builder, frameOffset); + FrameIteration.AddIteration(builder, iteration); + return FrameIteration.EndFrameIteration(builder); + } + + public static void StartFrameIteration(FlatBufferBuilder builder) { builder.StartObject(2); } + public static void AddFrame(FlatBufferBuilder builder, StringOffset frameOffset) { builder.AddOffset(0, frameOffset.Value, 0); } + public static void AddIteration(FlatBufferBuilder builder, ushort iteration) { builder.AddUshort(1, iteration, 0); } + public static Offset EndFrameIteration(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/FrameIteration.java b/libnd4j/include/graph/generated/nd4j/graph/FrameIteration.java new file mode 100644 index 000000000..58690c018 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FrameIteration.java @@ -0,0 +1,39 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class FrameIteration extends Table { + public static FrameIteration getRootAsFrameIteration(ByteBuffer _bb) { return getRootAsFrameIteration(_bb, new FrameIteration()); } + public static FrameIteration getRootAsFrameIteration(ByteBuffer _bb, FrameIteration obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public FrameIteration __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String frame() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer frameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer frameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public int iteration() { int o = __offset(6); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } + + public static int createFrameIteration(FlatBufferBuilder builder, + int frameOffset, + int iteration) { + builder.startObject(2); + FrameIteration.addFrame(builder, frameOffset); + FrameIteration.addIteration(builder, iteration); + return FrameIteration.endFrameIteration(builder); + } + + public static void startFrameIteration(FlatBufferBuilder builder) { builder.startObject(2); } + public static void addFrame(FlatBufferBuilder builder, int frameOffset) { builder.addOffset(0, frameOffset, 0); } + public static void addIteration(FlatBufferBuilder builder, int iteration) { builder.addShort(1, (short)iteration, (short)0); } + public static int endFrameIteration(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/FrameIteration.py b/libnd4j/include/graph/generated/nd4j/graph/FrameIteration.py new file mode 100644 index 000000000..7c125181e --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/FrameIteration.py @@ -0,0 +1,52 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class FrameIteration(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsFrameIteration(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = FrameIteration() + x.Init(buf, n + offset) + return x + + # FrameIteration + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # FrameIteration + def Frame(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + + # FrameIteration + def Iteration(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Uint16Flags, o + self._tab.Pos) + return 0 + +def FrameIterationStart(builder): builder.StartObject(2) +def FrameIterationAddFrame(builder, frame): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(frame), 0) +def FrameIterationAddIteration(builder, iteration): builder.PrependUint16Slot(1, iteration, 0) +def FrameIterationEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/GraphInferenceServerGrpc.java b/libnd4j/include/graph/generated/nd4j/graph/GraphInferenceServerGrpc.java new file mode 100644 index 000000000..cc9f1240d --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/GraphInferenceServerGrpc.java @@ -0,0 +1,551 @@ +//Generated by flatc compiler (version 1.10.0) +//If you make any local changes, they will be lost +//source: graph.fbs + +package nd4j.graph; + +import com.google.flatbuffers.grpc.FlatbuffersUtils; + +import java.nio.ByteBuffer; +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: graph.fbs") +public final class GraphInferenceServerGrpc { + + private GraphInferenceServerGrpc() {} + + public static final String SERVICE_NAME = "nd4j.graph.GraphInferenceServer"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getRegisterGraphMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_REGISTER_GRAPH = getRegisterGraphMethod(); + + private static volatile io.grpc.MethodDescriptor getRegisterGraphMethod; + + private static volatile FlatbuffersUtils.FBExtactor extractorOfFlatGraph; + private static FlatbuffersUtils.FBExtactor getExtractorOfFlatGraph() { + if (extractorOfFlatGraph != null) return extractorOfFlatGraph; + synchronized (GraphInferenceServerGrpc.class) { + if (extractorOfFlatGraph != null) return extractorOfFlatGraph; + extractorOfFlatGraph = new FlatbuffersUtils.FBExtactor() { + public nd4j.graph.FlatGraph extract (ByteBuffer buffer) { + return nd4j.graph.FlatGraph.getRootAsFlatGraph(buffer); + } + }; + return extractorOfFlatGraph; + } + } + + private static volatile FlatbuffersUtils.FBExtactor extractorOfFlatResponse; + private static FlatbuffersUtils.FBExtactor getExtractorOfFlatResponse() { + if (extractorOfFlatResponse != null) return extractorOfFlatResponse; + synchronized (GraphInferenceServerGrpc.class) { + if (extractorOfFlatResponse != null) return extractorOfFlatResponse; + extractorOfFlatResponse = new FlatbuffersUtils.FBExtactor() { + public nd4j.graph.FlatResponse extract (ByteBuffer buffer) { + return nd4j.graph.FlatResponse.getRootAsFlatResponse(buffer); + } + }; + return extractorOfFlatResponse; + } + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getRegisterGraphMethod() { + io.grpc.MethodDescriptor getRegisterGraphMethod; + if ((getRegisterGraphMethod = GraphInferenceServerGrpc.getRegisterGraphMethod) == null) { + synchronized (GraphInferenceServerGrpc.class) { + if ((getRegisterGraphMethod = GraphInferenceServerGrpc.getRegisterGraphMethod) == null) { + GraphInferenceServerGrpc.getRegisterGraphMethod = getRegisterGraphMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "nd4j.graph.GraphInferenceServer", "RegisterGraph")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(FlatbuffersUtils.marshaller( + nd4j.graph.FlatGraph.class, getExtractorOfFlatGraph())) + .setResponseMarshaller(FlatbuffersUtils.marshaller( + nd4j.graph.FlatResponse.class, getExtractorOfFlatResponse())) + .setSchemaDescriptor(null) + .build(); + } + } + } + return getRegisterGraphMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getForgetGraphMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_FORGET_GRAPH = getForgetGraphMethod(); + + private static volatile io.grpc.MethodDescriptor getForgetGraphMethod; + + private static volatile FlatbuffersUtils.FBExtactor extractorOfFlatDropRequest; + private static FlatbuffersUtils.FBExtactor getExtractorOfFlatDropRequest() { + if (extractorOfFlatDropRequest != null) return extractorOfFlatDropRequest; + synchronized (GraphInferenceServerGrpc.class) { + if (extractorOfFlatDropRequest != null) return extractorOfFlatDropRequest; + extractorOfFlatDropRequest = new FlatbuffersUtils.FBExtactor() { + public nd4j.graph.FlatDropRequest extract (ByteBuffer buffer) { + return nd4j.graph.FlatDropRequest.getRootAsFlatDropRequest(buffer); + } + }; + return extractorOfFlatDropRequest; + } + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getForgetGraphMethod() { + io.grpc.MethodDescriptor getForgetGraphMethod; + if ((getForgetGraphMethod = GraphInferenceServerGrpc.getForgetGraphMethod) == null) { + synchronized (GraphInferenceServerGrpc.class) { + if ((getForgetGraphMethod = GraphInferenceServerGrpc.getForgetGraphMethod) == null) { + GraphInferenceServerGrpc.getForgetGraphMethod = getForgetGraphMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "nd4j.graph.GraphInferenceServer", "ForgetGraph")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(FlatbuffersUtils.marshaller( + nd4j.graph.FlatDropRequest.class, getExtractorOfFlatDropRequest())) + .setResponseMarshaller(FlatbuffersUtils.marshaller( + nd4j.graph.FlatResponse.class, getExtractorOfFlatResponse())) + .setSchemaDescriptor(null) + .build(); + } + } + } + return getForgetGraphMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getReplaceGraphMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_REPLACE_GRAPH = getReplaceGraphMethod(); + + private static volatile io.grpc.MethodDescriptor getReplaceGraphMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getReplaceGraphMethod() { + io.grpc.MethodDescriptor getReplaceGraphMethod; + if ((getReplaceGraphMethod = GraphInferenceServerGrpc.getReplaceGraphMethod) == null) { + synchronized (GraphInferenceServerGrpc.class) { + if ((getReplaceGraphMethod = GraphInferenceServerGrpc.getReplaceGraphMethod) == null) { + GraphInferenceServerGrpc.getReplaceGraphMethod = getReplaceGraphMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "nd4j.graph.GraphInferenceServer", "ReplaceGraph")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(FlatbuffersUtils.marshaller( + nd4j.graph.FlatGraph.class, getExtractorOfFlatGraph())) + .setResponseMarshaller(FlatbuffersUtils.marshaller( + nd4j.graph.FlatResponse.class, getExtractorOfFlatResponse())) + .setSchemaDescriptor(null) + .build(); + } + } + } + return getReplaceGraphMethod; + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getInferenceRequestMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_INFERENCE_REQUEST = getInferenceRequestMethod(); + + private static volatile io.grpc.MethodDescriptor getInferenceRequestMethod; + + private static volatile FlatbuffersUtils.FBExtactor extractorOfFlatInferenceRequest; + private static FlatbuffersUtils.FBExtactor getExtractorOfFlatInferenceRequest() { + if (extractorOfFlatInferenceRequest != null) return extractorOfFlatInferenceRequest; + synchronized (GraphInferenceServerGrpc.class) { + if (extractorOfFlatInferenceRequest != null) return extractorOfFlatInferenceRequest; + extractorOfFlatInferenceRequest = new FlatbuffersUtils.FBExtactor() { + public nd4j.graph.FlatInferenceRequest extract (ByteBuffer buffer) { + return nd4j.graph.FlatInferenceRequest.getRootAsFlatInferenceRequest(buffer); + } + }; + return extractorOfFlatInferenceRequest; + } + } + + private static volatile FlatbuffersUtils.FBExtactor extractorOfFlatResult; + private static FlatbuffersUtils.FBExtactor getExtractorOfFlatResult() { + if (extractorOfFlatResult != null) return extractorOfFlatResult; + synchronized (GraphInferenceServerGrpc.class) { + if (extractorOfFlatResult != null) return extractorOfFlatResult; + extractorOfFlatResult = new FlatbuffersUtils.FBExtactor() { + public nd4j.graph.FlatResult extract (ByteBuffer buffer) { + return nd4j.graph.FlatResult.getRootAsFlatResult(buffer); + } + }; + return extractorOfFlatResult; + } + } + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getInferenceRequestMethod() { + io.grpc.MethodDescriptor getInferenceRequestMethod; + if ((getInferenceRequestMethod = GraphInferenceServerGrpc.getInferenceRequestMethod) == null) { + synchronized (GraphInferenceServerGrpc.class) { + if ((getInferenceRequestMethod = GraphInferenceServerGrpc.getInferenceRequestMethod) == null) { + GraphInferenceServerGrpc.getInferenceRequestMethod = getInferenceRequestMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "nd4j.graph.GraphInferenceServer", "InferenceRequest")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(FlatbuffersUtils.marshaller( + nd4j.graph.FlatInferenceRequest.class, getExtractorOfFlatInferenceRequest())) + .setResponseMarshaller(FlatbuffersUtils.marshaller( + nd4j.graph.FlatResult.class, getExtractorOfFlatResult())) + .setSchemaDescriptor(null) + .build(); + } + } + } + return getInferenceRequestMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static GraphInferenceServerStub newStub(io.grpc.Channel channel) { + return new GraphInferenceServerStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static GraphInferenceServerBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new GraphInferenceServerBlockingStub(channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static GraphInferenceServerFutureStub newFutureStub( + io.grpc.Channel channel) { + return new GraphInferenceServerFutureStub(channel); + } + + /** + */ + public static abstract class GraphInferenceServerImplBase implements io.grpc.BindableService { + + /** + */ + public void registerGraph(nd4j.graph.FlatGraph request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getRegisterGraphMethod(), responseObserver); + } + + /** + */ + public void forgetGraph(nd4j.graph.FlatDropRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getForgetGraphMethod(), responseObserver); + } + + /** + */ + public void replaceGraph(nd4j.graph.FlatGraph request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getReplaceGraphMethod(), responseObserver); + } + + /** + */ + public void inferenceRequest(nd4j.graph.FlatInferenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getInferenceRequestMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getRegisterGraphMethod(), + asyncUnaryCall( + new MethodHandlers< + nd4j.graph.FlatGraph, + nd4j.graph.FlatResponse>( + this, METHODID_REGISTER_GRAPH))) + .addMethod( + getForgetGraphMethod(), + asyncUnaryCall( + new MethodHandlers< + nd4j.graph.FlatDropRequest, + nd4j.graph.FlatResponse>( + this, METHODID_FORGET_GRAPH))) + .addMethod( + getReplaceGraphMethod(), + asyncUnaryCall( + new MethodHandlers< + nd4j.graph.FlatGraph, + nd4j.graph.FlatResponse>( + this, METHODID_REPLACE_GRAPH))) + .addMethod( + getInferenceRequestMethod(), + asyncUnaryCall( + new MethodHandlers< + nd4j.graph.FlatInferenceRequest, + nd4j.graph.FlatResult>( + this, METHODID_INFERENCE_REQUEST))) + .build(); + } + } + + /** + */ + public static final class GraphInferenceServerStub extends io.grpc.stub.AbstractStub { + private GraphInferenceServerStub(io.grpc.Channel channel) { + super(channel); + } + + private GraphInferenceServerStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GraphInferenceServerStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new GraphInferenceServerStub(channel, callOptions); + } + + /** + */ + public void registerGraph(nd4j.graph.FlatGraph request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getRegisterGraphMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void forgetGraph(nd4j.graph.FlatDropRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getForgetGraphMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void replaceGraph(nd4j.graph.FlatGraph request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getReplaceGraphMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void inferenceRequest(nd4j.graph.FlatInferenceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getInferenceRequestMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + */ + public static final class GraphInferenceServerBlockingStub extends io.grpc.stub.AbstractStub { + private GraphInferenceServerBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private GraphInferenceServerBlockingStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GraphInferenceServerBlockingStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new GraphInferenceServerBlockingStub(channel, callOptions); + } + + /** + */ + public nd4j.graph.FlatResponse registerGraph(nd4j.graph.FlatGraph request) { + return blockingUnaryCall( + getChannel(), getRegisterGraphMethod(), getCallOptions(), request); + } + + /** + */ + public nd4j.graph.FlatResponse forgetGraph(nd4j.graph.FlatDropRequest request) { + return blockingUnaryCall( + getChannel(), getForgetGraphMethod(), getCallOptions(), request); + } + + /** + */ + public nd4j.graph.FlatResponse replaceGraph(nd4j.graph.FlatGraph request) { + return blockingUnaryCall( + getChannel(), getReplaceGraphMethod(), getCallOptions(), request); + } + + /** + */ + public nd4j.graph.FlatResult inferenceRequest(nd4j.graph.FlatInferenceRequest request) { + return blockingUnaryCall( + getChannel(), getInferenceRequestMethod(), getCallOptions(), request); + } + } + + /** + */ + public static final class GraphInferenceServerFutureStub extends io.grpc.stub.AbstractStub { + private GraphInferenceServerFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private GraphInferenceServerFutureStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected GraphInferenceServerFutureStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new GraphInferenceServerFutureStub(channel, callOptions); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture registerGraph( + nd4j.graph.FlatGraph request) { + return futureUnaryCall( + getChannel().newCall(getRegisterGraphMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture forgetGraph( + nd4j.graph.FlatDropRequest request) { + return futureUnaryCall( + getChannel().newCall(getForgetGraphMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture replaceGraph( + nd4j.graph.FlatGraph request) { + return futureUnaryCall( + getChannel().newCall(getReplaceGraphMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture inferenceRequest( + nd4j.graph.FlatInferenceRequest request) { + return futureUnaryCall( + getChannel().newCall(getInferenceRequestMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_REGISTER_GRAPH = 0; + private static final int METHODID_FORGET_GRAPH = 1; + private static final int METHODID_REPLACE_GRAPH = 2; + private static final int METHODID_INFERENCE_REQUEST = 3; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final GraphInferenceServerImplBase serviceImpl; + private final int methodId; + + MethodHandlers(GraphInferenceServerImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_REGISTER_GRAPH: + serviceImpl.registerGraph((nd4j.graph.FlatGraph) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_FORGET_GRAPH: + serviceImpl.forgetGraph((nd4j.graph.FlatDropRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_REPLACE_GRAPH: + serviceImpl.replaceGraph((nd4j.graph.FlatGraph) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_INFERENCE_REQUEST: + serviceImpl.inferenceRequest((nd4j.graph.FlatInferenceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (GraphInferenceServerGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(null) + .addMethod(getRegisterGraphMethod()) + .addMethod(getForgetGraphMethod()) + .addMethod(getReplaceGraphMethod()) + .addMethod(getInferenceRequestMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/InputType.cs b/libnd4j/include/graph/generated/nd4j/graph/InputType.cs new file mode 100644 index 000000000..0172b846d --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/InputType.cs @@ -0,0 +1,18 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +public enum InputType : sbyte +{ + UNDEFINED = 0, + NUMERIC = 1, + STRINGULAR = 2, + NUMERIC_SET = 3, + STRINGULAR_SET = 4, +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/InputType.java b/libnd4j/include/graph/generated/nd4j/graph/InputType.java new file mode 100644 index 000000000..158d3b803 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/InputType.java @@ -0,0 +1,17 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +public final class InputType { + private InputType() { } + public static final byte UNDEFINED = 0; + public static final byte NUMERIC = 1; + public static final byte STRINGULAR = 2; + public static final byte NUMERIC_SET = 3; + public static final byte STRINGULAR_SET = 4; + + public static final String[] names = { "UNDEFINED", "NUMERIC", "STRINGULAR", "NUMERIC_SET", "STRINGULAR_SET", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/InputType.py b/libnd4j/include/graph/generated/nd4j/graph/InputType.py new file mode 100644 index 000000000..0be254efe --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/InputType.py @@ -0,0 +1,25 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +class InputType(object): + UNDEFINED = 0 + NUMERIC = 1 + STRINGULAR = 2 + NUMERIC_SET = 3 + STRINGULAR_SET = 4 + diff --git a/libnd4j/include/graph/generated/nd4j/graph/IntPair.cs b/libnd4j/include/graph/generated/nd4j/graph/IntPair.cs new file mode 100644 index 000000000..38dad82ed --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/IntPair.cs @@ -0,0 +1,42 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct IntPair : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static IntPair GetRootAsIntPair(ByteBuffer _bb) { return GetRootAsIntPair(_bb, new IntPair()); } + public static IntPair GetRootAsIntPair(ByteBuffer _bb, IntPair obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public IntPair __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int First { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } + public int Second { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } + + public static Offset CreateIntPair(FlatBufferBuilder builder, + int first = 0, + int second = 0) { + builder.StartObject(2); + IntPair.AddSecond(builder, second); + IntPair.AddFirst(builder, first); + return IntPair.EndIntPair(builder); + } + + public static void StartIntPair(FlatBufferBuilder builder) { builder.StartObject(2); } + public static void AddFirst(FlatBufferBuilder builder, int first) { builder.AddInt(0, first, 0); } + public static void AddSecond(FlatBufferBuilder builder, int second) { builder.AddInt(1, second, 0); } + public static Offset EndIntPair(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/IntPair.java b/libnd4j/include/graph/generated/nd4j/graph/IntPair.java new file mode 100644 index 000000000..c988143e6 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/IntPair.java @@ -0,0 +1,37 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class IntPair extends Table { + public static IntPair getRootAsIntPair(ByteBuffer _bb) { return getRootAsIntPair(_bb, new IntPair()); } + public static IntPair getRootAsIntPair(ByteBuffer _bb, IntPair obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public IntPair __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int first() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public int second() { int o = __offset(6); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + + public static int createIntPair(FlatBufferBuilder builder, + int first, + int second) { + builder.startObject(2); + IntPair.addSecond(builder, second); + IntPair.addFirst(builder, first); + return IntPair.endIntPair(builder); + } + + public static void startIntPair(FlatBufferBuilder builder) { builder.startObject(2); } + public static void addFirst(FlatBufferBuilder builder, int first) { builder.addInt(0, first, 0); } + public static void addSecond(FlatBufferBuilder builder, int second) { builder.addInt(1, second, 0); } + public static int endIntPair(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/IntPair.py b/libnd4j/include/graph/generated/nd4j/graph/IntPair.py new file mode 100644 index 000000000..0e402cfe5 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/IntPair.py @@ -0,0 +1,52 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class IntPair(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsIntPair(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = IntPair() + x.Init(buf, n + offset) + return x + + # IntPair + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # IntPair + def First(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + + # IntPair + def Second(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + +def IntPairStart(builder): builder.StartObject(2) +def IntPairAddFirst(builder, first): builder.PrependInt32Slot(0, first, 0) +def IntPairAddSecond(builder, second): builder.PrependInt32Slot(1, second, 0) +def IntPairEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/IntTriple.cs b/libnd4j/include/graph/generated/nd4j/graph/IntTriple.cs new file mode 100644 index 000000000..e1c5ac1a4 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/IntTriple.cs @@ -0,0 +1,46 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct IntTriple : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static IntTriple GetRootAsIntTriple(ByteBuffer _bb) { return GetRootAsIntTriple(_bb, new IntTriple()); } + public static IntTriple GetRootAsIntTriple(ByteBuffer _bb, IntTriple obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public IntTriple __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int First { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } + public int Second { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } + public int Third { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } + + public static Offset CreateIntTriple(FlatBufferBuilder builder, + int first = 0, + int second = 0, + int third = 0) { + builder.StartObject(3); + IntTriple.AddThird(builder, third); + IntTriple.AddSecond(builder, second); + IntTriple.AddFirst(builder, first); + return IntTriple.EndIntTriple(builder); + } + + public static void StartIntTriple(FlatBufferBuilder builder) { builder.StartObject(3); } + public static void AddFirst(FlatBufferBuilder builder, int first) { builder.AddInt(0, first, 0); } + public static void AddSecond(FlatBufferBuilder builder, int second) { builder.AddInt(1, second, 0); } + public static void AddThird(FlatBufferBuilder builder, int third) { builder.AddInt(2, third, 0); } + public static Offset EndIntTriple(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/IntTriple.java b/libnd4j/include/graph/generated/nd4j/graph/IntTriple.java new file mode 100644 index 000000000..8bc8961c8 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/IntTriple.java @@ -0,0 +1,41 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class IntTriple extends Table { + public static IntTriple getRootAsIntTriple(ByteBuffer _bb) { return getRootAsIntTriple(_bb, new IntTriple()); } + public static IntTriple getRootAsIntTriple(ByteBuffer _bb, IntTriple obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public IntTriple __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int first() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public int second() { int o = __offset(6); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public int third() { int o = __offset(8); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + + public static int createIntTriple(FlatBufferBuilder builder, + int first, + int second, + int third) { + builder.startObject(3); + IntTriple.addThird(builder, third); + IntTriple.addSecond(builder, second); + IntTriple.addFirst(builder, first); + return IntTriple.endIntTriple(builder); + } + + public static void startIntTriple(FlatBufferBuilder builder) { builder.startObject(3); } + public static void addFirst(FlatBufferBuilder builder, int first) { builder.addInt(0, first, 0); } + public static void addSecond(FlatBufferBuilder builder, int second) { builder.addInt(1, second, 0); } + public static void addThird(FlatBufferBuilder builder, int third) { builder.addInt(2, third, 0); } + public static int endIntTriple(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/IntTriple.py b/libnd4j/include/graph/generated/nd4j/graph/IntTriple.py new file mode 100644 index 000000000..387164f95 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/IntTriple.py @@ -0,0 +1,60 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class IntTriple(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsIntTriple(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = IntTriple() + x.Init(buf, n + offset) + return x + + # IntTriple + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # IntTriple + def First(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + + # IntTriple + def Second(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + + # IntTriple + def Third(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + +def IntTripleStart(builder): builder.StartObject(3) +def IntTripleAddFirst(builder, first): builder.PrependInt32Slot(0, first, 0) +def IntTripleAddSecond(builder, second): builder.PrependInt32Slot(1, second, 0) +def IntTripleAddThird(builder, third): builder.PrependInt32Slot(2, third, 0) +def IntTripleEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/LongPair.cs b/libnd4j/include/graph/generated/nd4j/graph/LongPair.cs new file mode 100644 index 000000000..b28c9bd0b --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/LongPair.cs @@ -0,0 +1,42 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct LongPair : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static LongPair GetRootAsLongPair(ByteBuffer _bb) { return GetRootAsLongPair(_bb, new LongPair()); } + public static LongPair GetRootAsLongPair(ByteBuffer _bb, LongPair obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public LongPair __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long First { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + public long Second { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + + public static Offset CreateLongPair(FlatBufferBuilder builder, + long first = 0, + long second = 0) { + builder.StartObject(2); + LongPair.AddSecond(builder, second); + LongPair.AddFirst(builder, first); + return LongPair.EndLongPair(builder); + } + + public static void StartLongPair(FlatBufferBuilder builder) { builder.StartObject(2); } + public static void AddFirst(FlatBufferBuilder builder, long first) { builder.AddLong(0, first, 0); } + public static void AddSecond(FlatBufferBuilder builder, long second) { builder.AddLong(1, second, 0); } + public static Offset EndLongPair(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/LongPair.java b/libnd4j/include/graph/generated/nd4j/graph/LongPair.java new file mode 100644 index 000000000..e17c019f6 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/LongPair.java @@ -0,0 +1,37 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class LongPair extends Table { + public static LongPair getRootAsLongPair(ByteBuffer _bb) { return getRootAsLongPair(_bb, new LongPair()); } + public static LongPair getRootAsLongPair(ByteBuffer _bb, LongPair obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public LongPair __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long first() { int o = __offset(4); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public long second() { int o = __offset(6); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + + public static int createLongPair(FlatBufferBuilder builder, + long first, + long second) { + builder.startObject(2); + LongPair.addSecond(builder, second); + LongPair.addFirst(builder, first); + return LongPair.endLongPair(builder); + } + + public static void startLongPair(FlatBufferBuilder builder) { builder.startObject(2); } + public static void addFirst(FlatBufferBuilder builder, long first) { builder.addLong(0, first, 0L); } + public static void addSecond(FlatBufferBuilder builder, long second) { builder.addLong(1, second, 0L); } + public static int endLongPair(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/LongPair.py b/libnd4j/include/graph/generated/nd4j/graph/LongPair.py new file mode 100644 index 000000000..8163865d5 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/LongPair.py @@ -0,0 +1,52 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class LongPair(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsLongPair(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = LongPair() + x.Init(buf, n + offset) + return x + + # LongPair + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # LongPair + def First(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + + # LongPair + def Second(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + +def LongPairStart(builder): builder.StartObject(2) +def LongPairAddFirst(builder, first): builder.PrependInt64Slot(0, first, 0) +def LongPairAddSecond(builder, second): builder.PrependInt64Slot(1, second, 0) +def LongPairEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/LongTriple.cs b/libnd4j/include/graph/generated/nd4j/graph/LongTriple.cs new file mode 100644 index 000000000..dc49143c3 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/LongTriple.cs @@ -0,0 +1,46 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct LongTriple : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static LongTriple GetRootAsLongTriple(ByteBuffer _bb) { return GetRootAsLongTriple(_bb, new LongTriple()); } + public static LongTriple GetRootAsLongTriple(ByteBuffer _bb, LongTriple obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public LongTriple __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long First { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + public long Second { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + public long Third { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + + public static Offset CreateLongTriple(FlatBufferBuilder builder, + long first = 0, + long second = 0, + long third = 0) { + builder.StartObject(3); + LongTriple.AddThird(builder, third); + LongTriple.AddSecond(builder, second); + LongTriple.AddFirst(builder, first); + return LongTriple.EndLongTriple(builder); + } + + public static void StartLongTriple(FlatBufferBuilder builder) { builder.StartObject(3); } + public static void AddFirst(FlatBufferBuilder builder, long first) { builder.AddLong(0, first, 0); } + public static void AddSecond(FlatBufferBuilder builder, long second) { builder.AddLong(1, second, 0); } + public static void AddThird(FlatBufferBuilder builder, long third) { builder.AddLong(2, third, 0); } + public static Offset EndLongTriple(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/LongTriple.java b/libnd4j/include/graph/generated/nd4j/graph/LongTriple.java new file mode 100644 index 000000000..c35e27f4c --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/LongTriple.java @@ -0,0 +1,41 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class LongTriple extends Table { + public static LongTriple getRootAsLongTriple(ByteBuffer _bb) { return getRootAsLongTriple(_bb, new LongTriple()); } + public static LongTriple getRootAsLongTriple(ByteBuffer _bb, LongTriple obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public LongTriple __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long first() { int o = __offset(4); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public long second() { int o = __offset(6); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public long third() { int o = __offset(8); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + + public static int createLongTriple(FlatBufferBuilder builder, + long first, + long second, + long third) { + builder.startObject(3); + LongTriple.addThird(builder, third); + LongTriple.addSecond(builder, second); + LongTriple.addFirst(builder, first); + return LongTriple.endLongTriple(builder); + } + + public static void startLongTriple(FlatBufferBuilder builder) { builder.startObject(3); } + public static void addFirst(FlatBufferBuilder builder, long first) { builder.addLong(0, first, 0L); } + public static void addSecond(FlatBufferBuilder builder, long second) { builder.addLong(1, second, 0L); } + public static void addThird(FlatBufferBuilder builder, long third) { builder.addLong(2, third, 0L); } + public static int endLongTriple(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/LongTriple.py b/libnd4j/include/graph/generated/nd4j/graph/LongTriple.py new file mode 100644 index 000000000..18261a9cc --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/LongTriple.py @@ -0,0 +1,60 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class LongTriple(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsLongTriple(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = LongTriple() + x.Init(buf, n + offset) + return x + + # LongTriple + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # LongTriple + def First(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + + # LongTriple + def Second(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + + # LongTriple + def Third(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + +def LongTripleStart(builder): builder.StartObject(3) +def LongTripleAddFirst(builder, first): builder.PrependInt64Slot(0, first, 0) +def LongTripleAddSecond(builder, second): builder.PrependInt64Slot(1, second, 0) +def LongTripleAddThird(builder, third): builder.PrependInt64Slot(2, third, 0) +def LongTripleEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/OpClass.cs b/libnd4j/include/graph/generated/nd4j/graph/OpClass.cs new file mode 100644 index 000000000..45ac68a3a --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/OpClass.cs @@ -0,0 +1,19 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +public enum OpClass : sbyte +{ + TRANSFORM = 0, + REDUCTION = 1, + MULTIPLICATOR = 2, + GRAPH = 3, + CONDITIONAL = 4, + LOOP = 5, +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/OpClass.java b/libnd4j/include/graph/generated/nd4j/graph/OpClass.java new file mode 100644 index 000000000..996009041 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/OpClass.java @@ -0,0 +1,18 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +public final class OpClass { + private OpClass() { } + public static final byte TRANSFORM = 0; + public static final byte REDUCTION = 1; + public static final byte MULTIPLICATOR = 2; + public static final byte GRAPH = 3; + public static final byte CONDITIONAL = 4; + public static final byte LOOP = 5; + + public static final String[] names = { "TRANSFORM", "REDUCTION", "MULTIPLICATOR", "GRAPH", "CONDITIONAL", "LOOP", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/OpClass.py b/libnd4j/include/graph/generated/nd4j/graph/OpClass.py new file mode 100644 index 000000000..7556a5209 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/OpClass.py @@ -0,0 +1,26 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +class OpClass(object): + TRANSFORM = 0 + REDUCTION = 1 + MULTIPLICATOR = 2 + GRAPH = 3 + CONDITIONAL = 4 + LOOP = 5 + diff --git a/libnd4j/include/graph/generated/nd4j/graph/OpType.cs b/libnd4j/include/graph/generated/nd4j/graph/OpType.cs new file mode 100644 index 000000000..2b9d27bce --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/OpType.cs @@ -0,0 +1,39 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +public enum OpType : sbyte +{ + TRANSFORM_FLOAT = 0, + TRANSFORM_SAME = 1, + TRANSFORM_BOOL = 2, + TRANSFORM_STRICT = 3, + TRANSFORM_ANY = 4, + REDUCE_FLOAT = 5, + REDUCE_SAME = 6, + REDUCE_LONG = 7, + REDUCE_BOOL = 8, + INDEX_REDUCE = 9, + SCALAR = 10, + SCALAR_BOOL = 11, + BROADCAST = 12, + BROADCAST_BOOL = 13, + PAIRWISE = 14, + PAIRWISE_BOOL = 15, + REDUCE_3 = 16, + SUMMARYSTATS = 17, + SHAPE = 18, + AGGREGATION = 19, + RANDOM = 20, + CUSTOM = 21, + GRAPH = 22, + VARIABLE = 40, + BOOLEAN = 60, + LOGIC = 119, +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/OpType.java b/libnd4j/include/graph/generated/nd4j/graph/OpType.java new file mode 100644 index 000000000..bac8509d8 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/OpType.java @@ -0,0 +1,38 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +public final class OpType { + private OpType() { } + public static final byte TRANSFORM_FLOAT = 0; + public static final byte TRANSFORM_SAME = 1; + public static final byte TRANSFORM_BOOL = 2; + public static final byte TRANSFORM_STRICT = 3; + public static final byte TRANSFORM_ANY = 4; + public static final byte REDUCE_FLOAT = 5; + public static final byte REDUCE_SAME = 6; + public static final byte REDUCE_LONG = 7; + public static final byte REDUCE_BOOL = 8; + public static final byte INDEX_REDUCE = 9; + public static final byte SCALAR = 10; + public static final byte SCALAR_BOOL = 11; + public static final byte BROADCAST = 12; + public static final byte BROADCAST_BOOL = 13; + public static final byte PAIRWISE = 14; + public static final byte PAIRWISE_BOOL = 15; + public static final byte REDUCE_3 = 16; + public static final byte SUMMARYSTATS = 17; + public static final byte SHAPE = 18; + public static final byte AGGREGATION = 19; + public static final byte RANDOM = 20; + public static final byte CUSTOM = 21; + public static final byte GRAPH = 22; + public static final byte VARIABLE = 40; + public static final byte BOOLEAN = 60; + public static final byte LOGIC = 119; + + public static final String[] names = { "TRANSFORM_FLOAT", "TRANSFORM_SAME", "TRANSFORM_BOOL", "TRANSFORM_STRICT", "TRANSFORM_ANY", "REDUCE_FLOAT", "REDUCE_SAME", "REDUCE_LONG", "REDUCE_BOOL", "INDEX_REDUCE", "SCALAR", "SCALAR_BOOL", "BROADCAST", "BROADCAST_BOOL", "PAIRWISE", "PAIRWISE_BOOL", "REDUCE_3", "SUMMARYSTATS", "SHAPE", "AGGREGATION", "RANDOM", "CUSTOM", "GRAPH", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "VARIABLE", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "BOOLEAN", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "LOGIC", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/OpType.py b/libnd4j/include/graph/generated/nd4j/graph/OpType.py new file mode 100644 index 000000000..dba740a45 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/OpType.py @@ -0,0 +1,46 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +class OpType(object): + TRANSFORM_FLOAT = 0 + TRANSFORM_SAME = 1 + TRANSFORM_BOOL = 2 + TRANSFORM_STRICT = 3 + TRANSFORM_ANY = 4 + REDUCE_FLOAT = 5 + REDUCE_SAME = 6 + REDUCE_LONG = 7 + REDUCE_BOOL = 8 + INDEX_REDUCE = 9 + SCALAR = 10 + SCALAR_BOOL = 11 + BROADCAST = 12 + BROADCAST_BOOL = 13 + PAIRWISE = 14 + PAIRWISE_BOOL = 15 + REDUCE_3 = 16 + SUMMARYSTATS = 17 + SHAPE = 18 + AGGREGATION = 19 + RANDOM = 20 + CUSTOM = 21 + GRAPH = 22 + VARIABLE = 40 + BOOLEAN = 60 + LOGIC = 119 + diff --git a/libnd4j/include/graph/generated/nd4j/graph/OutputMode.cs b/libnd4j/include/graph/generated/nd4j/graph/OutputMode.cs new file mode 100644 index 000000000..4cd916dbe --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/OutputMode.cs @@ -0,0 +1,18 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +public enum OutputMode : sbyte +{ + IMPLICIT = 0, + EXPLICIT = 1, + EXPLICIT_AND_IMPLICIT = 2, + VARIABLE_SPACE = 3, + OPTIMIZED = 4, +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/OutputMode.java b/libnd4j/include/graph/generated/nd4j/graph/OutputMode.java new file mode 100644 index 000000000..9413825e2 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/OutputMode.java @@ -0,0 +1,17 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +public final class OutputMode { + private OutputMode() { } + public static final byte IMPLICIT = 0; + public static final byte EXPLICIT = 1; + public static final byte EXPLICIT_AND_IMPLICIT = 2; + public static final byte VARIABLE_SPACE = 3; + public static final byte OPTIMIZED = 4; + + public static final String[] names = { "IMPLICIT", "EXPLICIT", "EXPLICIT_AND_IMPLICIT", "VARIABLE_SPACE", "OPTIMIZED", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/OutputMode.py b/libnd4j/include/graph/generated/nd4j/graph/OutputMode.py new file mode 100644 index 000000000..9fc133956 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/OutputMode.py @@ -0,0 +1,25 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +class OutputMode(object): + IMPLICIT = 0 + EXPLICIT = 1 + EXPLICIT_AND_IMPLICIT = 2 + VARIABLE_SPACE = 3 + OPTIMIZED = 4 + diff --git a/libnd4j/include/graph/generated/nd4j/graph/ProfilingMode.cs b/libnd4j/include/graph/generated/nd4j/graph/ProfilingMode.cs new file mode 100644 index 000000000..1d9b90ca3 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/ProfilingMode.cs @@ -0,0 +1,17 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +public enum ProfilingMode : sbyte +{ + NONE = 0, + NAN_PANIC = 1, + INF_PANIC = 2, + ANY_PANIC = 3, +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/ProfilingMode.java b/libnd4j/include/graph/generated/nd4j/graph/ProfilingMode.java new file mode 100644 index 000000000..34e3e320f --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/ProfilingMode.java @@ -0,0 +1,16 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +public final class ProfilingMode { + private ProfilingMode() { } + public static final byte NONE = 0; + public static final byte NAN_PANIC = 1; + public static final byte INF_PANIC = 2; + public static final byte ANY_PANIC = 3; + + public static final String[] names = { "NONE", "NAN_PANIC", "INF_PANIC", "ANY_PANIC", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/ProfilingMode.py b/libnd4j/include/graph/generated/nd4j/graph/ProfilingMode.py new file mode 100644 index 000000000..bfa3bcab0 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/ProfilingMode.py @@ -0,0 +1,24 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +class ProfilingMode(object): + NONE = 0 + NAN_PANIC = 1 + INF_PANIC = 2 + ANY_PANIC = 3 + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIAddName.cs b/libnd4j/include/graph/generated/nd4j/graph/UIAddName.cs new file mode 100644 index 000000000..cc2f6fb85 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIAddName.cs @@ -0,0 +1,48 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct UIAddName : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static UIAddName GetRootAsUIAddName(ByteBuffer _bb) { return GetRootAsUIAddName(_bb, new UIAddName()); } + public static UIAddName GetRootAsUIAddName(ByteBuffer _bb, UIAddName obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public UIAddName __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int NameIdx { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } + public string Name { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetNameBytes() { return __p.__vector_as_span(6); } +#else + public ArraySegment? GetNameBytes() { return __p.__vector_as_arraysegment(6); } +#endif + public byte[] GetNameArray() { return __p.__vector_as_array(6); } + + public static Offset CreateUIAddName(FlatBufferBuilder builder, + int nameIdx = 0, + StringOffset nameOffset = default(StringOffset)) { + builder.StartObject(2); + UIAddName.AddName(builder, nameOffset); + UIAddName.AddNameIdx(builder, nameIdx); + return UIAddName.EndUIAddName(builder); + } + + public static void StartUIAddName(FlatBufferBuilder builder) { builder.StartObject(2); } + public static void AddNameIdx(FlatBufferBuilder builder, int nameIdx) { builder.AddInt(0, nameIdx, 0); } + public static void AddName(FlatBufferBuilder builder, StringOffset nameOffset) { builder.AddOffset(1, nameOffset.Value, 0); } + public static Offset EndUIAddName(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIAddName.java b/libnd4j/include/graph/generated/nd4j/graph/UIAddName.java new file mode 100644 index 000000000..9caf5f0d7 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIAddName.java @@ -0,0 +1,39 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class UIAddName extends Table { + public static UIAddName getRootAsUIAddName(ByteBuffer _bb) { return getRootAsUIAddName(_bb, new UIAddName()); } + public static UIAddName getRootAsUIAddName(ByteBuffer _bb, UIAddName obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public UIAddName __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int nameIdx() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public String name() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + + public static int createUIAddName(FlatBufferBuilder builder, + int nameIdx, + int nameOffset) { + builder.startObject(2); + UIAddName.addName(builder, nameOffset); + UIAddName.addNameIdx(builder, nameIdx); + return UIAddName.endUIAddName(builder); + } + + public static void startUIAddName(FlatBufferBuilder builder) { builder.startObject(2); } + public static void addNameIdx(FlatBufferBuilder builder, int nameIdx) { builder.addInt(0, nameIdx, 0); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(1, nameOffset, 0); } + public static int endUIAddName(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIAddName.py b/libnd4j/include/graph/generated/nd4j/graph/UIAddName.py new file mode 100644 index 000000000..3b8be72d7 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIAddName.py @@ -0,0 +1,52 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class UIAddName(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsUIAddName(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = UIAddName() + x.Init(buf, n + offset) + return x + + # UIAddName + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # UIAddName + def NameIdx(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + + # UIAddName + def Name(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + +def UIAddNameStart(builder): builder.StartObject(2) +def UIAddNameAddNameIdx(builder, nameIdx): builder.PrependInt32Slot(0, nameIdx, 0) +def UIAddNameAddName(builder, name): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) +def UIAddNameEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIEvent.cs b/libnd4j/include/graph/generated/nd4j/graph/UIEvent.cs new file mode 100644 index 000000000..a8775d67d --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIEvent.cs @@ -0,0 +1,70 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct UIEvent : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static UIEvent GetRootAsUIEvent(ByteBuffer _bb) { return GetRootAsUIEvent(_bb, new UIEvent()); } + public static UIEvent GetRootAsUIEvent(ByteBuffer _bb, UIEvent obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public UIEvent __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public UIEventType EventType { get { int o = __p.__offset(4); return o != 0 ? (UIEventType)__p.bb.GetSbyte(o + __p.bb_pos) : UIEventType.ADD_NAME; } } + public UIEventSubtype EventSubType { get { int o = __p.__offset(6); return o != 0 ? (UIEventSubtype)__p.bb.GetSbyte(o + __p.bb_pos) : UIEventSubtype.NONE; } } + public int NameIdx { get { int o = __p.__offset(8); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } + public long Timestamp { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + public int Iteration { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } + public int Epoch { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } + public short VariableId { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetShort(o + __p.bb_pos) : (short)0; } } + public FrameIteration? FrameIter { get { int o = __p.__offset(18); return o != 0 ? (FrameIteration?)(new FrameIteration()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } + public ushort Plugin { get { int o = __p.__offset(20); return o != 0 ? __p.bb.GetUshort(o + __p.bb_pos) : (ushort)0; } } + + public static Offset CreateUIEvent(FlatBufferBuilder builder, + UIEventType eventType = UIEventType.ADD_NAME, + UIEventSubtype eventSubType = UIEventSubtype.NONE, + int nameIdx = 0, + long timestamp = 0, + int iteration = 0, + int epoch = 0, + short variableId = 0, + Offset frameIterOffset = default(Offset), + ushort plugin = 0) { + builder.StartObject(9); + UIEvent.AddTimestamp(builder, timestamp); + UIEvent.AddFrameIter(builder, frameIterOffset); + UIEvent.AddEpoch(builder, epoch); + UIEvent.AddIteration(builder, iteration); + UIEvent.AddNameIdx(builder, nameIdx); + UIEvent.AddPlugin(builder, plugin); + UIEvent.AddVariableId(builder, variableId); + UIEvent.AddEventSubType(builder, eventSubType); + UIEvent.AddEventType(builder, eventType); + return UIEvent.EndUIEvent(builder); + } + + public static void StartUIEvent(FlatBufferBuilder builder) { builder.StartObject(9); } + public static void AddEventType(FlatBufferBuilder builder, UIEventType eventType) { builder.AddSbyte(0, (sbyte)eventType, 0); } + public static void AddEventSubType(FlatBufferBuilder builder, UIEventSubtype eventSubType) { builder.AddSbyte(1, (sbyte)eventSubType, 0); } + public static void AddNameIdx(FlatBufferBuilder builder, int nameIdx) { builder.AddInt(2, nameIdx, 0); } + public static void AddTimestamp(FlatBufferBuilder builder, long timestamp) { builder.AddLong(3, timestamp, 0); } + public static void AddIteration(FlatBufferBuilder builder, int iteration) { builder.AddInt(4, iteration, 0); } + public static void AddEpoch(FlatBufferBuilder builder, int epoch) { builder.AddInt(5, epoch, 0); } + public static void AddVariableId(FlatBufferBuilder builder, short variableId) { builder.AddShort(6, variableId, 0); } + public static void AddFrameIter(FlatBufferBuilder builder, Offset frameIterOffset) { builder.AddOffset(7, frameIterOffset.Value, 0); } + public static void AddPlugin(FlatBufferBuilder builder, ushort plugin) { builder.AddUshort(8, plugin, 0); } + public static Offset EndUIEvent(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIEvent.java b/libnd4j/include/graph/generated/nd4j/graph/UIEvent.java new file mode 100644 index 000000000..e586e8967 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIEvent.java @@ -0,0 +1,66 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class UIEvent extends Table { + public static UIEvent getRootAsUIEvent(ByteBuffer _bb) { return getRootAsUIEvent(_bb, new UIEvent()); } + public static UIEvent getRootAsUIEvent(ByteBuffer _bb, UIEvent obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public UIEvent __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public byte eventType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; } + public byte eventSubType() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; } + public int nameIdx() { int o = __offset(8); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public long timestamp() { int o = __offset(10); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public int iteration() { int o = __offset(12); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public int epoch() { int o = __offset(14); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + public short variableId() { int o = __offset(16); return o != 0 ? bb.getShort(o + bb_pos) : 0; } + public FrameIteration frameIter() { return frameIter(new FrameIteration()); } + public FrameIteration frameIter(FrameIteration obj) { int o = __offset(18); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public int plugin() { int o = __offset(20); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } + + public static int createUIEvent(FlatBufferBuilder builder, + byte eventType, + byte eventSubType, + int nameIdx, + long timestamp, + int iteration, + int epoch, + short variableId, + int frameIterOffset, + int plugin) { + builder.startObject(9); + UIEvent.addTimestamp(builder, timestamp); + UIEvent.addFrameIter(builder, frameIterOffset); + UIEvent.addEpoch(builder, epoch); + UIEvent.addIteration(builder, iteration); + UIEvent.addNameIdx(builder, nameIdx); + UIEvent.addPlugin(builder, plugin); + UIEvent.addVariableId(builder, variableId); + UIEvent.addEventSubType(builder, eventSubType); + UIEvent.addEventType(builder, eventType); + return UIEvent.endUIEvent(builder); + } + + public static void startUIEvent(FlatBufferBuilder builder) { builder.startObject(9); } + public static void addEventType(FlatBufferBuilder builder, byte eventType) { builder.addByte(0, eventType, 0); } + public static void addEventSubType(FlatBufferBuilder builder, byte eventSubType) { builder.addByte(1, eventSubType, 0); } + public static void addNameIdx(FlatBufferBuilder builder, int nameIdx) { builder.addInt(2, nameIdx, 0); } + public static void addTimestamp(FlatBufferBuilder builder, long timestamp) { builder.addLong(3, timestamp, 0L); } + public static void addIteration(FlatBufferBuilder builder, int iteration) { builder.addInt(4, iteration, 0); } + public static void addEpoch(FlatBufferBuilder builder, int epoch) { builder.addInt(5, epoch, 0); } + public static void addVariableId(FlatBufferBuilder builder, short variableId) { builder.addShort(6, variableId, 0); } + public static void addFrameIter(FlatBufferBuilder builder, int frameIterOffset) { builder.addOffset(7, frameIterOffset, 0); } + public static void addPlugin(FlatBufferBuilder builder, int plugin) { builder.addShort(8, (short)plugin, (short)0); } + public static int endUIEvent(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIEvent.py b/libnd4j/include/graph/generated/nd4j/graph/UIEvent.py new file mode 100644 index 000000000..f52bdf6cf --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIEvent.py @@ -0,0 +1,112 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class UIEvent(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsUIEvent(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = UIEvent() + x.Init(buf, n + offset) + return x + + # UIEvent + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # UIEvent + def EventType(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) + return 0 + + # UIEvent + def EventSubType(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) + return 0 + + # UIEvent + def NameIdx(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + + # UIEvent + def Timestamp(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + + # UIEvent + def Iteration(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + + # UIEvent + def Epoch(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + + # UIEvent + def VariableId(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int16Flags, o + self._tab.Pos) + return 0 + + # UIEvent + def FrameIter(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) + if o != 0: + x = self._tab.Indirect(o + self._tab.Pos) + from .FrameIteration import FrameIteration + obj = FrameIteration() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # UIEvent + def Plugin(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Uint16Flags, o + self._tab.Pos) + return 0 + +def UIEventStart(builder): builder.StartObject(9) +def UIEventAddEventType(builder, eventType): builder.PrependInt8Slot(0, eventType, 0) +def UIEventAddEventSubType(builder, eventSubType): builder.PrependInt8Slot(1, eventSubType, 0) +def UIEventAddNameIdx(builder, nameIdx): builder.PrependInt32Slot(2, nameIdx, 0) +def UIEventAddTimestamp(builder, timestamp): builder.PrependInt64Slot(3, timestamp, 0) +def UIEventAddIteration(builder, iteration): builder.PrependInt32Slot(4, iteration, 0) +def UIEventAddEpoch(builder, epoch): builder.PrependInt32Slot(5, epoch, 0) +def UIEventAddVariableId(builder, variableId): builder.PrependInt16Slot(6, variableId, 0) +def UIEventAddFrameIter(builder, frameIter): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(frameIter), 0) +def UIEventAddPlugin(builder, plugin): builder.PrependUint16Slot(8, plugin, 0) +def UIEventEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIEventSubtype.cs b/libnd4j/include/graph/generated/nd4j/graph/UIEventSubtype.cs new file mode 100644 index 000000000..d4da48a25 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIEventSubtype.cs @@ -0,0 +1,23 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +public enum UIEventSubtype : sbyte +{ + NONE = 0, + EVALUATION = 1, + LOSS = 2, + LEARNING_RATE = 3, + TUNING_METRIC = 4, + PERFORMANCE = 5, + PROFILING = 6, + FEATURE_LABEL = 7, + PREDICTION = 8, + USER_CUSTOM = 9, +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIEventSubtype.java b/libnd4j/include/graph/generated/nd4j/graph/UIEventSubtype.java new file mode 100644 index 000000000..98a9c5951 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIEventSubtype.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +public final class UIEventSubtype { + private UIEventSubtype() { } + public static final byte NONE = 0; + public static final byte EVALUATION = 1; + public static final byte LOSS = 2; + public static final byte LEARNING_RATE = 3; + public static final byte TUNING_METRIC = 4; + public static final byte PERFORMANCE = 5; + public static final byte PROFILING = 6; + public static final byte FEATURE_LABEL = 7; + public static final byte PREDICTION = 8; + public static final byte USER_CUSTOM = 9; + + public static final String[] names = { "NONE", "EVALUATION", "LOSS", "LEARNING_RATE", "TUNING_METRIC", "PERFORMANCE", "PROFILING", "FEATURE_LABEL", "PREDICTION", "USER_CUSTOM", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIEventSubtype.py b/libnd4j/include/graph/generated/nd4j/graph/UIEventSubtype.py new file mode 100644 index 000000000..b1f6e9c79 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIEventSubtype.py @@ -0,0 +1,30 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +class UIEventSubtype(object): + NONE = 0 + EVALUATION = 1 + LOSS = 2 + LEARNING_RATE = 3 + TUNING_METRIC = 4 + PERFORMANCE = 5 + PROFILING = 6 + FEATURE_LABEL = 7 + PREDICTION = 8 + USER_CUSTOM = 9 + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIEventType.cs b/libnd4j/include/graph/generated/nd4j/graph/UIEventType.cs new file mode 100644 index 000000000..32427dac2 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIEventType.cs @@ -0,0 +1,22 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +public enum UIEventType : sbyte +{ + ADD_NAME = 0, + SCALAR = 1, + ARRAY = 2, + ARRAY_LIST = 3, + HISTOGRAM = 4, + IMAGE = 5, + SUMMARY_STATISTICS = 6, + OP_TIMING = 7, + HARDWARE_STATE = 8, +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIEventType.java b/libnd4j/include/graph/generated/nd4j/graph/UIEventType.java new file mode 100644 index 000000000..0c5f38c2b --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIEventType.java @@ -0,0 +1,21 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +public final class UIEventType { + private UIEventType() { } + public static final byte ADD_NAME = 0; + public static final byte SCALAR = 1; + public static final byte ARRAY = 2; + public static final byte ARRAY_LIST = 3; + public static final byte HISTOGRAM = 4; + public static final byte IMAGE = 5; + public static final byte SUMMARY_STATISTICS = 6; + public static final byte OP_TIMING = 7; + public static final byte HARDWARE_STATE = 8; + + public static final String[] names = { "ADD_NAME", "SCALAR", "ARRAY", "ARRAY_LIST", "HISTOGRAM", "IMAGE", "SUMMARY_STATISTICS", "OP_TIMING", "HARDWARE_STATE", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIEventType.py b/libnd4j/include/graph/generated/nd4j/graph/UIEventType.py new file mode 100644 index 000000000..63a665a09 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIEventType.py @@ -0,0 +1,29 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +class UIEventType(object): + ADD_NAME = 0 + SCALAR = 1 + ARRAY = 2 + ARRAY_LIST = 3 + HISTOGRAM = 4 + IMAGE = 5 + SUMMARY_STATISTICS = 6 + OP_TIMING = 7 + HARDWARE_STATE = 8 + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIGraphStructure.cs b/libnd4j/include/graph/generated/nd4j/graph/UIGraphStructure.cs new file mode 100644 index 000000000..ad8e16ab9 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIGraphStructure.cs @@ -0,0 +1,74 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct UIGraphStructure : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static UIGraphStructure GetRootAsUIGraphStructure(ByteBuffer _bb) { return GetRootAsUIGraphStructure(_bb, new UIGraphStructure()); } + public static UIGraphStructure GetRootAsUIGraphStructure(ByteBuffer _bb, UIGraphStructure obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public UIGraphStructure __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public string Inputs(int j) { int o = __p.__offset(4); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int InputsLength { get { int o = __p.__offset(4); return o != 0 ? __p.__vector_len(o) : 0; } } + public IntPair? InputsPair(int j) { int o = __p.__offset(6); return o != 0 ? (IntPair?)(new IntPair()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } + public int InputsPairLength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } } + public string Outputs(int j) { int o = __p.__offset(8); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int OutputsLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } } + public UIVariable? Variables(int j) { int o = __p.__offset(10); return o != 0 ? (UIVariable?)(new UIVariable()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } + public int VariablesLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } } + public UIOp? Ops(int j) { int o = __p.__offset(12); return o != 0 ? (UIOp?)(new UIOp()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } + public int OpsLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } } + + public static Offset CreateUIGraphStructure(FlatBufferBuilder builder, + VectorOffset inputsOffset = default(VectorOffset), + VectorOffset inputsPairOffset = default(VectorOffset), + VectorOffset outputsOffset = default(VectorOffset), + VectorOffset variablesOffset = default(VectorOffset), + VectorOffset opsOffset = default(VectorOffset)) { + builder.StartObject(5); + UIGraphStructure.AddOps(builder, opsOffset); + UIGraphStructure.AddVariables(builder, variablesOffset); + UIGraphStructure.AddOutputs(builder, outputsOffset); + UIGraphStructure.AddInputsPair(builder, inputsPairOffset); + UIGraphStructure.AddInputs(builder, inputsOffset); + return UIGraphStructure.EndUIGraphStructure(builder); + } + + public static void StartUIGraphStructure(FlatBufferBuilder builder) { builder.StartObject(5); } + public static void AddInputs(FlatBufferBuilder builder, VectorOffset inputsOffset) { builder.AddOffset(0, inputsOffset.Value, 0); } + public static VectorOffset CreateInputsVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateInputsVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartInputsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddInputsPair(FlatBufferBuilder builder, VectorOffset inputsPairOffset) { builder.AddOffset(1, inputsPairOffset.Value, 0); } + public static VectorOffset CreateInputsPairVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateInputsPairVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartInputsPairVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddOutputs(FlatBufferBuilder builder, VectorOffset outputsOffset) { builder.AddOffset(2, outputsOffset.Value, 0); } + public static VectorOffset CreateOutputsVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateOutputsVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartOutputsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddVariables(FlatBufferBuilder builder, VectorOffset variablesOffset) { builder.AddOffset(3, variablesOffset.Value, 0); } + public static VectorOffset CreateVariablesVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateVariablesVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartVariablesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddOps(FlatBufferBuilder builder, VectorOffset opsOffset) { builder.AddOffset(4, opsOffset.Value, 0); } + public static VectorOffset CreateOpsVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateOpsVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartOpsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static Offset EndUIGraphStructure(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIGraphStructure.java b/libnd4j/include/graph/generated/nd4j/graph/UIGraphStructure.java new file mode 100644 index 000000000..65ff2d58b --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIGraphStructure.java @@ -0,0 +1,67 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class UIGraphStructure extends Table { + public static UIGraphStructure getRootAsUIGraphStructure(ByteBuffer _bb) { return getRootAsUIGraphStructure(_bb, new UIGraphStructure()); } + public static UIGraphStructure getRootAsUIGraphStructure(ByteBuffer _bb, UIGraphStructure obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public UIGraphStructure __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String inputs(int j) { int o = __offset(4); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int inputsLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public IntPair inputsPair(int j) { return inputsPair(new IntPair(), j); } + public IntPair inputsPair(IntPair obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int inputsPairLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public String outputs(int j) { int o = __offset(8); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int outputsLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } + public UIVariable variables(int j) { return variables(new UIVariable(), j); } + public UIVariable variables(UIVariable obj, int j) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int variablesLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } + public UIOp ops(int j) { return ops(new UIOp(), j); } + public UIOp ops(UIOp obj, int j) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int opsLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; } + + public static int createUIGraphStructure(FlatBufferBuilder builder, + int inputsOffset, + int inputsPairOffset, + int outputsOffset, + int variablesOffset, + int opsOffset) { + builder.startObject(5); + UIGraphStructure.addOps(builder, opsOffset); + UIGraphStructure.addVariables(builder, variablesOffset); + UIGraphStructure.addOutputs(builder, outputsOffset); + UIGraphStructure.addInputsPair(builder, inputsPairOffset); + UIGraphStructure.addInputs(builder, inputsOffset); + return UIGraphStructure.endUIGraphStructure(builder); + } + + public static void startUIGraphStructure(FlatBufferBuilder builder) { builder.startObject(5); } + public static void addInputs(FlatBufferBuilder builder, int inputsOffset) { builder.addOffset(0, inputsOffset, 0); } + public static int createInputsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startInputsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addInputsPair(FlatBufferBuilder builder, int inputsPairOffset) { builder.addOffset(1, inputsPairOffset, 0); } + public static int createInputsPairVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startInputsPairVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addOutputs(FlatBufferBuilder builder, int outputsOffset) { builder.addOffset(2, outputsOffset, 0); } + public static int createOutputsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startOutputsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addVariables(FlatBufferBuilder builder, int variablesOffset) { builder.addOffset(3, variablesOffset, 0); } + public static int createVariablesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startVariablesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addOps(FlatBufferBuilder builder, int opsOffset) { builder.addOffset(4, opsOffset, 0); } + public static int createOpsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startOpsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endUIGraphStructure(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIGraphStructure.py b/libnd4j/include/graph/generated/nd4j/graph/UIGraphStructure.py new file mode 100644 index 000000000..b7cf79edf --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIGraphStructure.py @@ -0,0 +1,136 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class UIGraphStructure(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsUIGraphStructure(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = UIGraphStructure() + x.Init(buf, n + offset) + return x + + # UIGraphStructure + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # UIGraphStructure + def Inputs(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # UIGraphStructure + def InputsLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # UIGraphStructure + def InputsPair(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + x = self._tab.Vector(o) + x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 + x = self._tab.Indirect(x) + from .IntPair import IntPair + obj = IntPair() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # UIGraphStructure + def InputsPairLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # UIGraphStructure + def Outputs(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # UIGraphStructure + def OutputsLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # UIGraphStructure + def Variables(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + x = self._tab.Vector(o) + x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 + x = self._tab.Indirect(x) + from .UIVariable import UIVariable + obj = UIVariable() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # UIGraphStructure + def VariablesLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # UIGraphStructure + def Ops(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + x = self._tab.Vector(o) + x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 + x = self._tab.Indirect(x) + from .UIOp import UIOp + obj = UIOp() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # UIGraphStructure + def OpsLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + +def UIGraphStructureStart(builder): builder.StartObject(5) +def UIGraphStructureAddInputs(builder, inputs): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(inputs), 0) +def UIGraphStructureStartInputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def UIGraphStructureAddInputsPair(builder, inputsPair): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(inputsPair), 0) +def UIGraphStructureStartInputsPairVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def UIGraphStructureAddOutputs(builder, outputs): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(outputs), 0) +def UIGraphStructureStartOutputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def UIGraphStructureAddVariables(builder, variables): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(variables), 0) +def UIGraphStructureStartVariablesVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def UIGraphStructureAddOps(builder, ops): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(ops), 0) +def UIGraphStructureStartOpsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def UIGraphStructureEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIHardwareState.cs b/libnd4j/include/graph/generated/nd4j/graph/UIHardwareState.cs new file mode 100644 index 000000000..a3444a2ea --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIHardwareState.cs @@ -0,0 +1,52 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct UIHardwareState : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static UIHardwareState GetRootAsUIHardwareState(ByteBuffer _bb) { return GetRootAsUIHardwareState(_bb, new UIHardwareState()); } + public static UIHardwareState GetRootAsUIHardwareState(ByteBuffer _bb, UIHardwareState obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public UIHardwareState __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long GpuMemory(int j) { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } + public int GpuMemoryLength { get { int o = __p.__offset(4); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetGpuMemoryBytes() { return __p.__vector_as_span(4); } +#else + public ArraySegment? GetGpuMemoryBytes() { return __p.__vector_as_arraysegment(4); } +#endif + public long[] GetGpuMemoryArray() { return __p.__vector_as_array(4); } + public long HostMemory { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + + public static Offset CreateUIHardwareState(FlatBufferBuilder builder, + VectorOffset gpuMemoryOffset = default(VectorOffset), + long hostMemory = 0) { + builder.StartObject(2); + UIHardwareState.AddHostMemory(builder, hostMemory); + UIHardwareState.AddGpuMemory(builder, gpuMemoryOffset); + return UIHardwareState.EndUIHardwareState(builder); + } + + public static void StartUIHardwareState(FlatBufferBuilder builder) { builder.StartObject(2); } + public static void AddGpuMemory(FlatBufferBuilder builder, VectorOffset gpuMemoryOffset) { builder.AddOffset(0, gpuMemoryOffset.Value, 0); } + public static VectorOffset CreateGpuMemoryVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); } + public static VectorOffset CreateGpuMemoryVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } + public static void StartGpuMemoryVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } + public static void AddHostMemory(FlatBufferBuilder builder, long hostMemory) { builder.AddLong(1, hostMemory, 0); } + public static Offset EndUIHardwareState(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIHardwareState.java b/libnd4j/include/graph/generated/nd4j/graph/UIHardwareState.java new file mode 100644 index 000000000..469f6357d --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIHardwareState.java @@ -0,0 +1,42 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class UIHardwareState extends Table { + public static UIHardwareState getRootAsUIHardwareState(ByteBuffer _bb) { return getRootAsUIHardwareState(_bb, new UIHardwareState()); } + public static UIHardwareState getRootAsUIHardwareState(ByteBuffer _bb, UIHardwareState obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public UIHardwareState __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long gpuMemory(int j) { int o = __offset(4); return o != 0 ? bb.getLong(__vector(o) + j * 8) : 0; } + public int gpuMemoryLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer gpuMemoryAsByteBuffer() { return __vector_as_bytebuffer(4, 8); } + public ByteBuffer gpuMemoryInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 8); } + public long hostMemory() { int o = __offset(6); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + + public static int createUIHardwareState(FlatBufferBuilder builder, + int gpuMemoryOffset, + long hostMemory) { + builder.startObject(2); + UIHardwareState.addHostMemory(builder, hostMemory); + UIHardwareState.addGpuMemory(builder, gpuMemoryOffset); + return UIHardwareState.endUIHardwareState(builder); + } + + public static void startUIHardwareState(FlatBufferBuilder builder) { builder.startObject(2); } + public static void addGpuMemory(FlatBufferBuilder builder, int gpuMemoryOffset) { builder.addOffset(0, gpuMemoryOffset, 0); } + public static int createGpuMemoryVector(FlatBufferBuilder builder, long[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addLong(data[i]); return builder.endVector(); } + public static void startGpuMemoryVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); } + public static void addHostMemory(FlatBufferBuilder builder, long hostMemory) { builder.addLong(1, hostMemory, 0L); } + public static int endUIHardwareState(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIHardwareState.py b/libnd4j/include/graph/generated/nd4j/graph/UIHardwareState.py new file mode 100644 index 000000000..82d20a520 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIHardwareState.py @@ -0,0 +1,68 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class UIHardwareState(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsUIHardwareState(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = UIHardwareState() + x.Init(buf, n + offset) + return x + + # UIHardwareState + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # UIHardwareState + def GpuMemory(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) + return 0 + + # UIHardwareState + def GpuMemoryAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) + return 0 + + # UIHardwareState + def GpuMemoryLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # UIHardwareState + def HostMemory(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + +def UIHardwareStateStart(builder): builder.StartObject(2) +def UIHardwareStateAddGpuMemory(builder, gpuMemory): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(gpuMemory), 0) +def UIHardwareStateStartGpuMemoryVector(builder, numElems): return builder.StartVector(8, numElems, 8) +def UIHardwareStateAddHostMemory(builder, hostMemory): builder.PrependInt64Slot(1, hostMemory, 0) +def UIHardwareStateEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIHistogram.cs b/libnd4j/include/graph/generated/nd4j/graph/UIHistogram.cs new file mode 100644 index 000000000..1801bef68 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIHistogram.cs @@ -0,0 +1,58 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct UIHistogram : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static UIHistogram GetRootAsUIHistogram(ByteBuffer _bb) { return GetRootAsUIHistogram(_bb, new UIHistogram()); } + public static UIHistogram GetRootAsUIHistogram(ByteBuffer _bb, UIHistogram obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public UIHistogram __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public UIHistogramType Type { get { int o = __p.__offset(4); return o != 0 ? (UIHistogramType)__p.bb.GetSbyte(o + __p.bb_pos) : UIHistogramType.DISCRETE; } } + public uint Numbins { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } + public FlatArray? Binranges { get { int o = __p.__offset(8); return o != 0 ? (FlatArray?)(new FlatArray()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } + public FlatArray? Y { get { int o = __p.__offset(10); return o != 0 ? (FlatArray?)(new FlatArray()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } + public string Binlabels(int j) { int o = __p.__offset(12); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int BinlabelsLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } } + + public static Offset CreateUIHistogram(FlatBufferBuilder builder, + UIHistogramType type = UIHistogramType.DISCRETE, + uint numbins = 0, + Offset binrangesOffset = default(Offset), + Offset yOffset = default(Offset), + VectorOffset binlabelsOffset = default(VectorOffset)) { + builder.StartObject(5); + UIHistogram.AddBinlabels(builder, binlabelsOffset); + UIHistogram.AddY(builder, yOffset); + UIHistogram.AddBinranges(builder, binrangesOffset); + UIHistogram.AddNumbins(builder, numbins); + UIHistogram.AddType(builder, type); + return UIHistogram.EndUIHistogram(builder); + } + + public static void StartUIHistogram(FlatBufferBuilder builder) { builder.StartObject(5); } + public static void AddType(FlatBufferBuilder builder, UIHistogramType type) { builder.AddSbyte(0, (sbyte)type, 0); } + public static void AddNumbins(FlatBufferBuilder builder, uint numbins) { builder.AddUint(1, numbins, 0); } + public static void AddBinranges(FlatBufferBuilder builder, Offset binrangesOffset) { builder.AddOffset(2, binrangesOffset.Value, 0); } + public static void AddY(FlatBufferBuilder builder, Offset yOffset) { builder.AddOffset(3, yOffset.Value, 0); } + public static void AddBinlabels(FlatBufferBuilder builder, VectorOffset binlabelsOffset) { builder.AddOffset(4, binlabelsOffset.Value, 0); } + public static VectorOffset CreateBinlabelsVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateBinlabelsVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartBinlabelsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static Offset EndUIHistogram(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIHistogram.java b/libnd4j/include/graph/generated/nd4j/graph/UIHistogram.java new file mode 100644 index 000000000..eea513be4 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIHistogram.java @@ -0,0 +1,54 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class UIHistogram extends Table { + public static UIHistogram getRootAsUIHistogram(ByteBuffer _bb) { return getRootAsUIHistogram(_bb, new UIHistogram()); } + public static UIHistogram getRootAsUIHistogram(ByteBuffer _bb, UIHistogram obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public UIHistogram __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public byte type() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; } + public long numbins() { int o = __offset(6); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + public FlatArray binranges() { return binranges(new FlatArray()); } + public FlatArray binranges(FlatArray obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public FlatArray y() { return y(new FlatArray()); } + public FlatArray y(FlatArray obj) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public String binlabels(int j) { int o = __offset(12); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int binlabelsLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; } + + public static int createUIHistogram(FlatBufferBuilder builder, + byte type, + long numbins, + int binrangesOffset, + int yOffset, + int binlabelsOffset) { + builder.startObject(5); + UIHistogram.addBinlabels(builder, binlabelsOffset); + UIHistogram.addY(builder, yOffset); + UIHistogram.addBinranges(builder, binrangesOffset); + UIHistogram.addNumbins(builder, numbins); + UIHistogram.addType(builder, type); + return UIHistogram.endUIHistogram(builder); + } + + public static void startUIHistogram(FlatBufferBuilder builder) { builder.startObject(5); } + public static void addType(FlatBufferBuilder builder, byte type) { builder.addByte(0, type, 0); } + public static void addNumbins(FlatBufferBuilder builder, long numbins) { builder.addInt(1, (int)numbins, (int)0L); } + public static void addBinranges(FlatBufferBuilder builder, int binrangesOffset) { builder.addOffset(2, binrangesOffset, 0); } + public static void addY(FlatBufferBuilder builder, int yOffset) { builder.addOffset(3, yOffset, 0); } + public static void addBinlabels(FlatBufferBuilder builder, int binlabelsOffset) { builder.addOffset(4, binlabelsOffset, 0); } + public static int createBinlabelsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startBinlabelsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endUIHistogram(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIHistogram.py b/libnd4j/include/graph/generated/nd4j/graph/UIHistogram.py new file mode 100644 index 000000000..12a626396 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIHistogram.py @@ -0,0 +1,93 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class UIHistogram(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsUIHistogram(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = UIHistogram() + x.Init(buf, n + offset) + return x + + # UIHistogram + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # UIHistogram + def Type(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) + return 0 + + # UIHistogram + def Numbins(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) + return 0 + + # UIHistogram + def Binranges(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + x = self._tab.Indirect(o + self._tab.Pos) + from .FlatArray import FlatArray + obj = FlatArray() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # UIHistogram + def Y(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + x = self._tab.Indirect(o + self._tab.Pos) + from .FlatArray import FlatArray + obj = FlatArray() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # UIHistogram + def Binlabels(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # UIHistogram + def BinlabelsLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + +def UIHistogramStart(builder): builder.StartObject(5) +def UIHistogramAddType(builder, type): builder.PrependInt8Slot(0, type, 0) +def UIHistogramAddNumbins(builder, numbins): builder.PrependUint32Slot(1, numbins, 0) +def UIHistogramAddBinranges(builder, binranges): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(binranges), 0) +def UIHistogramAddY(builder, y): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(y), 0) +def UIHistogramAddBinlabels(builder, binlabels): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(binlabels), 0) +def UIHistogramStartBinlabelsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def UIHistogramEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIHistogramType.cs b/libnd4j/include/graph/generated/nd4j/graph/UIHistogramType.cs new file mode 100644 index 000000000..3b8c3218b --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIHistogramType.cs @@ -0,0 +1,16 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +public enum UIHistogramType : sbyte +{ + DISCRETE = 0, + EQUAL_SPACING = 1, + CUSTOM = 2, +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIHistogramType.java b/libnd4j/include/graph/generated/nd4j/graph/UIHistogramType.java new file mode 100644 index 000000000..eed543ca5 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIHistogramType.java @@ -0,0 +1,15 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +public final class UIHistogramType { + private UIHistogramType() { } + public static final byte DISCRETE = 0; + public static final byte EQUAL_SPACING = 1; + public static final byte CUSTOM = 2; + + public static final String[] names = { "DISCRETE", "EQUAL_SPACING", "CUSTOM", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIHistogramType.py b/libnd4j/include/graph/generated/nd4j/graph/UIHistogramType.py new file mode 100644 index 000000000..751e9aa21 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIHistogramType.py @@ -0,0 +1,23 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +class UIHistogramType(object): + DISCRETE = 0 + EQUAL_SPACING = 1 + CUSTOM = 2 + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIInfoType.cs b/libnd4j/include/graph/generated/nd4j/graph/UIInfoType.cs new file mode 100644 index 000000000..676d60530 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIInfoType.cs @@ -0,0 +1,16 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +public enum UIInfoType : sbyte +{ + GRAPH_STRUCTURE = 0, + SYTEM_INFO = 1, + START_EVENTS = 2, +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIInfoType.java b/libnd4j/include/graph/generated/nd4j/graph/UIInfoType.java new file mode 100644 index 000000000..a2792912c --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIInfoType.java @@ -0,0 +1,15 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +public final class UIInfoType { + private UIInfoType() { } + public static final byte GRAPH_STRUCTURE = 0; + public static final byte SYTEM_INFO = 1; + public static final byte START_EVENTS = 2; + + public static final String[] names = { "GRAPH_STRUCTURE", "SYTEM_INFO", "START_EVENTS", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIInfoType.py b/libnd4j/include/graph/generated/nd4j/graph/UIInfoType.py new file mode 100644 index 000000000..ce2541de7 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIInfoType.py @@ -0,0 +1,23 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +class UIInfoType(object): + GRAPH_STRUCTURE = 0 + SYTEM_INFO = 1 + START_EVENTS = 2 + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIOp.cs b/libnd4j/include/graph/generated/nd4j/graph/UIOp.cs new file mode 100644 index 000000000..f8b3b4fbd --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIOp.cs @@ -0,0 +1,88 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct UIOp : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static UIOp GetRootAsUIOp(ByteBuffer _bb) { return GetRootAsUIOp(_bb, new UIOp()); } + public static UIOp GetRootAsUIOp(ByteBuffer _bb, UIOp obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public UIOp __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public string Name { get { int o = __p.__offset(4); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetNameBytes() { return __p.__vector_as_span(4); } +#else + public ArraySegment? GetNameBytes() { return __p.__vector_as_arraysegment(4); } +#endif + public byte[] GetNameArray() { return __p.__vector_as_array(4); } + public string OpName { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetOpNameBytes() { return __p.__vector_as_span(6); } +#else + public ArraySegment? GetOpNameBytes() { return __p.__vector_as_arraysegment(6); } +#endif + public byte[] GetOpNameArray() { return __p.__vector_as_array(6); } + public string Inputs(int j) { int o = __p.__offset(8); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int InputsLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } } + public string Outputs(int j) { int o = __p.__offset(10); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int OutputsLength { get { int o = __p.__offset(10); return o != 0 ? __p.__vector_len(o) : 0; } } + public string ControlDeps(int j) { int o = __p.__offset(12); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int ControlDepsLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } } + public string UiLabelExtra { get { int o = __p.__offset(14); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetUiLabelExtraBytes() { return __p.__vector_as_span(14); } +#else + public ArraySegment? GetUiLabelExtraBytes() { return __p.__vector_as_arraysegment(14); } +#endif + public byte[] GetUiLabelExtraArray() { return __p.__vector_as_array(14); } + + public static Offset CreateUIOp(FlatBufferBuilder builder, + StringOffset nameOffset = default(StringOffset), + StringOffset opNameOffset = default(StringOffset), + VectorOffset inputsOffset = default(VectorOffset), + VectorOffset outputsOffset = default(VectorOffset), + VectorOffset controlDepsOffset = default(VectorOffset), + StringOffset uiLabelExtraOffset = default(StringOffset)) { + builder.StartObject(6); + UIOp.AddUiLabelExtra(builder, uiLabelExtraOffset); + UIOp.AddControlDeps(builder, controlDepsOffset); + UIOp.AddOutputs(builder, outputsOffset); + UIOp.AddInputs(builder, inputsOffset); + UIOp.AddOpName(builder, opNameOffset); + UIOp.AddName(builder, nameOffset); + return UIOp.EndUIOp(builder); + } + + public static void StartUIOp(FlatBufferBuilder builder) { builder.StartObject(6); } + public static void AddName(FlatBufferBuilder builder, StringOffset nameOffset) { builder.AddOffset(0, nameOffset.Value, 0); } + public static void AddOpName(FlatBufferBuilder builder, StringOffset opNameOffset) { builder.AddOffset(1, opNameOffset.Value, 0); } + public static void AddInputs(FlatBufferBuilder builder, VectorOffset inputsOffset) { builder.AddOffset(2, inputsOffset.Value, 0); } + public static VectorOffset CreateInputsVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateInputsVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartInputsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddOutputs(FlatBufferBuilder builder, VectorOffset outputsOffset) { builder.AddOffset(3, outputsOffset.Value, 0); } + public static VectorOffset CreateOutputsVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateOutputsVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartOutputsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddControlDeps(FlatBufferBuilder builder, VectorOffset controlDepsOffset) { builder.AddOffset(4, controlDepsOffset.Value, 0); } + public static VectorOffset CreateControlDepsVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateControlDepsVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartControlDepsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddUiLabelExtra(FlatBufferBuilder builder, StringOffset uiLabelExtraOffset) { builder.AddOffset(5, uiLabelExtraOffset.Value, 0); } + public static Offset EndUIOp(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIOp.java b/libnd4j/include/graph/generated/nd4j/graph/UIOp.java new file mode 100644 index 000000000..5ca33cda5 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIOp.java @@ -0,0 +1,68 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class UIOp extends Table { + public static UIOp getRootAsUIOp(ByteBuffer _bb) { return getRootAsUIOp(_bb, new UIOp()); } + public static UIOp getRootAsUIOp(ByteBuffer _bb, UIOp obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public UIOp __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public String opName() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer opNameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer opNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + public String inputs(int j) { int o = __offset(8); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int inputsLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } + public String outputs(int j) { int o = __offset(10); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int outputsLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } + public String controlDeps(int j) { int o = __offset(12); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int controlDepsLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; } + public String uiLabelExtra() { int o = __offset(14); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer uiLabelExtraAsByteBuffer() { return __vector_as_bytebuffer(14, 1); } + public ByteBuffer uiLabelExtraInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 14, 1); } + + public static int createUIOp(FlatBufferBuilder builder, + int nameOffset, + int opNameOffset, + int inputsOffset, + int outputsOffset, + int controlDepsOffset, + int uiLabelExtraOffset) { + builder.startObject(6); + UIOp.addUiLabelExtra(builder, uiLabelExtraOffset); + UIOp.addControlDeps(builder, controlDepsOffset); + UIOp.addOutputs(builder, outputsOffset); + UIOp.addInputs(builder, inputsOffset); + UIOp.addOpName(builder, opNameOffset); + UIOp.addName(builder, nameOffset); + return UIOp.endUIOp(builder); + } + + public static void startUIOp(FlatBufferBuilder builder) { builder.startObject(6); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); } + public static void addOpName(FlatBufferBuilder builder, int opNameOffset) { builder.addOffset(1, opNameOffset, 0); } + public static void addInputs(FlatBufferBuilder builder, int inputsOffset) { builder.addOffset(2, inputsOffset, 0); } + public static int createInputsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startInputsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addOutputs(FlatBufferBuilder builder, int outputsOffset) { builder.addOffset(3, outputsOffset, 0); } + public static int createOutputsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startOutputsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addControlDeps(FlatBufferBuilder builder, int controlDepsOffset) { builder.addOffset(4, controlDepsOffset, 0); } + public static int createControlDepsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startControlDepsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addUiLabelExtra(FlatBufferBuilder builder, int uiLabelExtraOffset) { builder.addOffset(5, uiLabelExtraOffset, 0); } + public static int endUIOp(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIOp.py b/libnd4j/include/graph/generated/nd4j/graph/UIOp.py new file mode 100644 index 000000000..843441d2d --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIOp.py @@ -0,0 +1,111 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class UIOp(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsUIOp(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = UIOp() + x.Init(buf, n + offset) + return x + + # UIOp + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # UIOp + def Name(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + + # UIOp + def OpName(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + + # UIOp + def Inputs(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # UIOp + def InputsLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # UIOp + def Outputs(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # UIOp + def OutputsLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # UIOp + def ControlDeps(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # UIOp + def ControlDepsLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # UIOp + def UiLabelExtra(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + +def UIOpStart(builder): builder.StartObject(6) +def UIOpAddName(builder, name): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) +def UIOpAddOpName(builder, opName): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(opName), 0) +def UIOpAddInputs(builder, inputs): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(inputs), 0) +def UIOpStartInputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def UIOpAddOutputs(builder, outputs): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(outputs), 0) +def UIOpStartOutputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def UIOpAddControlDeps(builder, controlDeps): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(controlDeps), 0) +def UIOpStartControlDepsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def UIOpAddUiLabelExtra(builder, uiLabelExtra): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(uiLabelExtra), 0) +def UIOpEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIStaticInfoRecord.cs b/libnd4j/include/graph/generated/nd4j/graph/UIStaticInfoRecord.cs new file mode 100644 index 000000000..410a3c37b --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIStaticInfoRecord.cs @@ -0,0 +1,38 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct UIStaticInfoRecord : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static UIStaticInfoRecord GetRootAsUIStaticInfoRecord(ByteBuffer _bb) { return GetRootAsUIStaticInfoRecord(_bb, new UIStaticInfoRecord()); } + public static UIStaticInfoRecord GetRootAsUIStaticInfoRecord(ByteBuffer _bb, UIStaticInfoRecord obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public UIStaticInfoRecord __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public UIInfoType InfoType { get { int o = __p.__offset(4); return o != 0 ? (UIInfoType)__p.bb.GetSbyte(o + __p.bb_pos) : UIInfoType.GRAPH_STRUCTURE; } } + + public static Offset CreateUIStaticInfoRecord(FlatBufferBuilder builder, + UIInfoType infoType = UIInfoType.GRAPH_STRUCTURE) { + builder.StartObject(1); + UIStaticInfoRecord.AddInfoType(builder, infoType); + return UIStaticInfoRecord.EndUIStaticInfoRecord(builder); + } + + public static void StartUIStaticInfoRecord(FlatBufferBuilder builder) { builder.StartObject(1); } + public static void AddInfoType(FlatBufferBuilder builder, UIInfoType infoType) { builder.AddSbyte(0, (sbyte)infoType, 0); } + public static Offset EndUIStaticInfoRecord(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIStaticInfoRecord.java b/libnd4j/include/graph/generated/nd4j/graph/UIStaticInfoRecord.java new file mode 100644 index 000000000..45dc5a961 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIStaticInfoRecord.java @@ -0,0 +1,33 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class UIStaticInfoRecord extends Table { + public static UIStaticInfoRecord getRootAsUIStaticInfoRecord(ByteBuffer _bb) { return getRootAsUIStaticInfoRecord(_bb, new UIStaticInfoRecord()); } + public static UIStaticInfoRecord getRootAsUIStaticInfoRecord(ByteBuffer _bb, UIStaticInfoRecord obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public UIStaticInfoRecord __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public byte infoType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; } + + public static int createUIStaticInfoRecord(FlatBufferBuilder builder, + byte infoType) { + builder.startObject(1); + UIStaticInfoRecord.addInfoType(builder, infoType); + return UIStaticInfoRecord.endUIStaticInfoRecord(builder); + } + + public static void startUIStaticInfoRecord(FlatBufferBuilder builder) { builder.startObject(1); } + public static void addInfoType(FlatBufferBuilder builder, byte infoType) { builder.addByte(0, infoType, 0); } + public static int endUIStaticInfoRecord(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIStaticInfoRecord.py b/libnd4j/include/graph/generated/nd4j/graph/UIStaticInfoRecord.py new file mode 100644 index 000000000..4b0fceead --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIStaticInfoRecord.py @@ -0,0 +1,44 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class UIStaticInfoRecord(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsUIStaticInfoRecord(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = UIStaticInfoRecord() + x.Init(buf, n + offset) + return x + + # UIStaticInfoRecord + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # UIStaticInfoRecord + def InfoType(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) + return 0 + +def UIStaticInfoRecordStart(builder): builder.StartObject(1) +def UIStaticInfoRecordAddInfoType(builder, infoType): builder.PrependInt8Slot(0, infoType, 0) +def UIStaticInfoRecordEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/UISummaryStatistics.cs b/libnd4j/include/graph/generated/nd4j/graph/UISummaryStatistics.cs new file mode 100644 index 000000000..0f63d2d7c --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UISummaryStatistics.cs @@ -0,0 +1,74 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct UISummaryStatistics : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static UISummaryStatistics GetRootAsUISummaryStatistics(ByteBuffer _bb) { return GetRootAsUISummaryStatistics(_bb, new UISummaryStatistics()); } + public static UISummaryStatistics GetRootAsUISummaryStatistics(ByteBuffer _bb, UISummaryStatistics obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public UISummaryStatistics __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public uint Bitmask { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } } + public FlatArray? Min { get { int o = __p.__offset(6); return o != 0 ? (FlatArray?)(new FlatArray()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } + public FlatArray? Max { get { int o = __p.__offset(8); return o != 0 ? (FlatArray?)(new FlatArray()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } + public double Mean { get { int o = __p.__offset(10); return o != 0 ? __p.bb.GetDouble(o + __p.bb_pos) : (double)0.0; } } + public double Stdev { get { int o = __p.__offset(12); return o != 0 ? __p.bb.GetDouble(o + __p.bb_pos) : (double)0.0; } } + public long Countzero { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + public long Countpositive { get { int o = __p.__offset(16); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + public long Countnegative { get { int o = __p.__offset(18); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + public long Countnan { get { int o = __p.__offset(20); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + public long Countinf { get { int o = __p.__offset(22); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } } + + public static Offset CreateUISummaryStatistics(FlatBufferBuilder builder, + uint bitmask = 0, + Offset minOffset = default(Offset), + Offset maxOffset = default(Offset), + double mean = 0.0, + double stdev = 0.0, + long countzero = 0, + long countpositive = 0, + long countnegative = 0, + long countnan = 0, + long countinf = 0) { + builder.StartObject(10); + UISummaryStatistics.AddCountinf(builder, countinf); + UISummaryStatistics.AddCountnan(builder, countnan); + UISummaryStatistics.AddCountnegative(builder, countnegative); + UISummaryStatistics.AddCountpositive(builder, countpositive); + UISummaryStatistics.AddCountzero(builder, countzero); + UISummaryStatistics.AddStdev(builder, stdev); + UISummaryStatistics.AddMean(builder, mean); + UISummaryStatistics.AddMax(builder, maxOffset); + UISummaryStatistics.AddMin(builder, minOffset); + UISummaryStatistics.AddBitmask(builder, bitmask); + return UISummaryStatistics.EndUISummaryStatistics(builder); + } + + public static void StartUISummaryStatistics(FlatBufferBuilder builder) { builder.StartObject(10); } + public static void AddBitmask(FlatBufferBuilder builder, uint bitmask) { builder.AddUint(0, bitmask, 0); } + public static void AddMin(FlatBufferBuilder builder, Offset minOffset) { builder.AddOffset(1, minOffset.Value, 0); } + public static void AddMax(FlatBufferBuilder builder, Offset maxOffset) { builder.AddOffset(2, maxOffset.Value, 0); } + public static void AddMean(FlatBufferBuilder builder, double mean) { builder.AddDouble(3, mean, 0.0); } + public static void AddStdev(FlatBufferBuilder builder, double stdev) { builder.AddDouble(4, stdev, 0.0); } + public static void AddCountzero(FlatBufferBuilder builder, long countzero) { builder.AddLong(5, countzero, 0); } + public static void AddCountpositive(FlatBufferBuilder builder, long countpositive) { builder.AddLong(6, countpositive, 0); } + public static void AddCountnegative(FlatBufferBuilder builder, long countnegative) { builder.AddLong(7, countnegative, 0); } + public static void AddCountnan(FlatBufferBuilder builder, long countnan) { builder.AddLong(8, countnan, 0); } + public static void AddCountinf(FlatBufferBuilder builder, long countinf) { builder.AddLong(9, countinf, 0); } + public static Offset EndUISummaryStatistics(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/UISummaryStatistics.java b/libnd4j/include/graph/generated/nd4j/graph/UISummaryStatistics.java new file mode 100644 index 000000000..ddc9d776a --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UISummaryStatistics.java @@ -0,0 +1,71 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class UISummaryStatistics extends Table { + public static UISummaryStatistics getRootAsUISummaryStatistics(ByteBuffer _bb) { return getRootAsUISummaryStatistics(_bb, new UISummaryStatistics()); } + public static UISummaryStatistics getRootAsUISummaryStatistics(ByteBuffer _bb, UISummaryStatistics obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public UISummaryStatistics __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long bitmask() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + public FlatArray min() { return min(new FlatArray()); } + public FlatArray min(FlatArray obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public FlatArray max() { return max(new FlatArray()); } + public FlatArray max(FlatArray obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public double mean() { int o = __offset(10); return o != 0 ? bb.getDouble(o + bb_pos) : 0.0; } + public double stdev() { int o = __offset(12); return o != 0 ? bb.getDouble(o + bb_pos) : 0.0; } + public long countzero() { int o = __offset(14); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public long countpositive() { int o = __offset(16); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public long countnegative() { int o = __offset(18); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public long countnan() { int o = __offset(20); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public long countinf() { int o = __offset(22); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + + public static int createUISummaryStatistics(FlatBufferBuilder builder, + long bitmask, + int minOffset, + int maxOffset, + double mean, + double stdev, + long countzero, + long countpositive, + long countnegative, + long countnan, + long countinf) { + builder.startObject(10); + UISummaryStatistics.addCountinf(builder, countinf); + UISummaryStatistics.addCountnan(builder, countnan); + UISummaryStatistics.addCountnegative(builder, countnegative); + UISummaryStatistics.addCountpositive(builder, countpositive); + UISummaryStatistics.addCountzero(builder, countzero); + UISummaryStatistics.addStdev(builder, stdev); + UISummaryStatistics.addMean(builder, mean); + UISummaryStatistics.addMax(builder, maxOffset); + UISummaryStatistics.addMin(builder, minOffset); + UISummaryStatistics.addBitmask(builder, bitmask); + return UISummaryStatistics.endUISummaryStatistics(builder); + } + + public static void startUISummaryStatistics(FlatBufferBuilder builder) { builder.startObject(10); } + public static void addBitmask(FlatBufferBuilder builder, long bitmask) { builder.addInt(0, (int)bitmask, (int)0L); } + public static void addMin(FlatBufferBuilder builder, int minOffset) { builder.addOffset(1, minOffset, 0); } + public static void addMax(FlatBufferBuilder builder, int maxOffset) { builder.addOffset(2, maxOffset, 0); } + public static void addMean(FlatBufferBuilder builder, double mean) { builder.addDouble(3, mean, 0.0); } + public static void addStdev(FlatBufferBuilder builder, double stdev) { builder.addDouble(4, stdev, 0.0); } + public static void addCountzero(FlatBufferBuilder builder, long countzero) { builder.addLong(5, countzero, 0L); } + public static void addCountpositive(FlatBufferBuilder builder, long countpositive) { builder.addLong(6, countpositive, 0L); } + public static void addCountnegative(FlatBufferBuilder builder, long countnegative) { builder.addLong(7, countnegative, 0L); } + public static void addCountnan(FlatBufferBuilder builder, long countnan) { builder.addLong(8, countnan, 0L); } + public static void addCountinf(FlatBufferBuilder builder, long countinf) { builder.addLong(9, countinf, 0L); } + public static int endUISummaryStatistics(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UISummaryStatistics.py b/libnd4j/include/graph/generated/nd4j/graph/UISummaryStatistics.py new file mode 100644 index 000000000..a4511829a --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UISummaryStatistics.py @@ -0,0 +1,124 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class UISummaryStatistics(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsUISummaryStatistics(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = UISummaryStatistics() + x.Init(buf, n + offset) + return x + + # UISummaryStatistics + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # UISummaryStatistics + def Bitmask(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) + return 0 + + # UISummaryStatistics + def Min(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + x = self._tab.Indirect(o + self._tab.Pos) + from .FlatArray import FlatArray + obj = FlatArray() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # UISummaryStatistics + def Max(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + x = self._tab.Indirect(o + self._tab.Pos) + from .FlatArray import FlatArray + obj = FlatArray() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # UISummaryStatistics + def Mean(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos) + return 0.0 + + # UISummaryStatistics + def Stdev(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Float64Flags, o + self._tab.Pos) + return 0.0 + + # UISummaryStatistics + def Countzero(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + + # UISummaryStatistics + def Countpositive(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + + # UISummaryStatistics + def Countnegative(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + + # UISummaryStatistics + def Countnan(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + + # UISummaryStatistics + def Countinf(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int64Flags, o + self._tab.Pos) + return 0 + +def UISummaryStatisticsStart(builder): builder.StartObject(10) +def UISummaryStatisticsAddBitmask(builder, bitmask): builder.PrependUint32Slot(0, bitmask, 0) +def UISummaryStatisticsAddMin(builder, min): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(min), 0) +def UISummaryStatisticsAddMax(builder, max): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(max), 0) +def UISummaryStatisticsAddMean(builder, mean): builder.PrependFloat64Slot(3, mean, 0.0) +def UISummaryStatisticsAddStdev(builder, stdev): builder.PrependFloat64Slot(4, stdev, 0.0) +def UISummaryStatisticsAddCountzero(builder, countzero): builder.PrependInt64Slot(5, countzero, 0) +def UISummaryStatisticsAddCountpositive(builder, countpositive): builder.PrependInt64Slot(6, countpositive, 0) +def UISummaryStatisticsAddCountnegative(builder, countnegative): builder.PrependInt64Slot(7, countnegative, 0) +def UISummaryStatisticsAddCountnan(builder, countnan): builder.PrependInt64Slot(8, countnan, 0) +def UISummaryStatisticsAddCountinf(builder, countinf): builder.PrependInt64Slot(9, countinf, 0) +def UISummaryStatisticsEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/UISystemInfo.cs b/libnd4j/include/graph/generated/nd4j/graph/UISystemInfo.cs new file mode 100644 index 000000000..6adbcf98e --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UISystemInfo.cs @@ -0,0 +1,38 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct UISystemInfo : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static UISystemInfo GetRootAsUISystemInfo(ByteBuffer _bb) { return GetRootAsUISystemInfo(_bb, new UISystemInfo()); } + public static UISystemInfo GetRootAsUISystemInfo(ByteBuffer _bb, UISystemInfo obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public UISystemInfo __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int PhysicalCores { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } } + + public static Offset CreateUISystemInfo(FlatBufferBuilder builder, + int physicalCores = 0) { + builder.StartObject(1); + UISystemInfo.AddPhysicalCores(builder, physicalCores); + return UISystemInfo.EndUISystemInfo(builder); + } + + public static void StartUISystemInfo(FlatBufferBuilder builder) { builder.StartObject(1); } + public static void AddPhysicalCores(FlatBufferBuilder builder, int physicalCores) { builder.AddInt(0, physicalCores, 0); } + public static Offset EndUISystemInfo(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/UISystemInfo.java b/libnd4j/include/graph/generated/nd4j/graph/UISystemInfo.java new file mode 100644 index 000000000..4ff62ab98 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UISystemInfo.java @@ -0,0 +1,33 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class UISystemInfo extends Table { + public static UISystemInfo getRootAsUISystemInfo(ByteBuffer _bb) { return getRootAsUISystemInfo(_bb, new UISystemInfo()); } + public static UISystemInfo getRootAsUISystemInfo(ByteBuffer _bb, UISystemInfo obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public UISystemInfo __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int physicalCores() { int o = __offset(4); return o != 0 ? bb.getInt(o + bb_pos) : 0; } + + public static int createUISystemInfo(FlatBufferBuilder builder, + int physicalCores) { + builder.startObject(1); + UISystemInfo.addPhysicalCores(builder, physicalCores); + return UISystemInfo.endUISystemInfo(builder); + } + + public static void startUISystemInfo(FlatBufferBuilder builder) { builder.startObject(1); } + public static void addPhysicalCores(FlatBufferBuilder builder, int physicalCores) { builder.addInt(0, physicalCores, 0); } + public static int endUISystemInfo(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UISystemInfo.py b/libnd4j/include/graph/generated/nd4j/graph/UISystemInfo.py new file mode 100644 index 000000000..dc920fc78 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UISystemInfo.py @@ -0,0 +1,44 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class UISystemInfo(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsUISystemInfo(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = UISystemInfo() + x.Init(buf, n + offset) + return x + + # UISystemInfo + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # UISystemInfo + def PhysicalCores(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos) + return 0 + +def UISystemInfoStart(builder): builder.StartObject(1) +def UISystemInfoAddPhysicalCores(builder, physicalCores): builder.PrependInt32Slot(0, physicalCores, 0) +def UISystemInfoEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIVariable.cs b/libnd4j/include/graph/generated/nd4j/graph/UIVariable.cs new file mode 100644 index 000000000..1f8d14971 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIVariable.cs @@ -0,0 +1,136 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct UIVariable : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static UIVariable GetRootAsUIVariable(ByteBuffer _bb) { return GetRootAsUIVariable(_bb, new UIVariable()); } + public static UIVariable GetRootAsUIVariable(ByteBuffer _bb, UIVariable obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public UIVariable __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public IntPair? Id { get { int o = __p.__offset(4); return o != 0 ? (IntPair?)(new IntPair()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } + public string Name { get { int o = __p.__offset(6); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetNameBytes() { return __p.__vector_as_span(6); } +#else + public ArraySegment? GetNameBytes() { return __p.__vector_as_arraysegment(6); } +#endif + public byte[] GetNameArray() { return __p.__vector_as_array(6); } + public VarType Type { get { int o = __p.__offset(8); return o != 0 ? (VarType)__p.bb.GetSbyte(o + __p.bb_pos) : VarType.VARIABLE; } } + public DType Datatype { get { int o = __p.__offset(10); return o != 0 ? (DType)__p.bb.GetSbyte(o + __p.bb_pos) : DType.INHERIT; } } + public long Shape(int j) { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; } + public int ShapeLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } } +#if ENABLE_SPAN_T + public Span GetShapeBytes() { return __p.__vector_as_span(12); } +#else + public ArraySegment? GetShapeBytes() { return __p.__vector_as_arraysegment(12); } +#endif + public long[] GetShapeArray() { return __p.__vector_as_array(12); } + public string ControlDeps(int j) { int o = __p.__offset(14); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int ControlDepsLength { get { int o = __p.__offset(14); return o != 0 ? __p.__vector_len(o) : 0; } } + public string OutputOfOp { get { int o = __p.__offset(16); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetOutputOfOpBytes() { return __p.__vector_as_span(16); } +#else + public ArraySegment? GetOutputOfOpBytes() { return __p.__vector_as_arraysegment(16); } +#endif + public byte[] GetOutputOfOpArray() { return __p.__vector_as_array(16); } + public string InputsForOp(int j) { int o = __p.__offset(18); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int InputsForOpLength { get { int o = __p.__offset(18); return o != 0 ? __p.__vector_len(o) : 0; } } + public string ControlDepsForOp(int j) { int o = __p.__offset(20); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int ControlDepsForOpLength { get { int o = __p.__offset(20); return o != 0 ? __p.__vector_len(o) : 0; } } + public string ControlDepsForVar(int j) { int o = __p.__offset(22); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int ControlDepsForVarLength { get { int o = __p.__offset(22); return o != 0 ? __p.__vector_len(o) : 0; } } + public string GradientVariable { get { int o = __p.__offset(24); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetGradientVariableBytes() { return __p.__vector_as_span(24); } +#else + public ArraySegment? GetGradientVariableBytes() { return __p.__vector_as_arraysegment(24); } +#endif + public byte[] GetGradientVariableArray() { return __p.__vector_as_array(24); } + public string UiLabelExtra { get { int o = __p.__offset(26); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetUiLabelExtraBytes() { return __p.__vector_as_span(26); } +#else + public ArraySegment? GetUiLabelExtraBytes() { return __p.__vector_as_arraysegment(26); } +#endif + public byte[] GetUiLabelExtraArray() { return __p.__vector_as_array(26); } + public FlatArray? ConstantValue { get { int o = __p.__offset(28); return o != 0 ? (FlatArray?)(new FlatArray()).__assign(__p.__indirect(o + __p.bb_pos), __p.bb) : null; } } + + public static Offset CreateUIVariable(FlatBufferBuilder builder, + Offset idOffset = default(Offset), + StringOffset nameOffset = default(StringOffset), + VarType type = VarType.VARIABLE, + DType datatype = DType.INHERIT, + VectorOffset shapeOffset = default(VectorOffset), + VectorOffset controlDepsOffset = default(VectorOffset), + StringOffset outputOfOpOffset = default(StringOffset), + VectorOffset inputsForOpOffset = default(VectorOffset), + VectorOffset controlDepsForOpOffset = default(VectorOffset), + VectorOffset controlDepsForVarOffset = default(VectorOffset), + StringOffset gradientVariableOffset = default(StringOffset), + StringOffset uiLabelExtraOffset = default(StringOffset), + Offset constantValueOffset = default(Offset)) { + builder.StartObject(13); + UIVariable.AddConstantValue(builder, constantValueOffset); + UIVariable.AddUiLabelExtra(builder, uiLabelExtraOffset); + UIVariable.AddGradientVariable(builder, gradientVariableOffset); + UIVariable.AddControlDepsForVar(builder, controlDepsForVarOffset); + UIVariable.AddControlDepsForOp(builder, controlDepsForOpOffset); + UIVariable.AddInputsForOp(builder, inputsForOpOffset); + UIVariable.AddOutputOfOp(builder, outputOfOpOffset); + UIVariable.AddControlDeps(builder, controlDepsOffset); + UIVariable.AddShape(builder, shapeOffset); + UIVariable.AddName(builder, nameOffset); + UIVariable.AddId(builder, idOffset); + UIVariable.AddDatatype(builder, datatype); + UIVariable.AddType(builder, type); + return UIVariable.EndUIVariable(builder); + } + + public static void StartUIVariable(FlatBufferBuilder builder) { builder.StartObject(13); } + public static void AddId(FlatBufferBuilder builder, Offset idOffset) { builder.AddOffset(0, idOffset.Value, 0); } + public static void AddName(FlatBufferBuilder builder, StringOffset nameOffset) { builder.AddOffset(1, nameOffset.Value, 0); } + public static void AddType(FlatBufferBuilder builder, VarType type) { builder.AddSbyte(2, (sbyte)type, 0); } + public static void AddDatatype(FlatBufferBuilder builder, DType datatype) { builder.AddSbyte(3, (sbyte)datatype, 0); } + public static void AddShape(FlatBufferBuilder builder, VectorOffset shapeOffset) { builder.AddOffset(4, shapeOffset.Value, 0); } + public static VectorOffset CreateShapeVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); } + public static VectorOffset CreateShapeVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); } + public static void StartShapeVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); } + public static void AddControlDeps(FlatBufferBuilder builder, VectorOffset controlDepsOffset) { builder.AddOffset(5, controlDepsOffset.Value, 0); } + public static VectorOffset CreateControlDepsVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateControlDepsVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartControlDepsVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddOutputOfOp(FlatBufferBuilder builder, StringOffset outputOfOpOffset) { builder.AddOffset(6, outputOfOpOffset.Value, 0); } + public static void AddInputsForOp(FlatBufferBuilder builder, VectorOffset inputsForOpOffset) { builder.AddOffset(7, inputsForOpOffset.Value, 0); } + public static VectorOffset CreateInputsForOpVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateInputsForOpVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartInputsForOpVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddControlDepsForOp(FlatBufferBuilder builder, VectorOffset controlDepsForOpOffset) { builder.AddOffset(8, controlDepsForOpOffset.Value, 0); } + public static VectorOffset CreateControlDepsForOpVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateControlDepsForOpVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartControlDepsForOpVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddControlDepsForVar(FlatBufferBuilder builder, VectorOffset controlDepsForVarOffset) { builder.AddOffset(9, controlDepsForVarOffset.Value, 0); } + public static VectorOffset CreateControlDepsForVarVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateControlDepsForVarVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartControlDepsForVarVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddGradientVariable(FlatBufferBuilder builder, StringOffset gradientVariableOffset) { builder.AddOffset(10, gradientVariableOffset.Value, 0); } + public static void AddUiLabelExtra(FlatBufferBuilder builder, StringOffset uiLabelExtraOffset) { builder.AddOffset(11, uiLabelExtraOffset.Value, 0); } + public static void AddConstantValue(FlatBufferBuilder builder, Offset constantValueOffset) { builder.AddOffset(12, constantValueOffset.Value, 0); } + public static Offset EndUIVariable(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIVariable.java b/libnd4j/include/graph/generated/nd4j/graph/UIVariable.java new file mode 100644 index 000000000..97ffb8c24 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIVariable.java @@ -0,0 +1,108 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class UIVariable extends Table { + public static UIVariable getRootAsUIVariable(ByteBuffer _bb) { return getRootAsUIVariable(_bb, new UIVariable()); } + public static UIVariable getRootAsUIVariable(ByteBuffer _bb, UIVariable obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public UIVariable __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public IntPair id() { return id(new IntPair()); } + public IntPair id(IntPair obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public String name() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + public byte type() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) : 0; } + public byte datatype() { int o = __offset(10); return o != 0 ? bb.get(o + bb_pos) : 0; } + public long shape(int j) { int o = __offset(12); return o != 0 ? bb.getLong(__vector(o) + j * 8) : 0; } + public int shapeLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; } + public ByteBuffer shapeAsByteBuffer() { return __vector_as_bytebuffer(12, 8); } + public ByteBuffer shapeInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 12, 8); } + public String controlDeps(int j) { int o = __offset(14); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int controlDepsLength() { int o = __offset(14); return o != 0 ? __vector_len(o) : 0; } + public String outputOfOp() { int o = __offset(16); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer outputOfOpAsByteBuffer() { return __vector_as_bytebuffer(16, 1); } + public ByteBuffer outputOfOpInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 16, 1); } + public String inputsForOp(int j) { int o = __offset(18); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int inputsForOpLength() { int o = __offset(18); return o != 0 ? __vector_len(o) : 0; } + public String controlDepsForOp(int j) { int o = __offset(20); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int controlDepsForOpLength() { int o = __offset(20); return o != 0 ? __vector_len(o) : 0; } + public String controlDepsForVar(int j) { int o = __offset(22); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int controlDepsForVarLength() { int o = __offset(22); return o != 0 ? __vector_len(o) : 0; } + public String gradientVariable() { int o = __offset(24); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer gradientVariableAsByteBuffer() { return __vector_as_bytebuffer(24, 1); } + public ByteBuffer gradientVariableInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 24, 1); } + public String uiLabelExtra() { int o = __offset(26); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer uiLabelExtraAsByteBuffer() { return __vector_as_bytebuffer(26, 1); } + public ByteBuffer uiLabelExtraInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 26, 1); } + public FlatArray constantValue() { return constantValue(new FlatArray()); } + public FlatArray constantValue(FlatArray obj) { int o = __offset(28); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createUIVariable(FlatBufferBuilder builder, + int idOffset, + int nameOffset, + byte type, + byte datatype, + int shapeOffset, + int controlDepsOffset, + int outputOfOpOffset, + int inputsForOpOffset, + int controlDepsForOpOffset, + int controlDepsForVarOffset, + int gradientVariableOffset, + int uiLabelExtraOffset, + int constantValueOffset) { + builder.startObject(13); + UIVariable.addConstantValue(builder, constantValueOffset); + UIVariable.addUiLabelExtra(builder, uiLabelExtraOffset); + UIVariable.addGradientVariable(builder, gradientVariableOffset); + UIVariable.addControlDepsForVar(builder, controlDepsForVarOffset); + UIVariable.addControlDepsForOp(builder, controlDepsForOpOffset); + UIVariable.addInputsForOp(builder, inputsForOpOffset); + UIVariable.addOutputOfOp(builder, outputOfOpOffset); + UIVariable.addControlDeps(builder, controlDepsOffset); + UIVariable.addShape(builder, shapeOffset); + UIVariable.addName(builder, nameOffset); + UIVariable.addId(builder, idOffset); + UIVariable.addDatatype(builder, datatype); + UIVariable.addType(builder, type); + return UIVariable.endUIVariable(builder); + } + + public static void startUIVariable(FlatBufferBuilder builder) { builder.startObject(13); } + public static void addId(FlatBufferBuilder builder, int idOffset) { builder.addOffset(0, idOffset, 0); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(1, nameOffset, 0); } + public static void addType(FlatBufferBuilder builder, byte type) { builder.addByte(2, type, 0); } + public static void addDatatype(FlatBufferBuilder builder, byte datatype) { builder.addByte(3, datatype, 0); } + public static void addShape(FlatBufferBuilder builder, int shapeOffset) { builder.addOffset(4, shapeOffset, 0); } + public static int createShapeVector(FlatBufferBuilder builder, long[] data) { builder.startVector(8, data.length, 8); for (int i = data.length - 1; i >= 0; i--) builder.addLong(data[i]); return builder.endVector(); } + public static void startShapeVector(FlatBufferBuilder builder, int numElems) { builder.startVector(8, numElems, 8); } + public static void addControlDeps(FlatBufferBuilder builder, int controlDepsOffset) { builder.addOffset(5, controlDepsOffset, 0); } + public static int createControlDepsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startControlDepsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addOutputOfOp(FlatBufferBuilder builder, int outputOfOpOffset) { builder.addOffset(6, outputOfOpOffset, 0); } + public static void addInputsForOp(FlatBufferBuilder builder, int inputsForOpOffset) { builder.addOffset(7, inputsForOpOffset, 0); } + public static int createInputsForOpVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startInputsForOpVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addControlDepsForOp(FlatBufferBuilder builder, int controlDepsForOpOffset) { builder.addOffset(8, controlDepsForOpOffset, 0); } + public static int createControlDepsForOpVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startControlDepsForOpVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addControlDepsForVar(FlatBufferBuilder builder, int controlDepsForVarOffset) { builder.addOffset(9, controlDepsForVarOffset, 0); } + public static int createControlDepsForVarVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startControlDepsForVarVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addGradientVariable(FlatBufferBuilder builder, int gradientVariableOffset) { builder.addOffset(10, gradientVariableOffset, 0); } + public static void addUiLabelExtra(FlatBufferBuilder builder, int uiLabelExtraOffset) { builder.addOffset(11, uiLabelExtraOffset, 0); } + public static void addConstantValue(FlatBufferBuilder builder, int constantValueOffset) { builder.addOffset(12, constantValueOffset, 0); } + public static int endUIVariable(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UIVariable.py b/libnd4j/include/graph/generated/nd4j/graph/UIVariable.py new file mode 100644 index 000000000..44bafdaf0 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UIVariable.py @@ -0,0 +1,200 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class UIVariable(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsUIVariable(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = UIVariable() + x.Init(buf, n + offset) + return x + + # UIVariable + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # UIVariable + def Id(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + x = self._tab.Indirect(o + self._tab.Pos) + from .IntPair import IntPair + obj = IntPair() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # UIVariable + def Name(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + + # UIVariable + def Type(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) + return 0 + + # UIVariable + def Datatype(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos) + return 0 + + # UIVariable + def Shape(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.Get(flatbuffers.number_types.Int64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) + return 0 + + # UIVariable + def ShapeAsNumpy(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int64Flags, o) + return 0 + + # UIVariable + def ShapeLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # UIVariable + def ControlDeps(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # UIVariable + def ControlDepsLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # UIVariable + def OutputOfOp(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + + # UIVariable + def InputsForOp(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # UIVariable + def InputsForOpLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # UIVariable + def ControlDepsForOp(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # UIVariable + def ControlDepsForOpLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # UIVariable + def ControlDepsForVar(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # UIVariable + def ControlDepsForVarLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # UIVariable + def GradientVariable(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(24)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + + # UIVariable + def UiLabelExtra(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(26)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + + # UIVariable + def ConstantValue(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(28)) + if o != 0: + x = self._tab.Indirect(o + self._tab.Pos) + from .FlatArray import FlatArray + obj = FlatArray() + obj.Init(self._tab.Bytes, x) + return obj + return None + +def UIVariableStart(builder): builder.StartObject(13) +def UIVariableAddId(builder, id): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(id), 0) +def UIVariableAddName(builder, name): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) +def UIVariableAddType(builder, type): builder.PrependInt8Slot(2, type, 0) +def UIVariableAddDatatype(builder, datatype): builder.PrependInt8Slot(3, datatype, 0) +def UIVariableAddShape(builder, shape): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(shape), 0) +def UIVariableStartShapeVector(builder, numElems): return builder.StartVector(8, numElems, 8) +def UIVariableAddControlDeps(builder, controlDeps): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(controlDeps), 0) +def UIVariableStartControlDepsVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def UIVariableAddOutputOfOp(builder, outputOfOp): builder.PrependUOffsetTRelativeSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(outputOfOp), 0) +def UIVariableAddInputsForOp(builder, inputsForOp): builder.PrependUOffsetTRelativeSlot(7, flatbuffers.number_types.UOffsetTFlags.py_type(inputsForOp), 0) +def UIVariableStartInputsForOpVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def UIVariableAddControlDepsForOp(builder, controlDepsForOp): builder.PrependUOffsetTRelativeSlot(8, flatbuffers.number_types.UOffsetTFlags.py_type(controlDepsForOp), 0) +def UIVariableStartControlDepsForOpVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def UIVariableAddControlDepsForVar(builder, controlDepsForVar): builder.PrependUOffsetTRelativeSlot(9, flatbuffers.number_types.UOffsetTFlags.py_type(controlDepsForVar), 0) +def UIVariableStartControlDepsForVarVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def UIVariableAddGradientVariable(builder, gradientVariable): builder.PrependUOffsetTRelativeSlot(10, flatbuffers.number_types.UOffsetTFlags.py_type(gradientVariable), 0) +def UIVariableAddUiLabelExtra(builder, uiLabelExtra): builder.PrependUOffsetTRelativeSlot(11, flatbuffers.number_types.UOffsetTFlags.py_type(uiLabelExtra), 0) +def UIVariableAddConstantValue(builder, constantValue): builder.PrependUOffsetTRelativeSlot(12, flatbuffers.number_types.UOffsetTFlags.py_type(constantValue), 0) +def UIVariableEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/UpdaterState.cs b/libnd4j/include/graph/generated/nd4j/graph/UpdaterState.cs new file mode 100644 index 000000000..8cb6e07f0 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UpdaterState.cs @@ -0,0 +1,60 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +using global::System; +using global::FlatBuffers; + +public struct UpdaterState : IFlatbufferObject +{ + private Table __p; + public ByteBuffer ByteBuffer { get { return __p.bb; } } + public static UpdaterState GetRootAsUpdaterState(ByteBuffer _bb) { return GetRootAsUpdaterState(_bb, new UpdaterState()); } + public static UpdaterState GetRootAsUpdaterState(ByteBuffer _bb, UpdaterState obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); } + public void __init(int _i, ByteBuffer _bb) { __p.bb_pos = _i; __p.bb = _bb; } + public UpdaterState __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public string ParamName { get { int o = __p.__offset(4); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } } +#if ENABLE_SPAN_T + public Span GetParamNameBytes() { return __p.__vector_as_span(4); } +#else + public ArraySegment? GetParamNameBytes() { return __p.__vector_as_arraysegment(4); } +#endif + public byte[] GetParamNameArray() { return __p.__vector_as_array(4); } + public string UpdaterStateKeys(int j) { int o = __p.__offset(6); return o != 0 ? __p.__string(__p.__vector(o) + j * 4) : null; } + public int UpdaterStateKeysLength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } } + public FlatArray? UpdaterStateValues(int j) { int o = __p.__offset(8); return o != 0 ? (FlatArray?)(new FlatArray()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; } + public int UpdaterStateValuesLength { get { int o = __p.__offset(8); return o != 0 ? __p.__vector_len(o) : 0; } } + + public static Offset CreateUpdaterState(FlatBufferBuilder builder, + StringOffset paramNameOffset = default(StringOffset), + VectorOffset updaterStateKeysOffset = default(VectorOffset), + VectorOffset updaterStateValuesOffset = default(VectorOffset)) { + builder.StartObject(3); + UpdaterState.AddUpdaterStateValues(builder, updaterStateValuesOffset); + UpdaterState.AddUpdaterStateKeys(builder, updaterStateKeysOffset); + UpdaterState.AddParamName(builder, paramNameOffset); + return UpdaterState.EndUpdaterState(builder); + } + + public static void StartUpdaterState(FlatBufferBuilder builder) { builder.StartObject(3); } + public static void AddParamName(FlatBufferBuilder builder, StringOffset paramNameOffset) { builder.AddOffset(0, paramNameOffset.Value, 0); } + public static void AddUpdaterStateKeys(FlatBufferBuilder builder, VectorOffset updaterStateKeysOffset) { builder.AddOffset(1, updaterStateKeysOffset.Value, 0); } + public static VectorOffset CreateUpdaterStateKeysVector(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateUpdaterStateKeysVectorBlock(FlatBufferBuilder builder, StringOffset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartUpdaterStateKeysVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static void AddUpdaterStateValues(FlatBufferBuilder builder, VectorOffset updaterStateValuesOffset) { builder.AddOffset(2, updaterStateValuesOffset.Value, 0); } + public static VectorOffset CreateUpdaterStateValuesVector(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); } + public static VectorOffset CreateUpdaterStateValuesVectorBlock(FlatBufferBuilder builder, Offset[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); } + public static void StartUpdaterStateValuesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); } + public static Offset EndUpdaterState(FlatBufferBuilder builder) { + int o = builder.EndObject(); + return new Offset(o); + } +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/UpdaterState.java b/libnd4j/include/graph/generated/nd4j/graph/UpdaterState.java new file mode 100644 index 000000000..76868354c --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UpdaterState.java @@ -0,0 +1,50 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class UpdaterState extends Table { + public static UpdaterState getRootAsUpdaterState(ByteBuffer _bb) { return getRootAsUpdaterState(_bb, new UpdaterState()); } + public static UpdaterState getRootAsUpdaterState(ByteBuffer _bb, UpdaterState obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; } + public UpdaterState __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String paramName() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer paramNameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer paramNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public String updaterStateKeys(int j) { int o = __offset(6); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int updaterStateKeysLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public FlatArray updaterStateValues(int j) { return updaterStateValues(new FlatArray(), j); } + public FlatArray updaterStateValues(FlatArray obj, int j) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int updaterStateValuesLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } + + public static int createUpdaterState(FlatBufferBuilder builder, + int paramNameOffset, + int updaterStateKeysOffset, + int updaterStateValuesOffset) { + builder.startObject(3); + UpdaterState.addUpdaterStateValues(builder, updaterStateValuesOffset); + UpdaterState.addUpdaterStateKeys(builder, updaterStateKeysOffset); + UpdaterState.addParamName(builder, paramNameOffset); + return UpdaterState.endUpdaterState(builder); + } + + public static void startUpdaterState(FlatBufferBuilder builder) { builder.startObject(3); } + public static void addParamName(FlatBufferBuilder builder, int paramNameOffset) { builder.addOffset(0, paramNameOffset, 0); } + public static void addUpdaterStateKeys(FlatBufferBuilder builder, int updaterStateKeysOffset) { builder.addOffset(1, updaterStateKeysOffset, 0); } + public static int createUpdaterStateKeysVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startUpdaterStateKeysVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addUpdaterStateValues(FlatBufferBuilder builder, int updaterStateValuesOffset) { builder.addOffset(2, updaterStateValuesOffset, 0); } + public static int createUpdaterStateValuesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startUpdaterStateValuesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endUpdaterState(FlatBufferBuilder builder) { + int o = builder.endObject(); + return o; + } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/UpdaterState.py b/libnd4j/include/graph/generated/nd4j/graph/UpdaterState.py new file mode 100644 index 000000000..3765d8f85 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/UpdaterState.py @@ -0,0 +1,83 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +import flatbuffers + +class UpdaterState(object): + __slots__ = ['_tab'] + + @classmethod + def GetRootAsUpdaterState(cls, buf, offset): + n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) + x = UpdaterState() + x.Init(buf, n + offset) + return x + + # UpdaterState + def Init(self, buf, pos): + self._tab = flatbuffers.table.Table(buf, pos) + + # UpdaterState + def ParamName(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) + if o != 0: + return self._tab.String(o + self._tab.Pos) + return None + + # UpdaterState + def UpdaterStateKeys(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + a = self._tab.Vector(o) + return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) + return "" + + # UpdaterState + def UpdaterStateKeysLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + + # UpdaterState + def UpdaterStateValues(self, j): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + x = self._tab.Vector(o) + x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 + x = self._tab.Indirect(x) + from .FlatArray import FlatArray + obj = FlatArray() + obj.Init(self._tab.Bytes, x) + return obj + return None + + # UpdaterState + def UpdaterStateValuesLength(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) + if o != 0: + return self._tab.VectorLen(o) + return 0 + +def UpdaterStateStart(builder): builder.StartObject(3) +def UpdaterStateAddParamName(builder, paramName): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(paramName), 0) +def UpdaterStateAddUpdaterStateKeys(builder, updaterStateKeys): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(updaterStateKeys), 0) +def UpdaterStateStartUpdaterStateKeysVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def UpdaterStateAddUpdaterStateValues(builder, updaterStateValues): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(updaterStateValues), 0) +def UpdaterStateStartUpdaterStateValuesVector(builder, numElems): return builder.StartVector(4, numElems, 4) +def UpdaterStateEnd(builder): return builder.EndObject() diff --git a/libnd4j/include/graph/generated/nd4j/graph/VarType.cs b/libnd4j/include/graph/generated/nd4j/graph/VarType.cs new file mode 100644 index 000000000..4649bfef6 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/VarType.cs @@ -0,0 +1,17 @@ +// +// automatically generated by the FlatBuffers compiler, do not modify +// + +namespace sd.graph +{ + +public enum VarType : sbyte +{ + VARIABLE = 0, + CONSTANT = 1, + ARRAY = 2, + PLACEHOLDER = 3, +}; + + +} diff --git a/libnd4j/include/graph/generated/nd4j/graph/VarType.java b/libnd4j/include/graph/generated/nd4j/graph/VarType.java new file mode 100644 index 000000000..14937cd76 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/VarType.java @@ -0,0 +1,16 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package nd4j.graph; + +public final class VarType { + private VarType() { } + public static final byte VARIABLE = 0; + public static final byte CONSTANT = 1; + public static final byte ARRAY = 2; + public static final byte PLACEHOLDER = 3; + + public static final String[] names = { "VARIABLE", "CONSTANT", "ARRAY", "PLACEHOLDER", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/libnd4j/include/graph/generated/nd4j/graph/VarType.py b/libnd4j/include/graph/generated/nd4j/graph/VarType.py new file mode 100644 index 000000000..84dc68522 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/VarType.py @@ -0,0 +1,24 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + +class VarType(object): + VARIABLE = 0 + CONSTANT = 1 + ARRAY = 2 + PLACEHOLDER = 3 + diff --git a/libnd4j/include/graph/generated/nd4j/graph/__init__.py b/libnd4j/include/graph/generated/nd4j/graph/__init__.py new file mode 100644 index 000000000..ecf2a1c25 --- /dev/null +++ b/libnd4j/include/graph/generated/nd4j/graph/__init__.py @@ -0,0 +1,18 @@ +# /* ****************************************************************************** +# * +# * +# * This program and the accompanying materials are made available under the +# * terms of the Apache License, Version 2.0 which is available at +# * https://www.apache.org/licenses/LICENSE-2.0. +# * +# * See the NOTICE file distributed with this work for additional +# * information regarding copyright ownership. +# * 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. +# * +# * SPDX-License-Identifier: Apache-2.0 +# ******************************************************************************/ + diff --git a/libnd4j/include/graph/generated/node_generated.h b/libnd4j/include/graph/generated/node_generated.h new file mode 100644 index 000000000..a39f2490c --- /dev/null +++ b/libnd4j/include/graph/generated/node_generated.h @@ -0,0 +1,387 @@ +// automatically generated by the FlatBuffers compiler, do not modify + + +#ifndef FLATBUFFERS_GENERATED_NODE_ND4J_GRAPH_H_ +#define FLATBUFFERS_GENERATED_NODE_ND4J_GRAPH_H_ + +#include "flatbuffers/flatbuffers.h" + +#include "array_generated.h" +#include "properties_generated.h" +#include "utils_generated.h" + +namespace sd { +namespace graph { + +struct FlatNode; + +struct FlatNode FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_ID = 4, + VT_NAME = 6, + VT_OPTYPE = 8, + VT_OPNUM = 10, + VT_PROPERTIES = 12, + VT_INPUT = 14, + VT_INPUTPAIRED = 16, + VT_OUTPUT = 18, + VT_EXTRAPARAMS = 20, + VT_EXTRAINTEGER = 22, + VT_EXTRABOOLS = 24, + VT_DIMENSIONS = 26, + VT_DEVICE = 28, + VT_SCOPE_ID = 30, + VT_SCOPE_NAME = 32, + VT_OUTPUTNAMES = 34, + VT_OPNAME = 36, + VT_OUTPUTTYPES = 38, + VT_SCALAR = 40, + VT_CONTROLDEPS = 42, + VT_VARCONTROLDEPS = 44, + VT_CONTROLDEPFOR = 46, + VT_EXTRATYPES = 48 + }; + int32_t id() const { + return GetField(VT_ID, 0); + } + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); + } + OpType opType() const { + return static_cast(GetField(VT_OPTYPE, 0)); + } + int64_t opNum() const { + return GetField(VT_OPNUM, 0); + } + const flatbuffers::Vector> *properties() const { + return GetPointer> *>(VT_PROPERTIES); + } + const flatbuffers::Vector *input() const { + return GetPointer *>(VT_INPUT); + } + const flatbuffers::Vector> *inputPaired() const { + return GetPointer> *>(VT_INPUTPAIRED); + } + const flatbuffers::Vector *output() const { + return GetPointer *>(VT_OUTPUT); + } + const flatbuffers::Vector *extraParams() const { + return GetPointer *>(VT_EXTRAPARAMS); + } + const flatbuffers::Vector *extraInteger() const { + return GetPointer *>(VT_EXTRAINTEGER); + } + const flatbuffers::Vector *extraBools() const { + return GetPointer *>(VT_EXTRABOOLS); + } + const flatbuffers::Vector *dimensions() const { + return GetPointer *>(VT_DIMENSIONS); + } + int32_t device() const { + return GetField(VT_DEVICE, 0); + } + int32_t scope_id() const { + return GetField(VT_SCOPE_ID, 0); + } + const flatbuffers::String *scope_name() const { + return GetPointer(VT_SCOPE_NAME); + } + const flatbuffers::Vector> *outputNames() const { + return GetPointer> *>(VT_OUTPUTNAMES); + } + const flatbuffers::String *opName() const { + return GetPointer(VT_OPNAME); + } + const flatbuffers::Vector *outputTypes() const { + return GetPointer *>(VT_OUTPUTTYPES); + } + const FlatArray *scalar() const { + return GetPointer(VT_SCALAR); + } + const flatbuffers::Vector> *controlDeps() const { + return GetPointer> *>(VT_CONTROLDEPS); + } + const flatbuffers::Vector> *varControlDeps() const { + return GetPointer> *>(VT_VARCONTROLDEPS); + } + const flatbuffers::Vector> *controlDepFor() const { + return GetPointer> *>(VT_CONTROLDEPFOR); + } + const flatbuffers::Vector *extraTypes() const { + return GetPointer *>(VT_EXTRATYPES); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ID) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyField(verifier, VT_OPTYPE) && + VerifyField(verifier, VT_OPNUM) && + VerifyOffset(verifier, VT_PROPERTIES) && + verifier.VerifyVector(properties()) && + verifier.VerifyVectorOfTables(properties()) && + VerifyOffset(verifier, VT_INPUT) && + verifier.VerifyVector(input()) && + VerifyOffset(verifier, VT_INPUTPAIRED) && + verifier.VerifyVector(inputPaired()) && + verifier.VerifyVectorOfTables(inputPaired()) && + VerifyOffset(verifier, VT_OUTPUT) && + verifier.VerifyVector(output()) && + VerifyOffset(verifier, VT_EXTRAPARAMS) && + verifier.VerifyVector(extraParams()) && + VerifyOffset(verifier, VT_EXTRAINTEGER) && + verifier.VerifyVector(extraInteger()) && + VerifyOffset(verifier, VT_EXTRABOOLS) && + verifier.VerifyVector(extraBools()) && + VerifyOffset(verifier, VT_DIMENSIONS) && + verifier.VerifyVector(dimensions()) && + VerifyField(verifier, VT_DEVICE) && + VerifyField(verifier, VT_SCOPE_ID) && + VerifyOffset(verifier, VT_SCOPE_NAME) && + verifier.VerifyString(scope_name()) && + VerifyOffset(verifier, VT_OUTPUTNAMES) && + verifier.VerifyVector(outputNames()) && + verifier.VerifyVectorOfStrings(outputNames()) && + VerifyOffset(verifier, VT_OPNAME) && + verifier.VerifyString(opName()) && + VerifyOffset(verifier, VT_OUTPUTTYPES) && + verifier.VerifyVector(outputTypes()) && + VerifyOffset(verifier, VT_SCALAR) && + verifier.VerifyTable(scalar()) && + VerifyOffset(verifier, VT_CONTROLDEPS) && + verifier.VerifyVector(controlDeps()) && + verifier.VerifyVectorOfStrings(controlDeps()) && + VerifyOffset(verifier, VT_VARCONTROLDEPS) && + verifier.VerifyVector(varControlDeps()) && + verifier.VerifyVectorOfStrings(varControlDeps()) && + VerifyOffset(verifier, VT_CONTROLDEPFOR) && + verifier.VerifyVector(controlDepFor()) && + verifier.VerifyVectorOfStrings(controlDepFor()) && + VerifyOffset(verifier, VT_EXTRATYPES) && + verifier.VerifyVector(extraTypes()) && + verifier.EndTable(); + } +}; + +struct FlatNodeBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_id(int32_t id) { + fbb_.AddElement(FlatNode::VT_ID, id, 0); + } + void add_name(flatbuffers::Offset name) { + fbb_.AddOffset(FlatNode::VT_NAME, name); + } + void add_opType(OpType opType) { + fbb_.AddElement(FlatNode::VT_OPTYPE, static_cast(opType), 0); + } + void add_opNum(int64_t opNum) { + fbb_.AddElement(FlatNode::VT_OPNUM, opNum, 0); + } + void add_properties(flatbuffers::Offset>> properties) { + fbb_.AddOffset(FlatNode::VT_PROPERTIES, properties); + } + void add_input(flatbuffers::Offset> input) { + fbb_.AddOffset(FlatNode::VT_INPUT, input); + } + void add_inputPaired(flatbuffers::Offset>> inputPaired) { + fbb_.AddOffset(FlatNode::VT_INPUTPAIRED, inputPaired); + } + void add_output(flatbuffers::Offset> output) { + fbb_.AddOffset(FlatNode::VT_OUTPUT, output); + } + void add_extraParams(flatbuffers::Offset> extraParams) { + fbb_.AddOffset(FlatNode::VT_EXTRAPARAMS, extraParams); + } + void add_extraInteger(flatbuffers::Offset> extraInteger) { + fbb_.AddOffset(FlatNode::VT_EXTRAINTEGER, extraInteger); + } + void add_extraBools(flatbuffers::Offset> extraBools) { + fbb_.AddOffset(FlatNode::VT_EXTRABOOLS, extraBools); + } + void add_dimensions(flatbuffers::Offset> dimensions) { + fbb_.AddOffset(FlatNode::VT_DIMENSIONS, dimensions); + } + void add_device(int32_t device) { + fbb_.AddElement(FlatNode::VT_DEVICE, device, 0); + } + void add_scope_id(int32_t scope_id) { + fbb_.AddElement(FlatNode::VT_SCOPE_ID, scope_id, 0); + } + void add_scope_name(flatbuffers::Offset scope_name) { + fbb_.AddOffset(FlatNode::VT_SCOPE_NAME, scope_name); + } + void add_outputNames(flatbuffers::Offset>> outputNames) { + fbb_.AddOffset(FlatNode::VT_OUTPUTNAMES, outputNames); + } + void add_opName(flatbuffers::Offset opName) { + fbb_.AddOffset(FlatNode::VT_OPNAME, opName); + } + void add_outputTypes(flatbuffers::Offset> outputTypes) { + fbb_.AddOffset(FlatNode::VT_OUTPUTTYPES, outputTypes); + } + void add_scalar(flatbuffers::Offset scalar) { + fbb_.AddOffset(FlatNode::VT_SCALAR, scalar); + } + void add_controlDeps(flatbuffers::Offset>> controlDeps) { + fbb_.AddOffset(FlatNode::VT_CONTROLDEPS, controlDeps); + } + void add_varControlDeps(flatbuffers::Offset>> varControlDeps) { + fbb_.AddOffset(FlatNode::VT_VARCONTROLDEPS, varControlDeps); + } + void add_controlDepFor(flatbuffers::Offset>> controlDepFor) { + fbb_.AddOffset(FlatNode::VT_CONTROLDEPFOR, controlDepFor); + } + void add_extraTypes(flatbuffers::Offset> extraTypes) { + fbb_.AddOffset(FlatNode::VT_EXTRATYPES, extraTypes); + } + explicit FlatNodeBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + FlatNodeBuilder &operator=(const FlatNodeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateFlatNode( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t id = 0, + flatbuffers::Offset name = 0, + OpType opType = OpType_TRANSFORM_FLOAT, + int64_t opNum = 0, + flatbuffers::Offset>> properties = 0, + flatbuffers::Offset> input = 0, + flatbuffers::Offset>> inputPaired = 0, + flatbuffers::Offset> output = 0, + flatbuffers::Offset> extraParams = 0, + flatbuffers::Offset> extraInteger = 0, + flatbuffers::Offset> extraBools = 0, + flatbuffers::Offset> dimensions = 0, + int32_t device = 0, + int32_t scope_id = 0, + flatbuffers::Offset scope_name = 0, + flatbuffers::Offset>> outputNames = 0, + flatbuffers::Offset opName = 0, + flatbuffers::Offset> outputTypes = 0, + flatbuffers::Offset scalar = 0, + flatbuffers::Offset>> controlDeps = 0, + flatbuffers::Offset>> varControlDeps = 0, + flatbuffers::Offset>> controlDepFor = 0, + flatbuffers::Offset> extraTypes = 0) { + FlatNodeBuilder builder_(_fbb); + builder_.add_opNum(opNum); + builder_.add_extraTypes(extraTypes); + builder_.add_controlDepFor(controlDepFor); + builder_.add_varControlDeps(varControlDeps); + builder_.add_controlDeps(controlDeps); + builder_.add_scalar(scalar); + builder_.add_outputTypes(outputTypes); + builder_.add_opName(opName); + builder_.add_outputNames(outputNames); + builder_.add_scope_name(scope_name); + builder_.add_scope_id(scope_id); + builder_.add_device(device); + builder_.add_dimensions(dimensions); + builder_.add_extraBools(extraBools); + builder_.add_extraInteger(extraInteger); + builder_.add_extraParams(extraParams); + builder_.add_output(output); + builder_.add_inputPaired(inputPaired); + builder_.add_input(input); + builder_.add_properties(properties); + builder_.add_name(name); + builder_.add_id(id); + builder_.add_opType(opType); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateFlatNodeDirect( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t id = 0, + const char *name = nullptr, + OpType opType = OpType_TRANSFORM_FLOAT, + int64_t opNum = 0, + const std::vector> *properties = nullptr, + const std::vector *input = nullptr, + const std::vector> *inputPaired = nullptr, + const std::vector *output = nullptr, + const std::vector *extraParams = nullptr, + const std::vector *extraInteger = nullptr, + const std::vector *extraBools = nullptr, + const std::vector *dimensions = nullptr, + int32_t device = 0, + int32_t scope_id = 0, + const char *scope_name = nullptr, + const std::vector> *outputNames = nullptr, + const char *opName = nullptr, + const std::vector *outputTypes = nullptr, + flatbuffers::Offset scalar = 0, + const std::vector> *controlDeps = nullptr, + const std::vector> *varControlDeps = nullptr, + const std::vector> *controlDepFor = nullptr, + const std::vector *extraTypes = nullptr) { + return sd::graph::CreateFlatNode( + _fbb, + id, + name ? _fbb.CreateString(name) : 0, + opType, + opNum, + properties ? _fbb.CreateVector>(*properties) : 0, + input ? _fbb.CreateVector(*input) : 0, + inputPaired ? _fbb.CreateVector>(*inputPaired) : 0, + output ? _fbb.CreateVector(*output) : 0, + extraParams ? _fbb.CreateVector(*extraParams) : 0, + extraInteger ? _fbb.CreateVector(*extraInteger) : 0, + extraBools ? _fbb.CreateVector(*extraBools) : 0, + dimensions ? _fbb.CreateVector(*dimensions) : 0, + device, + scope_id, + scope_name ? _fbb.CreateString(scope_name) : 0, + outputNames ? _fbb.CreateVector>(*outputNames) : 0, + opName ? _fbb.CreateString(opName) : 0, + outputTypes ? _fbb.CreateVector(*outputTypes) : 0, + scalar, + controlDeps ? _fbb.CreateVector>(*controlDeps) : 0, + varControlDeps ? _fbb.CreateVector>(*varControlDeps) : 0, + controlDepFor ? _fbb.CreateVector>(*controlDepFor) : 0, + extraTypes ? _fbb.CreateVector(*extraTypes) : 0); +} + +inline const sd::graph::FlatNode *GetFlatNode(const void *buf) { + return flatbuffers::GetRoot(buf); +} + +inline const sd::graph::FlatNode *GetSizePrefixedFlatNode(const void *buf) { + return flatbuffers::GetSizePrefixedRoot(buf); +} + +inline bool VerifyFlatNodeBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifyBuffer(nullptr); +} + +inline bool VerifySizePrefixedFlatNodeBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifySizePrefixedBuffer(nullptr); +} + +inline void FinishFlatNodeBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.Finish(root); +} + +inline void FinishSizePrefixedFlatNodeBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.FinishSizePrefixed(root); +} + +} // namespace graph +} // namespace sd + +#endif // FLATBUFFERS_GENERATED_NODE_ND4J_GRAPH_H_ diff --git a/libnd4j/include/graph/generated/node_generated.js b/libnd4j/include/graph/generated/node_generated.js new file mode 100644 index 000000000..a750b3752 --- /dev/null +++ b/libnd4j/include/graph/generated/node_generated.js @@ -0,0 +1,947 @@ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ + +/** + * @const + * @namespace + */ +var nd4j = nd4j || {}; + +/** + * @const + * @namespace + */ +nd4j.graph = nd4j.graph || {}; + +/** + * @constructor + */ +nd4j.graph.FlatNode = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.FlatNode} + */ +nd4j.graph.FlatNode.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.FlatNode=} obj + * @returns {nd4j.graph.FlatNode} + */ +nd4j.graph.FlatNode.getRootAsFlatNode = function(bb, obj) { + return (obj || new nd4j.graph.FlatNode).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.id = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.FlatNode.prototype.name = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @returns {nd4j.graph.OpType} + */ +nd4j.graph.FlatNode.prototype.opType = function() { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? /** @type {nd4j.graph.OpType} */ (this.bb.readInt8(this.bb_pos + offset)) : nd4j.graph.OpType.TRANSFORM_FLOAT; +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.FlatNode.prototype.opNum = function() { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @param {number} index + * @param {nd4j.graph.FlatProperties=} obj + * @returns {nd4j.graph.FlatProperties} + */ +nd4j.graph.FlatNode.prototype.properties = function(index, obj) { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? (obj || new nd4j.graph.FlatProperties).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.propertiesLength = function() { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.input = function(index) { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? this.bb.readInt32(this.bb.__vector(this.bb_pos + offset) + index * 4) : 0; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.inputLength = function() { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {Int32Array} + */ +nd4j.graph.FlatNode.prototype.inputArray = function() { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? new Int32Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null; +}; + +/** + * @param {number} index + * @param {nd4j.graph.IntPair=} obj + * @returns {nd4j.graph.IntPair} + */ +nd4j.graph.FlatNode.prototype.inputPaired = function(index, obj) { + var offset = this.bb.__offset(this.bb_pos, 16); + return offset ? (obj || new nd4j.graph.IntPair).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.inputPairedLength = function() { + var offset = this.bb.__offset(this.bb_pos, 16); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.output = function(index) { + var offset = this.bb.__offset(this.bb_pos, 18); + return offset ? this.bb.readInt32(this.bb.__vector(this.bb_pos + offset) + index * 4) : 0; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.outputLength = function() { + var offset = this.bb.__offset(this.bb_pos, 18); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {Int32Array} + */ +nd4j.graph.FlatNode.prototype.outputArray = function() { + var offset = this.bb.__offset(this.bb_pos, 18); + return offset ? new Int32Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null; +}; + +/** + * @param {number} index + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.extraParams = function(index) { + var offset = this.bb.__offset(this.bb_pos, 20); + return offset ? this.bb.readFloat64(this.bb.__vector(this.bb_pos + offset) + index * 8) : 0; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.extraParamsLength = function() { + var offset = this.bb.__offset(this.bb_pos, 20); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {Float64Array} + */ +nd4j.graph.FlatNode.prototype.extraParamsArray = function() { + var offset = this.bb.__offset(this.bb_pos, 20); + return offset ? new Float64Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null; +}; + +/** + * @param {number} index + * @returns {flatbuffers.Long} + */ +nd4j.graph.FlatNode.prototype.extraInteger = function(index) { + var offset = this.bb.__offset(this.bb_pos, 22); + return offset ? this.bb.readInt64(this.bb.__vector(this.bb_pos + offset) + index * 8) : this.bb.createLong(0, 0); +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.extraIntegerLength = function() { + var offset = this.bb.__offset(this.bb_pos, 22); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @returns {boolean} + */ +nd4j.graph.FlatNode.prototype.extraBools = function(index) { + var offset = this.bb.__offset(this.bb_pos, 24); + return offset ? !!this.bb.readInt8(this.bb.__vector(this.bb_pos + offset) + index) : false; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.extraBoolsLength = function() { + var offset = this.bb.__offset(this.bb_pos, 24); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {Int8Array} + */ +nd4j.graph.FlatNode.prototype.extraBoolsArray = function() { + var offset = this.bb.__offset(this.bb_pos, 24); + return offset ? new Int8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null; +}; + +/** + * @param {number} index + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.dimensions = function(index) { + var offset = this.bb.__offset(this.bb_pos, 26); + return offset ? this.bb.readInt32(this.bb.__vector(this.bb_pos + offset) + index * 4) : 0; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.dimensionsLength = function() { + var offset = this.bb.__offset(this.bb_pos, 26); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {Int32Array} + */ +nd4j.graph.FlatNode.prototype.dimensionsArray = function() { + var offset = this.bb.__offset(this.bb_pos, 26); + return offset ? new Int32Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.device = function() { + var offset = this.bb.__offset(this.bb_pos, 28); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.scopeId = function() { + var offset = this.bb.__offset(this.bb_pos, 30); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.FlatNode.prototype.scopeName = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 32); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.FlatNode.prototype.outputNames = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 34); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.outputNamesLength = function() { + var offset = this.bb.__offset(this.bb_pos, 34); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.FlatNode.prototype.opName = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 36); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @param {number} index + * @returns {nd4j.graph.DType} + */ +nd4j.graph.FlatNode.prototype.outputTypes = function(index) { + var offset = this.bb.__offset(this.bb_pos, 38); + return offset ? /** @type {nd4j.graph.DType} */ (this.bb.readInt8(this.bb.__vector(this.bb_pos + offset) + index)) : /** @type {nd4j.graph.DType} */ (0); +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.outputTypesLength = function() { + var offset = this.bb.__offset(this.bb_pos, 38); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {Int8Array} + */ +nd4j.graph.FlatNode.prototype.outputTypesArray = function() { + var offset = this.bb.__offset(this.bb_pos, 38); + return offset ? new Int8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null; +}; + +/** + * @param {nd4j.graph.FlatArray=} obj + * @returns {nd4j.graph.FlatArray|null} + */ +nd4j.graph.FlatNode.prototype.scalar = function(obj) { + var offset = this.bb.__offset(this.bb_pos, 40); + return offset ? (obj || new nd4j.graph.FlatArray).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.FlatNode.prototype.controlDeps = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 42); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.controlDepsLength = function() { + var offset = this.bb.__offset(this.bb_pos, 42); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.FlatNode.prototype.varControlDeps = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 44); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.varControlDepsLength = function() { + var offset = this.bb.__offset(this.bb_pos, 44); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.FlatNode.prototype.controlDepFor = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 46); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.controlDepForLength = function() { + var offset = this.bb.__offset(this.bb_pos, 46); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @returns {nd4j.graph.DType} + */ +nd4j.graph.FlatNode.prototype.extraTypes = function(index) { + var offset = this.bb.__offset(this.bb_pos, 48); + return offset ? /** @type {nd4j.graph.DType} */ (this.bb.readInt8(this.bb.__vector(this.bb_pos + offset) + index)) : /** @type {nd4j.graph.DType} */ (0); +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatNode.prototype.extraTypesLength = function() { + var offset = this.bb.__offset(this.bb_pos, 48); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {Int8Array} + */ +nd4j.graph.FlatNode.prototype.extraTypesArray = function() { + var offset = this.bb.__offset(this.bb_pos, 48); + return offset ? new Int8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.FlatNode.startFlatNode = function(builder) { + builder.startObject(23); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} id + */ +nd4j.graph.FlatNode.addId = function(builder, id) { + builder.addFieldInt32(0, id, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} nameOffset + */ +nd4j.graph.FlatNode.addName = function(builder, nameOffset) { + builder.addFieldOffset(1, nameOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {nd4j.graph.OpType} opType + */ +nd4j.graph.FlatNode.addOpType = function(builder, opType) { + builder.addFieldInt8(2, opType, nd4j.graph.OpType.TRANSFORM_FLOAT); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} opNum + */ +nd4j.graph.FlatNode.addOpNum = function(builder, opNum) { + builder.addFieldInt64(3, opNum, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} propertiesOffset + */ +nd4j.graph.FlatNode.addProperties = function(builder, propertiesOffset) { + builder.addFieldOffset(4, propertiesOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatNode.createPropertiesVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatNode.startPropertiesVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} inputOffset + */ +nd4j.graph.FlatNode.addInput = function(builder, inputOffset) { + builder.addFieldOffset(5, inputOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatNode.createInputVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt32(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatNode.startInputVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} inputPairedOffset + */ +nd4j.graph.FlatNode.addInputPaired = function(builder, inputPairedOffset) { + builder.addFieldOffset(6, inputPairedOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatNode.createInputPairedVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatNode.startInputPairedVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} outputOffset + */ +nd4j.graph.FlatNode.addOutput = function(builder, outputOffset) { + builder.addFieldOffset(7, outputOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatNode.createOutputVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt32(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatNode.startOutputVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} extraParamsOffset + */ +nd4j.graph.FlatNode.addExtraParams = function(builder, extraParamsOffset) { + builder.addFieldOffset(8, extraParamsOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatNode.createExtraParamsVector = function(builder, data) { + builder.startVector(8, data.length, 8); + for (var i = data.length - 1; i >= 0; i--) { + builder.addFloat64(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatNode.startExtraParamsVector = function(builder, numElems) { + builder.startVector(8, numElems, 8); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} extraIntegerOffset + */ +nd4j.graph.FlatNode.addExtraInteger = function(builder, extraIntegerOffset) { + builder.addFieldOffset(9, extraIntegerOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatNode.createExtraIntegerVector = function(builder, data) { + builder.startVector(8, data.length, 8); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt64(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatNode.startExtraIntegerVector = function(builder, numElems) { + builder.startVector(8, numElems, 8); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} extraBoolsOffset + */ +nd4j.graph.FlatNode.addExtraBools = function(builder, extraBoolsOffset) { + builder.addFieldOffset(10, extraBoolsOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatNode.createExtraBoolsVector = function(builder, data) { + builder.startVector(1, data.length, 1); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt8(+data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatNode.startExtraBoolsVector = function(builder, numElems) { + builder.startVector(1, numElems, 1); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} dimensionsOffset + */ +nd4j.graph.FlatNode.addDimensions = function(builder, dimensionsOffset) { + builder.addFieldOffset(11, dimensionsOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatNode.createDimensionsVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt32(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatNode.startDimensionsVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} device + */ +nd4j.graph.FlatNode.addDevice = function(builder, device) { + builder.addFieldInt32(12, device, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} scopeId + */ +nd4j.graph.FlatNode.addScopeId = function(builder, scopeId) { + builder.addFieldInt32(13, scopeId, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} scopeNameOffset + */ +nd4j.graph.FlatNode.addScopeName = function(builder, scopeNameOffset) { + builder.addFieldOffset(14, scopeNameOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} outputNamesOffset + */ +nd4j.graph.FlatNode.addOutputNames = function(builder, outputNamesOffset) { + builder.addFieldOffset(15, outputNamesOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatNode.createOutputNamesVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatNode.startOutputNamesVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} opNameOffset + */ +nd4j.graph.FlatNode.addOpName = function(builder, opNameOffset) { + builder.addFieldOffset(16, opNameOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} outputTypesOffset + */ +nd4j.graph.FlatNode.addOutputTypes = function(builder, outputTypesOffset) { + builder.addFieldOffset(17, outputTypesOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatNode.createOutputTypesVector = function(builder, data) { + builder.startVector(1, data.length, 1); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt8(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatNode.startOutputTypesVector = function(builder, numElems) { + builder.startVector(1, numElems, 1); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} scalarOffset + */ +nd4j.graph.FlatNode.addScalar = function(builder, scalarOffset) { + builder.addFieldOffset(18, scalarOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} controlDepsOffset + */ +nd4j.graph.FlatNode.addControlDeps = function(builder, controlDepsOffset) { + builder.addFieldOffset(19, controlDepsOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatNode.createControlDepsVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatNode.startControlDepsVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} varControlDepsOffset + */ +nd4j.graph.FlatNode.addVarControlDeps = function(builder, varControlDepsOffset) { + builder.addFieldOffset(20, varControlDepsOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatNode.createVarControlDepsVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatNode.startVarControlDepsVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} controlDepForOffset + */ +nd4j.graph.FlatNode.addControlDepFor = function(builder, controlDepForOffset) { + builder.addFieldOffset(21, controlDepForOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatNode.createControlDepForVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatNode.startControlDepForVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} extraTypesOffset + */ +nd4j.graph.FlatNode.addExtraTypes = function(builder, extraTypesOffset) { + builder.addFieldOffset(22, extraTypesOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatNode.createExtraTypesVector = function(builder, data) { + builder.startVector(1, data.length, 1); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt8(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatNode.startExtraTypesVector = function(builder, numElems) { + builder.startVector(1, numElems, 1); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatNode.endFlatNode = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} offset + */ +nd4j.graph.FlatNode.finishFlatNodeBuffer = function(builder, offset) { + builder.finish(offset); +}; + +// Exports for Node.js and RequireJS +this.nd4j = nd4j; diff --git a/libnd4j/include/graph/generated/properties_generated.h b/libnd4j/include/graph/generated/properties_generated.h new file mode 100644 index 000000000..34138fe86 --- /dev/null +++ b/libnd4j/include/graph/generated/properties_generated.h @@ -0,0 +1,191 @@ +// automatically generated by the FlatBuffers compiler, do not modify + + +#ifndef FLATBUFFERS_GENERATED_PROPERTIES_ND4J_GRAPH_H_ +#define FLATBUFFERS_GENERATED_PROPERTIES_ND4J_GRAPH_H_ + +#include "flatbuffers/flatbuffers.h" + +#include "array_generated.h" + +namespace sd { +namespace graph { + +struct FlatProperties; + +struct FlatProperties FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_NAME = 4, + VT_I = 6, + VT_L = 8, + VT_D = 10, + VT_A = 12, + VT_B = 14, + VT_S = 16, + VT_SHAPE = 18 + }; + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); + } + const flatbuffers::Vector *i() const { + return GetPointer *>(VT_I); + } + const flatbuffers::Vector *l() const { + return GetPointer *>(VT_L); + } + const flatbuffers::Vector *d() const { + return GetPointer *>(VT_D); + } + const flatbuffers::Vector> *a() const { + return GetPointer> *>(VT_A); + } + const flatbuffers::Vector *b() const { + return GetPointer *>(VT_B); + } + const flatbuffers::Vector> *s() const { + return GetPointer> *>(VT_S); + } + const flatbuffers::Vector *shape() const { + return GetPointer *>(VT_SHAPE); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyOffset(verifier, VT_I) && + verifier.VerifyVector(i()) && + VerifyOffset(verifier, VT_L) && + verifier.VerifyVector(l()) && + VerifyOffset(verifier, VT_D) && + verifier.VerifyVector(d()) && + VerifyOffset(verifier, VT_A) && + verifier.VerifyVector(a()) && + verifier.VerifyVectorOfTables(a()) && + VerifyOffset(verifier, VT_B) && + verifier.VerifyVector(b()) && + VerifyOffset(verifier, VT_S) && + verifier.VerifyVector(s()) && + verifier.VerifyVectorOfStrings(s()) && + VerifyOffset(verifier, VT_SHAPE) && + verifier.VerifyVector(shape()) && + verifier.EndTable(); + } +}; + +struct FlatPropertiesBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_name(flatbuffers::Offset name) { + fbb_.AddOffset(FlatProperties::VT_NAME, name); + } + void add_i(flatbuffers::Offset> i) { + fbb_.AddOffset(FlatProperties::VT_I, i); + } + void add_l(flatbuffers::Offset> l) { + fbb_.AddOffset(FlatProperties::VT_L, l); + } + void add_d(flatbuffers::Offset> d) { + fbb_.AddOffset(FlatProperties::VT_D, d); + } + void add_a(flatbuffers::Offset>> a) { + fbb_.AddOffset(FlatProperties::VT_A, a); + } + void add_b(flatbuffers::Offset> b) { + fbb_.AddOffset(FlatProperties::VT_B, b); + } + void add_s(flatbuffers::Offset>> s) { + fbb_.AddOffset(FlatProperties::VT_S, s); + } + void add_shape(flatbuffers::Offset> shape) { + fbb_.AddOffset(FlatProperties::VT_SHAPE, shape); + } + explicit FlatPropertiesBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + FlatPropertiesBuilder &operator=(const FlatPropertiesBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateFlatProperties( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset name = 0, + flatbuffers::Offset> i = 0, + flatbuffers::Offset> l = 0, + flatbuffers::Offset> d = 0, + flatbuffers::Offset>> a = 0, + flatbuffers::Offset> b = 0, + flatbuffers::Offset>> s = 0, + flatbuffers::Offset> shape = 0) { + FlatPropertiesBuilder builder_(_fbb); + builder_.add_shape(shape); + builder_.add_s(s); + builder_.add_b(b); + builder_.add_a(a); + builder_.add_d(d); + builder_.add_l(l); + builder_.add_i(i); + builder_.add_name(name); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateFlatPropertiesDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *name = nullptr, + const std::vector *i = nullptr, + const std::vector *l = nullptr, + const std::vector *d = nullptr, + const std::vector> *a = nullptr, + const std::vector *b = nullptr, + const std::vector> *s = nullptr, + const std::vector *shape = nullptr) { + return sd::graph::CreateFlatProperties( + _fbb, + name ? _fbb.CreateString(name) : 0, + i ? _fbb.CreateVector(*i) : 0, + l ? _fbb.CreateVector(*l) : 0, + d ? _fbb.CreateVector(*d) : 0, + a ? _fbb.CreateVector>(*a) : 0, + b ? _fbb.CreateVector(*b) : 0, + s ? _fbb.CreateVector>(*s) : 0, + shape ? _fbb.CreateVector(*shape) : 0); +} + +inline const sd::graph::FlatProperties *GetFlatProperties(const void *buf) { + return flatbuffers::GetRoot(buf); +} + +inline const sd::graph::FlatProperties *GetSizePrefixedFlatProperties(const void *buf) { + return flatbuffers::GetSizePrefixedRoot(buf); +} + +inline bool VerifyFlatPropertiesBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifyBuffer(nullptr); +} + +inline bool VerifySizePrefixedFlatPropertiesBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifySizePrefixedBuffer(nullptr); +} + +inline void FinishFlatPropertiesBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.Finish(root); +} + +inline void FinishSizePrefixedFlatPropertiesBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.FinishSizePrefixed(root); +} + +} // namespace graph +} // namespace sd + +#endif // FLATBUFFERS_GENERATED_PROPERTIES_ND4J_GRAPH_H_ diff --git a/libnd4j/include/graph/generated/properties_generated.js b/libnd4j/include/graph/generated/properties_generated.js new file mode 100644 index 000000000..e3e1426d4 --- /dev/null +++ b/libnd4j/include/graph/generated/properties_generated.js @@ -0,0 +1,466 @@ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ + +/** + * @const + * @namespace + */ +var nd4j = nd4j || {}; + +/** + * @const + * @namespace + */ +nd4j.graph = nd4j.graph || {}; + +/** + * @constructor + */ +nd4j.graph.FlatProperties = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.FlatProperties} + */ +nd4j.graph.FlatProperties.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.FlatProperties=} obj + * @returns {nd4j.graph.FlatProperties} + */ +nd4j.graph.FlatProperties.getRootAsFlatProperties = function(bb, obj) { + return (obj || new nd4j.graph.FlatProperties).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.FlatProperties.prototype.name = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @param {number} index + * @returns {number} + */ +nd4j.graph.FlatProperties.prototype.i = function(index) { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.readInt32(this.bb.__vector(this.bb_pos + offset) + index * 4) : 0; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatProperties.prototype.iLength = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {Int32Array} + */ +nd4j.graph.FlatProperties.prototype.iArray = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? new Int32Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null; +}; + +/** + * @param {number} index + * @returns {flatbuffers.Long} + */ +nd4j.graph.FlatProperties.prototype.l = function(index) { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? this.bb.readInt64(this.bb.__vector(this.bb_pos + offset) + index * 8) : this.bb.createLong(0, 0); +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatProperties.prototype.lLength = function() { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @returns {number} + */ +nd4j.graph.FlatProperties.prototype.d = function(index) { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? this.bb.readFloat64(this.bb.__vector(this.bb_pos + offset) + index * 8) : 0; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatProperties.prototype.dLength = function() { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {Float64Array} + */ +nd4j.graph.FlatProperties.prototype.dArray = function() { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? new Float64Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null; +}; + +/** + * @param {number} index + * @param {nd4j.graph.FlatArray=} obj + * @returns {nd4j.graph.FlatArray} + */ +nd4j.graph.FlatProperties.prototype.a = function(index, obj) { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? (obj || new nd4j.graph.FlatArray).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatProperties.prototype.aLength = function() { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @returns {boolean} + */ +nd4j.graph.FlatProperties.prototype.b = function(index) { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? !!this.bb.readInt8(this.bb.__vector(this.bb_pos + offset) + index) : false; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatProperties.prototype.bLength = function() { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {Int8Array} + */ +nd4j.graph.FlatProperties.prototype.bArray = function() { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? new Int8Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.FlatProperties.prototype.s = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 16); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatProperties.prototype.sLength = function() { + var offset = this.bb.__offset(this.bb_pos, 16); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @returns {number} + */ +nd4j.graph.FlatProperties.prototype.shape = function(index) { + var offset = this.bb.__offset(this.bb_pos, 18); + return offset ? this.bb.readInt32(this.bb.__vector(this.bb_pos + offset) + index * 4) : 0; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatProperties.prototype.shapeLength = function() { + var offset = this.bb.__offset(this.bb_pos, 18); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {Int32Array} + */ +nd4j.graph.FlatProperties.prototype.shapeArray = function() { + var offset = this.bb.__offset(this.bb_pos, 18); + return offset ? new Int32Array(this.bb.bytes().buffer, this.bb.bytes().byteOffset + this.bb.__vector(this.bb_pos + offset), this.bb.__vector_len(this.bb_pos + offset)) : null; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.FlatProperties.startFlatProperties = function(builder) { + builder.startObject(8); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} nameOffset + */ +nd4j.graph.FlatProperties.addName = function(builder, nameOffset) { + builder.addFieldOffset(0, nameOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} iOffset + */ +nd4j.graph.FlatProperties.addI = function(builder, iOffset) { + builder.addFieldOffset(1, iOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatProperties.createIVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt32(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatProperties.startIVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} lOffset + */ +nd4j.graph.FlatProperties.addL = function(builder, lOffset) { + builder.addFieldOffset(2, lOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatProperties.createLVector = function(builder, data) { + builder.startVector(8, data.length, 8); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt64(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatProperties.startLVector = function(builder, numElems) { + builder.startVector(8, numElems, 8); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} dOffset + */ +nd4j.graph.FlatProperties.addD = function(builder, dOffset) { + builder.addFieldOffset(3, dOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatProperties.createDVector = function(builder, data) { + builder.startVector(8, data.length, 8); + for (var i = data.length - 1; i >= 0; i--) { + builder.addFloat64(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatProperties.startDVector = function(builder, numElems) { + builder.startVector(8, numElems, 8); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} aOffset + */ +nd4j.graph.FlatProperties.addA = function(builder, aOffset) { + builder.addFieldOffset(4, aOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatProperties.createAVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatProperties.startAVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} bOffset + */ +nd4j.graph.FlatProperties.addB = function(builder, bOffset) { + builder.addFieldOffset(5, bOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatProperties.createBVector = function(builder, data) { + builder.startVector(1, data.length, 1); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt8(+data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatProperties.startBVector = function(builder, numElems) { + builder.startVector(1, numElems, 1); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} sOffset + */ +nd4j.graph.FlatProperties.addS = function(builder, sOffset) { + builder.addFieldOffset(6, sOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatProperties.createSVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatProperties.startSVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} shapeOffset + */ +nd4j.graph.FlatProperties.addShape = function(builder, shapeOffset) { + builder.addFieldOffset(7, shapeOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatProperties.createShapeVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt32(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatProperties.startShapeVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatProperties.endFlatProperties = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} offset + */ +nd4j.graph.FlatProperties.finishFlatPropertiesBuffer = function(builder, offset) { + builder.finish(offset); +}; + +// Exports for Node.js and RequireJS +this.nd4j = nd4j; diff --git a/libnd4j/include/graph/generated/request_generated.h b/libnd4j/include/graph/generated/request_generated.h new file mode 100644 index 000000000..00c782311 --- /dev/null +++ b/libnd4j/include/graph/generated/request_generated.h @@ -0,0 +1,127 @@ +// automatically generated by the FlatBuffers compiler, do not modify + + +#ifndef FLATBUFFERS_GENERATED_REQUEST_ND4J_GRAPH_H_ +#define FLATBUFFERS_GENERATED_REQUEST_ND4J_GRAPH_H_ + +#include "flatbuffers/flatbuffers.h" + +#include "array_generated.h" +#include "config_generated.h" +#include "utils_generated.h" +#include "variable_generated.h" + +namespace sd { +namespace graph { + +struct FlatInferenceRequest; + +struct FlatInferenceRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_ID = 4, + VT_VARIABLES = 6, + VT_CONFIGURATION = 8 + }; + int64_t id() const { + return GetField(VT_ID, 0); + } + const flatbuffers::Vector> *variables() const { + return GetPointer> *>(VT_VARIABLES); + } + const FlatConfiguration *configuration() const { + return GetPointer(VT_CONFIGURATION); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ID) && + VerifyOffset(verifier, VT_VARIABLES) && + verifier.VerifyVector(variables()) && + verifier.VerifyVectorOfTables(variables()) && + VerifyOffset(verifier, VT_CONFIGURATION) && + verifier.VerifyTable(configuration()) && + verifier.EndTable(); + } +}; + +struct FlatInferenceRequestBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_id(int64_t id) { + fbb_.AddElement(FlatInferenceRequest::VT_ID, id, 0); + } + void add_variables(flatbuffers::Offset>> variables) { + fbb_.AddOffset(FlatInferenceRequest::VT_VARIABLES, variables); + } + void add_configuration(flatbuffers::Offset configuration) { + fbb_.AddOffset(FlatInferenceRequest::VT_CONFIGURATION, configuration); + } + explicit FlatInferenceRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + FlatInferenceRequestBuilder &operator=(const FlatInferenceRequestBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateFlatInferenceRequest( + flatbuffers::FlatBufferBuilder &_fbb, + int64_t id = 0, + flatbuffers::Offset>> variables = 0, + flatbuffers::Offset configuration = 0) { + FlatInferenceRequestBuilder builder_(_fbb); + builder_.add_id(id); + builder_.add_configuration(configuration); + builder_.add_variables(variables); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateFlatInferenceRequestDirect( + flatbuffers::FlatBufferBuilder &_fbb, + int64_t id = 0, + const std::vector> *variables = nullptr, + flatbuffers::Offset configuration = 0) { + return sd::graph::CreateFlatInferenceRequest( + _fbb, + id, + variables ? _fbb.CreateVector>(*variables) : 0, + configuration); +} + +inline const sd::graph::FlatInferenceRequest *GetFlatInferenceRequest(const void *buf) { + return flatbuffers::GetRoot(buf); +} + +inline const sd::graph::FlatInferenceRequest *GetSizePrefixedFlatInferenceRequest(const void *buf) { + return flatbuffers::GetSizePrefixedRoot(buf); +} + +inline bool VerifyFlatInferenceRequestBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifyBuffer(nullptr); +} + +inline bool VerifySizePrefixedFlatInferenceRequestBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifySizePrefixedBuffer(nullptr); +} + +inline void FinishFlatInferenceRequestBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.Finish(root); +} + +inline void FinishSizePrefixedFlatInferenceRequestBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.FinishSizePrefixed(root); +} + +} // namespace graph +} // namespace sd + +#endif // FLATBUFFERS_GENERATED_REQUEST_ND4J_GRAPH_H_ diff --git a/libnd4j/include/graph/generated/request_generated.js b/libnd4j/include/graph/generated/request_generated.js new file mode 100644 index 000000000..98930a58f --- /dev/null +++ b/libnd4j/include/graph/generated/request_generated.js @@ -0,0 +1,173 @@ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ + +/** + * @const + * @namespace + */ +var nd4j = nd4j || {}; + +/** + * @const + * @namespace + */ +nd4j.graph = nd4j.graph || {}; + +/** + * @constructor + */ +nd4j.graph.FlatInferenceRequest = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.FlatInferenceRequest} + */ +nd4j.graph.FlatInferenceRequest.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.FlatInferenceRequest=} obj + * @returns {nd4j.graph.FlatInferenceRequest} + */ +nd4j.graph.FlatInferenceRequest.getRootAsFlatInferenceRequest = function(bb, obj) { + return (obj || new nd4j.graph.FlatInferenceRequest).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.FlatInferenceRequest.prototype.id = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @param {number} index + * @param {nd4j.graph.FlatVariable=} obj + * @returns {nd4j.graph.FlatVariable} + */ +nd4j.graph.FlatInferenceRequest.prototype.variables = function(index, obj) { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? (obj || new nd4j.graph.FlatVariable).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatInferenceRequest.prototype.variablesLength = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {nd4j.graph.FlatConfiguration=} obj + * @returns {nd4j.graph.FlatConfiguration|null} + */ +nd4j.graph.FlatInferenceRequest.prototype.configuration = function(obj) { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? (obj || new nd4j.graph.FlatConfiguration).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.FlatInferenceRequest.startFlatInferenceRequest = function(builder) { + builder.startObject(3); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} id + */ +nd4j.graph.FlatInferenceRequest.addId = function(builder, id) { + builder.addFieldInt64(0, id, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} variablesOffset + */ +nd4j.graph.FlatInferenceRequest.addVariables = function(builder, variablesOffset) { + builder.addFieldOffset(1, variablesOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatInferenceRequest.createVariablesVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatInferenceRequest.startVariablesVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} configurationOffset + */ +nd4j.graph.FlatInferenceRequest.addConfiguration = function(builder, configurationOffset) { + builder.addFieldOffset(2, configurationOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatInferenceRequest.endFlatInferenceRequest = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} offset + */ +nd4j.graph.FlatInferenceRequest.finishFlatInferenceRequestBuffer = function(builder, offset) { + builder.finish(offset); +}; + +// Exports for Node.js and RequireJS +this.nd4j = nd4j; diff --git a/libnd4j/include/graph/generated/result_generated.h b/libnd4j/include/graph/generated/result_generated.h new file mode 100644 index 000000000..04c458a9f --- /dev/null +++ b/libnd4j/include/graph/generated/result_generated.h @@ -0,0 +1,229 @@ +// automatically generated by the FlatBuffers compiler, do not modify + + +#ifndef FLATBUFFERS_GENERATED_RESULT_ND4J_GRAPH_H_ +#define FLATBUFFERS_GENERATED_RESULT_ND4J_GRAPH_H_ + +#include "flatbuffers/flatbuffers.h" + +#include "array_generated.h" +#include "node_generated.h" +#include "properties_generated.h" +#include "utils_generated.h" +#include "variable_generated.h" + +namespace sd { +namespace graph { + +struct FlatTiming; + +struct FlatResult; + +struct FlatTiming FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_ID = 4, + VT_NAME = 6, + VT_TIMING = 8 + }; + int32_t id() const { + return GetField(VT_ID, 0); + } + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); + } + const LongPair *timing() const { + return GetPointer(VT_TIMING); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ID) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyOffset(verifier, VT_TIMING) && + verifier.VerifyTable(timing()) && + verifier.EndTable(); + } +}; + +struct FlatTimingBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_id(int32_t id) { + fbb_.AddElement(FlatTiming::VT_ID, id, 0); + } + void add_name(flatbuffers::Offset name) { + fbb_.AddOffset(FlatTiming::VT_NAME, name); + } + void add_timing(flatbuffers::Offset timing) { + fbb_.AddOffset(FlatTiming::VT_TIMING, timing); + } + explicit FlatTimingBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + FlatTimingBuilder &operator=(const FlatTimingBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateFlatTiming( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t id = 0, + flatbuffers::Offset name = 0, + flatbuffers::Offset timing = 0) { + FlatTimingBuilder builder_(_fbb); + builder_.add_timing(timing); + builder_.add_name(name); + builder_.add_id(id); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateFlatTimingDirect( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t id = 0, + const char *name = nullptr, + flatbuffers::Offset timing = 0) { + return sd::graph::CreateFlatTiming( + _fbb, + id, + name ? _fbb.CreateString(name) : 0, + timing); +} + +struct FlatResult FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_ID = 4, + VT_VARIABLES = 6, + VT_TIMING = 8, + VT_FOOTPRINTFORWARD = 10, + VT_FOOTPRINTBACKWARD = 12 + }; + int64_t id() const { + return GetField(VT_ID, 0); + } + const flatbuffers::Vector> *variables() const { + return GetPointer> *>(VT_VARIABLES); + } + const flatbuffers::Vector> *timing() const { + return GetPointer> *>(VT_TIMING); + } + int64_t footprintForward() const { + return GetField(VT_FOOTPRINTFORWARD, 0); + } + int64_t footprintBackward() const { + return GetField(VT_FOOTPRINTBACKWARD, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ID) && + VerifyOffset(verifier, VT_VARIABLES) && + verifier.VerifyVector(variables()) && + verifier.VerifyVectorOfTables(variables()) && + VerifyOffset(verifier, VT_TIMING) && + verifier.VerifyVector(timing()) && + verifier.VerifyVectorOfTables(timing()) && + VerifyField(verifier, VT_FOOTPRINTFORWARD) && + VerifyField(verifier, VT_FOOTPRINTBACKWARD) && + verifier.EndTable(); + } +}; + +struct FlatResultBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_id(int64_t id) { + fbb_.AddElement(FlatResult::VT_ID, id, 0); + } + void add_variables(flatbuffers::Offset>> variables) { + fbb_.AddOffset(FlatResult::VT_VARIABLES, variables); + } + void add_timing(flatbuffers::Offset>> timing) { + fbb_.AddOffset(FlatResult::VT_TIMING, timing); + } + void add_footprintForward(int64_t footprintForward) { + fbb_.AddElement(FlatResult::VT_FOOTPRINTFORWARD, footprintForward, 0); + } + void add_footprintBackward(int64_t footprintBackward) { + fbb_.AddElement(FlatResult::VT_FOOTPRINTBACKWARD, footprintBackward, 0); + } + explicit FlatResultBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + FlatResultBuilder &operator=(const FlatResultBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateFlatResult( + flatbuffers::FlatBufferBuilder &_fbb, + int64_t id = 0, + flatbuffers::Offset>> variables = 0, + flatbuffers::Offset>> timing = 0, + int64_t footprintForward = 0, + int64_t footprintBackward = 0) { + FlatResultBuilder builder_(_fbb); + builder_.add_footprintBackward(footprintBackward); + builder_.add_footprintForward(footprintForward); + builder_.add_id(id); + builder_.add_timing(timing); + builder_.add_variables(variables); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateFlatResultDirect( + flatbuffers::FlatBufferBuilder &_fbb, + int64_t id = 0, + const std::vector> *variables = nullptr, + const std::vector> *timing = nullptr, + int64_t footprintForward = 0, + int64_t footprintBackward = 0) { + return sd::graph::CreateFlatResult( + _fbb, + id, + variables ? _fbb.CreateVector>(*variables) : 0, + timing ? _fbb.CreateVector>(*timing) : 0, + footprintForward, + footprintBackward); +} + +inline const sd::graph::FlatResult *GetFlatResult(const void *buf) { + return flatbuffers::GetRoot(buf); +} + +inline const sd::graph::FlatResult *GetSizePrefixedFlatResult(const void *buf) { + return flatbuffers::GetSizePrefixedRoot(buf); +} + +inline bool VerifyFlatResultBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifyBuffer(nullptr); +} + +inline bool VerifySizePrefixedFlatResultBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifySizePrefixedBuffer(nullptr); +} + +inline void FinishFlatResultBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.Finish(root); +} + +inline void FinishSizePrefixedFlatResultBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.FinishSizePrefixed(root); +} + +} // namespace graph +} // namespace sd + +#endif // FLATBUFFERS_GENERATED_RESULT_ND4J_GRAPH_H_ diff --git a/libnd4j/include/graph/generated/result_generated.js b/libnd4j/include/graph/generated/result_generated.js new file mode 100644 index 000000000..4cf13ebd8 --- /dev/null +++ b/libnd4j/include/graph/generated/result_generated.js @@ -0,0 +1,336 @@ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ + +/** + * @const + * @namespace + */ +var nd4j = nd4j || {}; + +/** + * @const + * @namespace + */ +nd4j.graph = nd4j.graph || {}; + +/** + * @constructor + */ +nd4j.graph.FlatTiming = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.FlatTiming} + */ +nd4j.graph.FlatTiming.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.FlatTiming=} obj + * @returns {nd4j.graph.FlatTiming} + */ +nd4j.graph.FlatTiming.getRootAsFlatTiming = function(bb, obj) { + return (obj || new nd4j.graph.FlatTiming).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatTiming.prototype.id = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.FlatTiming.prototype.name = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @param {nd4j.graph.LongPair=} obj + * @returns {nd4j.graph.LongPair|null} + */ +nd4j.graph.FlatTiming.prototype.timing = function(obj) { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? (obj || new nd4j.graph.LongPair).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.FlatTiming.startFlatTiming = function(builder) { + builder.startObject(3); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} id + */ +nd4j.graph.FlatTiming.addId = function(builder, id) { + builder.addFieldInt32(0, id, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} nameOffset + */ +nd4j.graph.FlatTiming.addName = function(builder, nameOffset) { + builder.addFieldOffset(1, nameOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} timingOffset + */ +nd4j.graph.FlatTiming.addTiming = function(builder, timingOffset) { + builder.addFieldOffset(2, timingOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatTiming.endFlatTiming = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @constructor + */ +nd4j.graph.FlatResult = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.FlatResult} + */ +nd4j.graph.FlatResult.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.FlatResult=} obj + * @returns {nd4j.graph.FlatResult} + */ +nd4j.graph.FlatResult.getRootAsFlatResult = function(bb, obj) { + return (obj || new nd4j.graph.FlatResult).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.FlatResult.prototype.id = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @param {number} index + * @param {nd4j.graph.FlatVariable=} obj + * @returns {nd4j.graph.FlatVariable} + */ +nd4j.graph.FlatResult.prototype.variables = function(index, obj) { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? (obj || new nd4j.graph.FlatVariable).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatResult.prototype.variablesLength = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {nd4j.graph.FlatTiming=} obj + * @returns {nd4j.graph.FlatTiming} + */ +nd4j.graph.FlatResult.prototype.timing = function(index, obj) { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? (obj || new nd4j.graph.FlatTiming).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatResult.prototype.timingLength = function() { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.FlatResult.prototype.footprintForward = function() { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.FlatResult.prototype.footprintBackward = function() { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.FlatResult.startFlatResult = function(builder) { + builder.startObject(5); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} id + */ +nd4j.graph.FlatResult.addId = function(builder, id) { + builder.addFieldInt64(0, id, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} variablesOffset + */ +nd4j.graph.FlatResult.addVariables = function(builder, variablesOffset) { + builder.addFieldOffset(1, variablesOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatResult.createVariablesVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatResult.startVariablesVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} timingOffset + */ +nd4j.graph.FlatResult.addTiming = function(builder, timingOffset) { + builder.addFieldOffset(2, timingOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatResult.createTimingVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatResult.startTimingVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} footprintForward + */ +nd4j.graph.FlatResult.addFootprintForward = function(builder, footprintForward) { + builder.addFieldInt64(3, footprintForward, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} footprintBackward + */ +nd4j.graph.FlatResult.addFootprintBackward = function(builder, footprintBackward) { + builder.addFieldInt64(4, footprintBackward, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatResult.endFlatResult = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} offset + */ +nd4j.graph.FlatResult.finishFlatResultBuffer = function(builder, offset) { + builder.finish(offset); +}; + +// Exports for Node.js and RequireJS +this.nd4j = nd4j; diff --git a/libnd4j/include/graph/generated/uigraphevents_generated.h b/libnd4j/include/graph/generated/uigraphevents_generated.h new file mode 100644 index 000000000..b3430a5c7 --- /dev/null +++ b/libnd4j/include/graph/generated/uigraphevents_generated.h @@ -0,0 +1,752 @@ +// automatically generated by the FlatBuffers compiler, do not modify + + +#ifndef FLATBUFFERS_GENERATED_UIGRAPHEVENTS_ND4J_GRAPH_H_ +#define FLATBUFFERS_GENERATED_UIGRAPHEVENTS_ND4J_GRAPH_H_ + +#include "flatbuffers/flatbuffers.h" + +#include "array_generated.h" + +namespace sd { +namespace graph { + +struct UIEvent; + +struct FrameIteration; + +struct UIAddName; + +struct FlatArrayList; + +struct UIHistogram; + +struct UISummaryStatistics; + +struct UIHardwareState; + +enum UIEventType { + UIEventType_ADD_NAME = 0, + UIEventType_SCALAR = 1, + UIEventType_ARRAY = 2, + UIEventType_ARRAY_LIST = 3, + UIEventType_HISTOGRAM = 4, + UIEventType_IMAGE = 5, + UIEventType_SUMMARY_STATISTICS = 6, + UIEventType_OP_TIMING = 7, + UIEventType_HARDWARE_STATE = 8, + UIEventType_MIN = UIEventType_ADD_NAME, + UIEventType_MAX = UIEventType_HARDWARE_STATE +}; + +inline const UIEventType (&EnumValuesUIEventType())[9] { + static const UIEventType values[] = { + UIEventType_ADD_NAME, + UIEventType_SCALAR, + UIEventType_ARRAY, + UIEventType_ARRAY_LIST, + UIEventType_HISTOGRAM, + UIEventType_IMAGE, + UIEventType_SUMMARY_STATISTICS, + UIEventType_OP_TIMING, + UIEventType_HARDWARE_STATE + }; + return values; +} + +inline const char * const *EnumNamesUIEventType() { + static const char * const names[] = { + "ADD_NAME", + "SCALAR", + "ARRAY", + "ARRAY_LIST", + "HISTOGRAM", + "IMAGE", + "SUMMARY_STATISTICS", + "OP_TIMING", + "HARDWARE_STATE", + nullptr + }; + return names; +} + +inline const char *EnumNameUIEventType(UIEventType e) { + const size_t index = static_cast(e); + return EnumNamesUIEventType()[index]; +} + +enum UIEventSubtype { + UIEventSubtype_NONE = 0, + UIEventSubtype_EVALUATION = 1, + UIEventSubtype_LOSS = 2, + UIEventSubtype_LEARNING_RATE = 3, + UIEventSubtype_TUNING_METRIC = 4, + UIEventSubtype_PERFORMANCE = 5, + UIEventSubtype_PROFILING = 6, + UIEventSubtype_FEATURE_LABEL = 7, + UIEventSubtype_PREDICTION = 8, + UIEventSubtype_USER_CUSTOM = 9, + UIEventSubtype_MIN = UIEventSubtype_NONE, + UIEventSubtype_MAX = UIEventSubtype_USER_CUSTOM +}; + +inline const UIEventSubtype (&EnumValuesUIEventSubtype())[10] { + static const UIEventSubtype values[] = { + UIEventSubtype_NONE, + UIEventSubtype_EVALUATION, + UIEventSubtype_LOSS, + UIEventSubtype_LEARNING_RATE, + UIEventSubtype_TUNING_METRIC, + UIEventSubtype_PERFORMANCE, + UIEventSubtype_PROFILING, + UIEventSubtype_FEATURE_LABEL, + UIEventSubtype_PREDICTION, + UIEventSubtype_USER_CUSTOM + }; + return values; +} + +inline const char * const *EnumNamesUIEventSubtype() { + static const char * const names[] = { + "NONE", + "EVALUATION", + "LOSS", + "LEARNING_RATE", + "TUNING_METRIC", + "PERFORMANCE", + "PROFILING", + "FEATURE_LABEL", + "PREDICTION", + "USER_CUSTOM", + nullptr + }; + return names; +} + +inline const char *EnumNameUIEventSubtype(UIEventSubtype e) { + const size_t index = static_cast(e); + return EnumNamesUIEventSubtype()[index]; +} + +enum UIHistogramType { + UIHistogramType_DISCRETE = 0, + UIHistogramType_EQUAL_SPACING = 1, + UIHistogramType_CUSTOM = 2, + UIHistogramType_MIN = UIHistogramType_DISCRETE, + UIHistogramType_MAX = UIHistogramType_CUSTOM +}; + +inline const UIHistogramType (&EnumValuesUIHistogramType())[3] { + static const UIHistogramType values[] = { + UIHistogramType_DISCRETE, + UIHistogramType_EQUAL_SPACING, + UIHistogramType_CUSTOM + }; + return values; +} + +inline const char * const *EnumNamesUIHistogramType() { + static const char * const names[] = { + "DISCRETE", + "EQUAL_SPACING", + "CUSTOM", + nullptr + }; + return names; +} + +inline const char *EnumNameUIHistogramType(UIHistogramType e) { + const size_t index = static_cast(e); + return EnumNamesUIHistogramType()[index]; +} + +struct UIEvent FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_EVENTTYPE = 4, + VT_EVENTSUBTYPE = 6, + VT_NAMEIDX = 8, + VT_TIMESTAMP = 10, + VT_ITERATION = 12, + VT_EPOCH = 14, + VT_VARIABLEID = 16, + VT_FRAMEITER = 18, + VT_PLUGIN = 20 + }; + UIEventType eventType() const { + return static_cast(GetField(VT_EVENTTYPE, 0)); + } + UIEventSubtype eventSubType() const { + return static_cast(GetField(VT_EVENTSUBTYPE, 0)); + } + int32_t nameIdx() const { + return GetField(VT_NAMEIDX, 0); + } + int64_t timestamp() const { + return GetField(VT_TIMESTAMP, 0); + } + int32_t iteration() const { + return GetField(VT_ITERATION, 0); + } + int32_t epoch() const { + return GetField(VT_EPOCH, 0); + } + int16_t variableId() const { + return GetField(VT_VARIABLEID, 0); + } + const FrameIteration *frameIter() const { + return GetPointer(VT_FRAMEITER); + } + uint16_t plugin() const { + return GetField(VT_PLUGIN, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_EVENTTYPE) && + VerifyField(verifier, VT_EVENTSUBTYPE) && + VerifyField(verifier, VT_NAMEIDX) && + VerifyField(verifier, VT_TIMESTAMP) && + VerifyField(verifier, VT_ITERATION) && + VerifyField(verifier, VT_EPOCH) && + VerifyField(verifier, VT_VARIABLEID) && + VerifyOffset(verifier, VT_FRAMEITER) && + verifier.VerifyTable(frameIter()) && + VerifyField(verifier, VT_PLUGIN) && + verifier.EndTable(); + } +}; + +struct UIEventBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_eventType(UIEventType eventType) { + fbb_.AddElement(UIEvent::VT_EVENTTYPE, static_cast(eventType), 0); + } + void add_eventSubType(UIEventSubtype eventSubType) { + fbb_.AddElement(UIEvent::VT_EVENTSUBTYPE, static_cast(eventSubType), 0); + } + void add_nameIdx(int32_t nameIdx) { + fbb_.AddElement(UIEvent::VT_NAMEIDX, nameIdx, 0); + } + void add_timestamp(int64_t timestamp) { + fbb_.AddElement(UIEvent::VT_TIMESTAMP, timestamp, 0); + } + void add_iteration(int32_t iteration) { + fbb_.AddElement(UIEvent::VT_ITERATION, iteration, 0); + } + void add_epoch(int32_t epoch) { + fbb_.AddElement(UIEvent::VT_EPOCH, epoch, 0); + } + void add_variableId(int16_t variableId) { + fbb_.AddElement(UIEvent::VT_VARIABLEID, variableId, 0); + } + void add_frameIter(flatbuffers::Offset frameIter) { + fbb_.AddOffset(UIEvent::VT_FRAMEITER, frameIter); + } + void add_plugin(uint16_t plugin) { + fbb_.AddElement(UIEvent::VT_PLUGIN, plugin, 0); + } + explicit UIEventBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + UIEventBuilder &operator=(const UIEventBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUIEvent( + flatbuffers::FlatBufferBuilder &_fbb, + UIEventType eventType = UIEventType_ADD_NAME, + UIEventSubtype eventSubType = UIEventSubtype_NONE, + int32_t nameIdx = 0, + int64_t timestamp = 0, + int32_t iteration = 0, + int32_t epoch = 0, + int16_t variableId = 0, + flatbuffers::Offset frameIter = 0, + uint16_t plugin = 0) { + UIEventBuilder builder_(_fbb); + builder_.add_timestamp(timestamp); + builder_.add_frameIter(frameIter); + builder_.add_epoch(epoch); + builder_.add_iteration(iteration); + builder_.add_nameIdx(nameIdx); + builder_.add_plugin(plugin); + builder_.add_variableId(variableId); + builder_.add_eventSubType(eventSubType); + builder_.add_eventType(eventType); + return builder_.Finish(); +} + +struct FrameIteration FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_FRAME = 4, + VT_ITERATION = 6 + }; + const flatbuffers::String *frame() const { + return GetPointer(VT_FRAME); + } + uint16_t iteration() const { + return GetField(VT_ITERATION, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_FRAME) && + verifier.VerifyString(frame()) && + VerifyField(verifier, VT_ITERATION) && + verifier.EndTable(); + } +}; + +struct FrameIterationBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_frame(flatbuffers::Offset frame) { + fbb_.AddOffset(FrameIteration::VT_FRAME, frame); + } + void add_iteration(uint16_t iteration) { + fbb_.AddElement(FrameIteration::VT_ITERATION, iteration, 0); + } + explicit FrameIterationBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + FrameIterationBuilder &operator=(const FrameIterationBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateFrameIteration( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset frame = 0, + uint16_t iteration = 0) { + FrameIterationBuilder builder_(_fbb); + builder_.add_frame(frame); + builder_.add_iteration(iteration); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateFrameIterationDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *frame = nullptr, + uint16_t iteration = 0) { + return sd::graph::CreateFrameIteration( + _fbb, + frame ? _fbb.CreateString(frame) : 0, + iteration); +} + +struct UIAddName FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_NAMEIDX = 4, + VT_NAME = 6 + }; + int32_t nameIdx() const { + return GetField(VT_NAMEIDX, 0); + } + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_NAMEIDX) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && + verifier.EndTable(); + } +}; + +struct UIAddNameBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_nameIdx(int32_t nameIdx) { + fbb_.AddElement(UIAddName::VT_NAMEIDX, nameIdx, 0); + } + void add_name(flatbuffers::Offset name) { + fbb_.AddOffset(UIAddName::VT_NAME, name); + } + explicit UIAddNameBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + UIAddNameBuilder &operator=(const UIAddNameBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUIAddName( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t nameIdx = 0, + flatbuffers::Offset name = 0) { + UIAddNameBuilder builder_(_fbb); + builder_.add_name(name); + builder_.add_nameIdx(nameIdx); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateUIAddNameDirect( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t nameIdx = 0, + const char *name = nullptr) { + return sd::graph::CreateUIAddName( + _fbb, + nameIdx, + name ? _fbb.CreateString(name) : 0); +} + +struct FlatArrayList FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_LIST = 4 + }; + const flatbuffers::Vector> *list() const { + return GetPointer> *>(VT_LIST); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_LIST) && + verifier.VerifyVector(list()) && + verifier.VerifyVectorOfTables(list()) && + verifier.EndTable(); + } +}; + +struct FlatArrayListBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_list(flatbuffers::Offset>> list) { + fbb_.AddOffset(FlatArrayList::VT_LIST, list); + } + explicit FlatArrayListBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + FlatArrayListBuilder &operator=(const FlatArrayListBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateFlatArrayList( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset>> list = 0) { + FlatArrayListBuilder builder_(_fbb); + builder_.add_list(list); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateFlatArrayListDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector> *list = nullptr) { + return sd::graph::CreateFlatArrayList( + _fbb, + list ? _fbb.CreateVector>(*list) : 0); +} + +struct UIHistogram FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_TYPE = 4, + VT_NUMBINS = 6, + VT_BINRANGES = 8, + VT_Y = 10, + VT_BINLABELS = 12 + }; + UIHistogramType type() const { + return static_cast(GetField(VT_TYPE, 0)); + } + uint32_t numbins() const { + return GetField(VT_NUMBINS, 0); + } + const FlatArray *binranges() const { + return GetPointer(VT_BINRANGES); + } + const FlatArray *y() const { + return GetPointer(VT_Y); + } + const flatbuffers::Vector> *binlabels() const { + return GetPointer> *>(VT_BINLABELS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_TYPE) && + VerifyField(verifier, VT_NUMBINS) && + VerifyOffset(verifier, VT_BINRANGES) && + verifier.VerifyTable(binranges()) && + VerifyOffset(verifier, VT_Y) && + verifier.VerifyTable(y()) && + VerifyOffset(verifier, VT_BINLABELS) && + verifier.VerifyVector(binlabels()) && + verifier.VerifyVectorOfStrings(binlabels()) && + verifier.EndTable(); + } +}; + +struct UIHistogramBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_type(UIHistogramType type) { + fbb_.AddElement(UIHistogram::VT_TYPE, static_cast(type), 0); + } + void add_numbins(uint32_t numbins) { + fbb_.AddElement(UIHistogram::VT_NUMBINS, numbins, 0); + } + void add_binranges(flatbuffers::Offset binranges) { + fbb_.AddOffset(UIHistogram::VT_BINRANGES, binranges); + } + void add_y(flatbuffers::Offset y) { + fbb_.AddOffset(UIHistogram::VT_Y, y); + } + void add_binlabels(flatbuffers::Offset>> binlabels) { + fbb_.AddOffset(UIHistogram::VT_BINLABELS, binlabels); + } + explicit UIHistogramBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + UIHistogramBuilder &operator=(const UIHistogramBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUIHistogram( + flatbuffers::FlatBufferBuilder &_fbb, + UIHistogramType type = UIHistogramType_DISCRETE, + uint32_t numbins = 0, + flatbuffers::Offset binranges = 0, + flatbuffers::Offset y = 0, + flatbuffers::Offset>> binlabels = 0) { + UIHistogramBuilder builder_(_fbb); + builder_.add_binlabels(binlabels); + builder_.add_y(y); + builder_.add_binranges(binranges); + builder_.add_numbins(numbins); + builder_.add_type(type); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateUIHistogramDirect( + flatbuffers::FlatBufferBuilder &_fbb, + UIHistogramType type = UIHistogramType_DISCRETE, + uint32_t numbins = 0, + flatbuffers::Offset binranges = 0, + flatbuffers::Offset y = 0, + const std::vector> *binlabels = nullptr) { + return sd::graph::CreateUIHistogram( + _fbb, + type, + numbins, + binranges, + y, + binlabels ? _fbb.CreateVector>(*binlabels) : 0); +} + +struct UISummaryStatistics FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_BITMASK = 4, + VT_MIN = 6, + VT_MAX = 8, + VT_MEAN = 10, + VT_STDEV = 12, + VT_COUNTZERO = 14, + VT_COUNTPOSITIVE = 16, + VT_COUNTNEGATIVE = 18, + VT_COUNTNAN = 20, + VT_COUNTINF = 22 + }; + uint32_t bitmask() const { + return GetField(VT_BITMASK, 0); + } + const FlatArray *min() const { + return GetPointer(VT_MIN); + } + const FlatArray *max() const { + return GetPointer(VT_MAX); + } + double mean() const { + return GetField(VT_MEAN, 0.0); + } + double stdev() const { + return GetField(VT_STDEV, 0.0); + } + int64_t countzero() const { + return GetField(VT_COUNTZERO, 0); + } + int64_t countpositive() const { + return GetField(VT_COUNTPOSITIVE, 0); + } + int64_t countnegative() const { + return GetField(VT_COUNTNEGATIVE, 0); + } + int64_t countnan() const { + return GetField(VT_COUNTNAN, 0); + } + int64_t countinf() const { + return GetField(VT_COUNTINF, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_BITMASK) && + VerifyOffset(verifier, VT_MIN) && + verifier.VerifyTable(min()) && + VerifyOffset(verifier, VT_MAX) && + verifier.VerifyTable(max()) && + VerifyField(verifier, VT_MEAN) && + VerifyField(verifier, VT_STDEV) && + VerifyField(verifier, VT_COUNTZERO) && + VerifyField(verifier, VT_COUNTPOSITIVE) && + VerifyField(verifier, VT_COUNTNEGATIVE) && + VerifyField(verifier, VT_COUNTNAN) && + VerifyField(verifier, VT_COUNTINF) && + verifier.EndTable(); + } +}; + +struct UISummaryStatisticsBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_bitmask(uint32_t bitmask) { + fbb_.AddElement(UISummaryStatistics::VT_BITMASK, bitmask, 0); + } + void add_min(flatbuffers::Offset min) { + fbb_.AddOffset(UISummaryStatistics::VT_MIN, min); + } + void add_max(flatbuffers::Offset max) { + fbb_.AddOffset(UISummaryStatistics::VT_MAX, max); + } + void add_mean(double mean) { + fbb_.AddElement(UISummaryStatistics::VT_MEAN, mean, 0.0); + } + void add_stdev(double stdev) { + fbb_.AddElement(UISummaryStatistics::VT_STDEV, stdev, 0.0); + } + void add_countzero(int64_t countzero) { + fbb_.AddElement(UISummaryStatistics::VT_COUNTZERO, countzero, 0); + } + void add_countpositive(int64_t countpositive) { + fbb_.AddElement(UISummaryStatistics::VT_COUNTPOSITIVE, countpositive, 0); + } + void add_countnegative(int64_t countnegative) { + fbb_.AddElement(UISummaryStatistics::VT_COUNTNEGATIVE, countnegative, 0); + } + void add_countnan(int64_t countnan) { + fbb_.AddElement(UISummaryStatistics::VT_COUNTNAN, countnan, 0); + } + void add_countinf(int64_t countinf) { + fbb_.AddElement(UISummaryStatistics::VT_COUNTINF, countinf, 0); + } + explicit UISummaryStatisticsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + UISummaryStatisticsBuilder &operator=(const UISummaryStatisticsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUISummaryStatistics( + flatbuffers::FlatBufferBuilder &_fbb, + uint32_t bitmask = 0, + flatbuffers::Offset min = 0, + flatbuffers::Offset max = 0, + double mean = 0.0, + double stdev = 0.0, + int64_t countzero = 0, + int64_t countpositive = 0, + int64_t countnegative = 0, + int64_t countnan = 0, + int64_t countinf = 0) { + UISummaryStatisticsBuilder builder_(_fbb); + builder_.add_countinf(countinf); + builder_.add_countnan(countnan); + builder_.add_countnegative(countnegative); + builder_.add_countpositive(countpositive); + builder_.add_countzero(countzero); + builder_.add_stdev(stdev); + builder_.add_mean(mean); + builder_.add_max(max); + builder_.add_min(min); + builder_.add_bitmask(bitmask); + return builder_.Finish(); +} + +struct UIHardwareState FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_GPUMEMORY = 4, + VT_HOSTMEMORY = 6 + }; + const flatbuffers::Vector *gpuMemory() const { + return GetPointer *>(VT_GPUMEMORY); + } + int64_t hostMemory() const { + return GetField(VT_HOSTMEMORY, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_GPUMEMORY) && + verifier.VerifyVector(gpuMemory()) && + VerifyField(verifier, VT_HOSTMEMORY) && + verifier.EndTable(); + } +}; + +struct UIHardwareStateBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_gpuMemory(flatbuffers::Offset> gpuMemory) { + fbb_.AddOffset(UIHardwareState::VT_GPUMEMORY, gpuMemory); + } + void add_hostMemory(int64_t hostMemory) { + fbb_.AddElement(UIHardwareState::VT_HOSTMEMORY, hostMemory, 0); + } + explicit UIHardwareStateBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + UIHardwareStateBuilder &operator=(const UIHardwareStateBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUIHardwareState( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> gpuMemory = 0, + int64_t hostMemory = 0) { + UIHardwareStateBuilder builder_(_fbb); + builder_.add_hostMemory(hostMemory); + builder_.add_gpuMemory(gpuMemory); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateUIHardwareStateDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *gpuMemory = nullptr, + int64_t hostMemory = 0) { + return sd::graph::CreateUIHardwareState( + _fbb, + gpuMemory ? _fbb.CreateVector(*gpuMemory) : 0, + hostMemory); +} + +} // namespace graph +} // namespace sd + +#endif // FLATBUFFERS_GENERATED_UIGRAPHEVENTS_ND4J_GRAPH_H_ diff --git a/libnd4j/include/graph/generated/uigraphevents_generated.js b/libnd4j/include/graph/generated/uigraphevents_generated.js new file mode 100644 index 000000000..f6a7f4117 --- /dev/null +++ b/libnd4j/include/graph/generated/uigraphevents_generated.js @@ -0,0 +1,1026 @@ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ + +/** + * @const + * @namespace + */ +var nd4j = nd4j || {}; + +/** + * @const + * @namespace + */ +nd4j.graph = nd4j.graph || {}; + +/** + * @enum + */ +nd4j.graph.UIEventType = { + ADD_NAME: 0, + SCALAR: 1, + ARRAY: 2, + ARRAY_LIST: 3, + HISTOGRAM: 4, + IMAGE: 5, + SUMMARY_STATISTICS: 6, + OP_TIMING: 7, + HARDWARE_STATE: 8 +}; + +/** + * @enum + */ +nd4j.graph.UIEventSubtype = { + NONE: 0, + EVALUATION: 1, + LOSS: 2, + LEARNING_RATE: 3, + TUNING_METRIC: 4, + PERFORMANCE: 5, + PROFILING: 6, + FEATURE_LABEL: 7, + PREDICTION: 8, + USER_CUSTOM: 9 +}; + +/** + * @enum + */ +nd4j.graph.UIHistogramType = { + DISCRETE: 0, + EQUAL_SPACING: 1, + CUSTOM: 2 +}; + +/** + * @constructor + */ +nd4j.graph.UIEvent = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.UIEvent} + */ +nd4j.graph.UIEvent.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.UIEvent=} obj + * @returns {nd4j.graph.UIEvent} + */ +nd4j.graph.UIEvent.getRootAsUIEvent = function(bb, obj) { + return (obj || new nd4j.graph.UIEvent).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {nd4j.graph.UIEventType} + */ +nd4j.graph.UIEvent.prototype.eventType = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? /** @type {nd4j.graph.UIEventType} */ (this.bb.readInt8(this.bb_pos + offset)) : nd4j.graph.UIEventType.ADD_NAME; +}; + +/** + * @returns {nd4j.graph.UIEventSubtype} + */ +nd4j.graph.UIEvent.prototype.eventSubType = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? /** @type {nd4j.graph.UIEventSubtype} */ (this.bb.readInt8(this.bb_pos + offset)) : nd4j.graph.UIEventSubtype.NONE; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIEvent.prototype.nameIdx = function() { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.UIEvent.prototype.timestamp = function() { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @returns {number} + */ +nd4j.graph.UIEvent.prototype.iteration = function() { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIEvent.prototype.epoch = function() { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIEvent.prototype.variableId = function() { + var offset = this.bb.__offset(this.bb_pos, 16); + return offset ? this.bb.readInt16(this.bb_pos + offset) : 0; +}; + +/** + * @param {nd4j.graph.FrameIteration=} obj + * @returns {nd4j.graph.FrameIteration|null} + */ +nd4j.graph.UIEvent.prototype.frameIter = function(obj) { + var offset = this.bb.__offset(this.bb_pos, 18); + return offset ? (obj || new nd4j.graph.FrameIteration).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIEvent.prototype.plugin = function() { + var offset = this.bb.__offset(this.bb_pos, 20); + return offset ? this.bb.readUint16(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.UIEvent.startUIEvent = function(builder) { + builder.startObject(9); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {nd4j.graph.UIEventType} eventType + */ +nd4j.graph.UIEvent.addEventType = function(builder, eventType) { + builder.addFieldInt8(0, eventType, nd4j.graph.UIEventType.ADD_NAME); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {nd4j.graph.UIEventSubtype} eventSubType + */ +nd4j.graph.UIEvent.addEventSubType = function(builder, eventSubType) { + builder.addFieldInt8(1, eventSubType, nd4j.graph.UIEventSubtype.NONE); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} nameIdx + */ +nd4j.graph.UIEvent.addNameIdx = function(builder, nameIdx) { + builder.addFieldInt32(2, nameIdx, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} timestamp + */ +nd4j.graph.UIEvent.addTimestamp = function(builder, timestamp) { + builder.addFieldInt64(3, timestamp, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} iteration + */ +nd4j.graph.UIEvent.addIteration = function(builder, iteration) { + builder.addFieldInt32(4, iteration, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} epoch + */ +nd4j.graph.UIEvent.addEpoch = function(builder, epoch) { + builder.addFieldInt32(5, epoch, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} variableId + */ +nd4j.graph.UIEvent.addVariableId = function(builder, variableId) { + builder.addFieldInt16(6, variableId, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} frameIterOffset + */ +nd4j.graph.UIEvent.addFrameIter = function(builder, frameIterOffset) { + builder.addFieldOffset(7, frameIterOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} plugin + */ +nd4j.graph.UIEvent.addPlugin = function(builder, plugin) { + builder.addFieldInt16(8, plugin, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIEvent.endUIEvent = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @constructor + */ +nd4j.graph.FrameIteration = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.FrameIteration} + */ +nd4j.graph.FrameIteration.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.FrameIteration=} obj + * @returns {nd4j.graph.FrameIteration} + */ +nd4j.graph.FrameIteration.getRootAsFrameIteration = function(bb, obj) { + return (obj || new nd4j.graph.FrameIteration).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.FrameIteration.prototype.frame = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FrameIteration.prototype.iteration = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.readUint16(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.FrameIteration.startFrameIteration = function(builder) { + builder.startObject(2); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} frameOffset + */ +nd4j.graph.FrameIteration.addFrame = function(builder, frameOffset) { + builder.addFieldOffset(0, frameOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} iteration + */ +nd4j.graph.FrameIteration.addIteration = function(builder, iteration) { + builder.addFieldInt16(1, iteration, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FrameIteration.endFrameIteration = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @constructor + */ +nd4j.graph.UIAddName = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.UIAddName} + */ +nd4j.graph.UIAddName.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.UIAddName=} obj + * @returns {nd4j.graph.UIAddName} + */ +nd4j.graph.UIAddName.getRootAsUIAddName = function(bb, obj) { + return (obj || new nd4j.graph.UIAddName).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {number} + */ +nd4j.graph.UIAddName.prototype.nameIdx = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.UIAddName.prototype.name = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.UIAddName.startUIAddName = function(builder) { + builder.startObject(2); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} nameIdx + */ +nd4j.graph.UIAddName.addNameIdx = function(builder, nameIdx) { + builder.addFieldInt32(0, nameIdx, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} nameOffset + */ +nd4j.graph.UIAddName.addName = function(builder, nameOffset) { + builder.addFieldOffset(1, nameOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIAddName.endUIAddName = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @constructor + */ +nd4j.graph.FlatArrayList = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.FlatArrayList} + */ +nd4j.graph.FlatArrayList.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.FlatArrayList=} obj + * @returns {nd4j.graph.FlatArrayList} + */ +nd4j.graph.FlatArrayList.getRootAsFlatArrayList = function(bb, obj) { + return (obj || new nd4j.graph.FlatArrayList).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @param {number} index + * @param {nd4j.graph.FlatArray=} obj + * @returns {nd4j.graph.FlatArray} + */ +nd4j.graph.FlatArrayList.prototype.list = function(index, obj) { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? (obj || new nd4j.graph.FlatArray).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatArrayList.prototype.listLength = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.FlatArrayList.startFlatArrayList = function(builder) { + builder.startObject(1); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} listOffset + */ +nd4j.graph.FlatArrayList.addList = function(builder, listOffset) { + builder.addFieldOffset(0, listOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatArrayList.createListVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatArrayList.startListVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatArrayList.endFlatArrayList = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @constructor + */ +nd4j.graph.UIHistogram = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.UIHistogram} + */ +nd4j.graph.UIHistogram.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.UIHistogram=} obj + * @returns {nd4j.graph.UIHistogram} + */ +nd4j.graph.UIHistogram.getRootAsUIHistogram = function(bb, obj) { + return (obj || new nd4j.graph.UIHistogram).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {nd4j.graph.UIHistogramType} + */ +nd4j.graph.UIHistogram.prototype.type = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? /** @type {nd4j.graph.UIHistogramType} */ (this.bb.readInt8(this.bb_pos + offset)) : nd4j.graph.UIHistogramType.DISCRETE; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIHistogram.prototype.numbins = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.readUint32(this.bb_pos + offset) : 0; +}; + +/** + * @param {nd4j.graph.FlatArray=} obj + * @returns {nd4j.graph.FlatArray|null} + */ +nd4j.graph.UIHistogram.prototype.binranges = function(obj) { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? (obj || new nd4j.graph.FlatArray).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; +}; + +/** + * @param {nd4j.graph.FlatArray=} obj + * @returns {nd4j.graph.FlatArray|null} + */ +nd4j.graph.UIHistogram.prototype.y = function(obj) { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? (obj || new nd4j.graph.FlatArray).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.UIHistogram.prototype.binlabels = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIHistogram.prototype.binlabelsLength = function() { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.UIHistogram.startUIHistogram = function(builder) { + builder.startObject(5); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {nd4j.graph.UIHistogramType} type + */ +nd4j.graph.UIHistogram.addType = function(builder, type) { + builder.addFieldInt8(0, type, nd4j.graph.UIHistogramType.DISCRETE); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numbins + */ +nd4j.graph.UIHistogram.addNumbins = function(builder, numbins) { + builder.addFieldInt32(1, numbins, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} binrangesOffset + */ +nd4j.graph.UIHistogram.addBinranges = function(builder, binrangesOffset) { + builder.addFieldOffset(2, binrangesOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} yOffset + */ +nd4j.graph.UIHistogram.addY = function(builder, yOffset) { + builder.addFieldOffset(3, yOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} binlabelsOffset + */ +nd4j.graph.UIHistogram.addBinlabels = function(builder, binlabelsOffset) { + builder.addFieldOffset(4, binlabelsOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIHistogram.createBinlabelsVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UIHistogram.startBinlabelsVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIHistogram.endUIHistogram = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @constructor + */ +nd4j.graph.UISummaryStatistics = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.UISummaryStatistics} + */ +nd4j.graph.UISummaryStatistics.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.UISummaryStatistics=} obj + * @returns {nd4j.graph.UISummaryStatistics} + */ +nd4j.graph.UISummaryStatistics.getRootAsUISummaryStatistics = function(bb, obj) { + return (obj || new nd4j.graph.UISummaryStatistics).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {number} + */ +nd4j.graph.UISummaryStatistics.prototype.bitmask = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readUint32(this.bb_pos + offset) : 0; +}; + +/** + * @param {nd4j.graph.FlatArray=} obj + * @returns {nd4j.graph.FlatArray|null} + */ +nd4j.graph.UISummaryStatistics.prototype.min = function(obj) { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? (obj || new nd4j.graph.FlatArray).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; +}; + +/** + * @param {nd4j.graph.FlatArray=} obj + * @returns {nd4j.graph.FlatArray|null} + */ +nd4j.graph.UISummaryStatistics.prototype.max = function(obj) { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? (obj || new nd4j.graph.FlatArray).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UISummaryStatistics.prototype.mean = function() { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0.0; +}; + +/** + * @returns {number} + */ +nd4j.graph.UISummaryStatistics.prototype.stdev = function() { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? this.bb.readFloat64(this.bb_pos + offset) : 0.0; +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.UISummaryStatistics.prototype.countzero = function() { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.UISummaryStatistics.prototype.countpositive = function() { + var offset = this.bb.__offset(this.bb_pos, 16); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.UISummaryStatistics.prototype.countnegative = function() { + var offset = this.bb.__offset(this.bb_pos, 18); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.UISummaryStatistics.prototype.countnan = function() { + var offset = this.bb.__offset(this.bb_pos, 20); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.UISummaryStatistics.prototype.countinf = function() { + var offset = this.bb.__offset(this.bb_pos, 22); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.UISummaryStatistics.startUISummaryStatistics = function(builder) { + builder.startObject(10); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} bitmask + */ +nd4j.graph.UISummaryStatistics.addBitmask = function(builder, bitmask) { + builder.addFieldInt32(0, bitmask, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} minOffset + */ +nd4j.graph.UISummaryStatistics.addMin = function(builder, minOffset) { + builder.addFieldOffset(1, minOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} maxOffset + */ +nd4j.graph.UISummaryStatistics.addMax = function(builder, maxOffset) { + builder.addFieldOffset(2, maxOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} mean + */ +nd4j.graph.UISummaryStatistics.addMean = function(builder, mean) { + builder.addFieldFloat64(3, mean, 0.0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} stdev + */ +nd4j.graph.UISummaryStatistics.addStdev = function(builder, stdev) { + builder.addFieldFloat64(4, stdev, 0.0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} countzero + */ +nd4j.graph.UISummaryStatistics.addCountzero = function(builder, countzero) { + builder.addFieldInt64(5, countzero, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} countpositive + */ +nd4j.graph.UISummaryStatistics.addCountpositive = function(builder, countpositive) { + builder.addFieldInt64(6, countpositive, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} countnegative + */ +nd4j.graph.UISummaryStatistics.addCountnegative = function(builder, countnegative) { + builder.addFieldInt64(7, countnegative, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} countnan + */ +nd4j.graph.UISummaryStatistics.addCountnan = function(builder, countnan) { + builder.addFieldInt64(8, countnan, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} countinf + */ +nd4j.graph.UISummaryStatistics.addCountinf = function(builder, countinf) { + builder.addFieldInt64(9, countinf, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UISummaryStatistics.endUISummaryStatistics = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @constructor + */ +nd4j.graph.UIHardwareState = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.UIHardwareState} + */ +nd4j.graph.UIHardwareState.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.UIHardwareState=} obj + * @returns {nd4j.graph.UIHardwareState} + */ +nd4j.graph.UIHardwareState.getRootAsUIHardwareState = function(bb, obj) { + return (obj || new nd4j.graph.UIHardwareState).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @param {number} index + * @returns {flatbuffers.Long} + */ +nd4j.graph.UIHardwareState.prototype.gpuMemory = function(index) { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readInt64(this.bb.__vector(this.bb_pos + offset) + index * 8) : this.bb.createLong(0, 0); +}; + +/** + * @returns {number} + */ +nd4j.graph.UIHardwareState.prototype.gpuMemoryLength = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.UIHardwareState.prototype.hostMemory = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.UIHardwareState.startUIHardwareState = function(builder) { + builder.startObject(2); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} gpuMemoryOffset + */ +nd4j.graph.UIHardwareState.addGpuMemory = function(builder, gpuMemoryOffset) { + builder.addFieldOffset(0, gpuMemoryOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIHardwareState.createGpuMemoryVector = function(builder, data) { + builder.startVector(8, data.length, 8); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt64(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UIHardwareState.startGpuMemoryVector = function(builder, numElems) { + builder.startVector(8, numElems, 8); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} hostMemory + */ +nd4j.graph.UIHardwareState.addHostMemory = function(builder, hostMemory) { + builder.addFieldInt64(1, hostMemory, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIHardwareState.endUIHardwareState = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +// Exports for Node.js and RequireJS +this.nd4j = nd4j; diff --git a/libnd4j/include/graph/generated/uigraphstatic_generated.h b/libnd4j/include/graph/generated/uigraphstatic_generated.h new file mode 100644 index 000000000..b6545f53a --- /dev/null +++ b/libnd4j/include/graph/generated/uigraphstatic_generated.h @@ -0,0 +1,571 @@ +// automatically generated by the FlatBuffers compiler, do not modify + + +#ifndef FLATBUFFERS_GENERATED_UIGRAPHSTATIC_ND4J_GRAPH_H_ +#define FLATBUFFERS_GENERATED_UIGRAPHSTATIC_ND4J_GRAPH_H_ + +#include "flatbuffers/flatbuffers.h" + +#include "array_generated.h" +#include "utils_generated.h" +#include "variable_generated.h" + +namespace sd { +namespace graph { + +struct UIStaticInfoRecord; + +struct UISystemInfo; + +struct UIGraphStructure; + +struct UIVariable; + +struct UIOp; + +enum UIInfoType { + UIInfoType_GRAPH_STRUCTURE = 0, + UIInfoType_SYTEM_INFO = 1, + UIInfoType_START_EVENTS = 2, + UIInfoType_MIN = UIInfoType_GRAPH_STRUCTURE, + UIInfoType_MAX = UIInfoType_START_EVENTS +}; + +inline const UIInfoType (&EnumValuesUIInfoType())[3] { + static const UIInfoType values[] = { + UIInfoType_GRAPH_STRUCTURE, + UIInfoType_SYTEM_INFO, + UIInfoType_START_EVENTS + }; + return values; +} + +inline const char * const *EnumNamesUIInfoType() { + static const char * const names[] = { + "GRAPH_STRUCTURE", + "SYTEM_INFO", + "START_EVENTS", + nullptr + }; + return names; +} + +inline const char *EnumNameUIInfoType(UIInfoType e) { + const size_t index = static_cast(e); + return EnumNamesUIInfoType()[index]; +} + +struct UIStaticInfoRecord FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_INFOTYPE = 4 + }; + UIInfoType infoType() const { + return static_cast(GetField(VT_INFOTYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_INFOTYPE) && + verifier.EndTable(); + } +}; + +struct UIStaticInfoRecordBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_infoType(UIInfoType infoType) { + fbb_.AddElement(UIStaticInfoRecord::VT_INFOTYPE, static_cast(infoType), 0); + } + explicit UIStaticInfoRecordBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + UIStaticInfoRecordBuilder &operator=(const UIStaticInfoRecordBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUIStaticInfoRecord( + flatbuffers::FlatBufferBuilder &_fbb, + UIInfoType infoType = UIInfoType_GRAPH_STRUCTURE) { + UIStaticInfoRecordBuilder builder_(_fbb); + builder_.add_infoType(infoType); + return builder_.Finish(); +} + +struct UISystemInfo FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_PHYSICALCORES = 4 + }; + int32_t physicalCores() const { + return GetField(VT_PHYSICALCORES, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_PHYSICALCORES) && + verifier.EndTable(); + } +}; + +struct UISystemInfoBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_physicalCores(int32_t physicalCores) { + fbb_.AddElement(UISystemInfo::VT_PHYSICALCORES, physicalCores, 0); + } + explicit UISystemInfoBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + UISystemInfoBuilder &operator=(const UISystemInfoBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUISystemInfo( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t physicalCores = 0) { + UISystemInfoBuilder builder_(_fbb); + builder_.add_physicalCores(physicalCores); + return builder_.Finish(); +} + +struct UIGraphStructure FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_INPUTS = 4, + VT_INPUTSPAIR = 6, + VT_OUTPUTS = 8, + VT_VARIABLES = 10, + VT_OPS = 12 + }; + const flatbuffers::Vector> *inputs() const { + return GetPointer> *>(VT_INPUTS); + } + const flatbuffers::Vector> *inputsPair() const { + return GetPointer> *>(VT_INPUTSPAIR); + } + const flatbuffers::Vector> *outputs() const { + return GetPointer> *>(VT_OUTPUTS); + } + const flatbuffers::Vector> *variables() const { + return GetPointer> *>(VT_VARIABLES); + } + const flatbuffers::Vector> *ops() const { + return GetPointer> *>(VT_OPS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_INPUTS) && + verifier.VerifyVector(inputs()) && + verifier.VerifyVectorOfStrings(inputs()) && + VerifyOffset(verifier, VT_INPUTSPAIR) && + verifier.VerifyVector(inputsPair()) && + verifier.VerifyVectorOfTables(inputsPair()) && + VerifyOffset(verifier, VT_OUTPUTS) && + verifier.VerifyVector(outputs()) && + verifier.VerifyVectorOfStrings(outputs()) && + VerifyOffset(verifier, VT_VARIABLES) && + verifier.VerifyVector(variables()) && + verifier.VerifyVectorOfTables(variables()) && + VerifyOffset(verifier, VT_OPS) && + verifier.VerifyVector(ops()) && + verifier.VerifyVectorOfTables(ops()) && + verifier.EndTable(); + } +}; + +struct UIGraphStructureBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_inputs(flatbuffers::Offset>> inputs) { + fbb_.AddOffset(UIGraphStructure::VT_INPUTS, inputs); + } + void add_inputsPair(flatbuffers::Offset>> inputsPair) { + fbb_.AddOffset(UIGraphStructure::VT_INPUTSPAIR, inputsPair); + } + void add_outputs(flatbuffers::Offset>> outputs) { + fbb_.AddOffset(UIGraphStructure::VT_OUTPUTS, outputs); + } + void add_variables(flatbuffers::Offset>> variables) { + fbb_.AddOffset(UIGraphStructure::VT_VARIABLES, variables); + } + void add_ops(flatbuffers::Offset>> ops) { + fbb_.AddOffset(UIGraphStructure::VT_OPS, ops); + } + explicit UIGraphStructureBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + UIGraphStructureBuilder &operator=(const UIGraphStructureBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUIGraphStructure( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset>> inputs = 0, + flatbuffers::Offset>> inputsPair = 0, + flatbuffers::Offset>> outputs = 0, + flatbuffers::Offset>> variables = 0, + flatbuffers::Offset>> ops = 0) { + UIGraphStructureBuilder builder_(_fbb); + builder_.add_ops(ops); + builder_.add_variables(variables); + builder_.add_outputs(outputs); + builder_.add_inputsPair(inputsPair); + builder_.add_inputs(inputs); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateUIGraphStructureDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector> *inputs = nullptr, + const std::vector> *inputsPair = nullptr, + const std::vector> *outputs = nullptr, + const std::vector> *variables = nullptr, + const std::vector> *ops = nullptr) { + return sd::graph::CreateUIGraphStructure( + _fbb, + inputs ? _fbb.CreateVector>(*inputs) : 0, + inputsPair ? _fbb.CreateVector>(*inputsPair) : 0, + outputs ? _fbb.CreateVector>(*outputs) : 0, + variables ? _fbb.CreateVector>(*variables) : 0, + ops ? _fbb.CreateVector>(*ops) : 0); +} + +struct UIVariable FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_ID = 4, + VT_NAME = 6, + VT_TYPE = 8, + VT_DATATYPE = 10, + VT_SHAPE = 12, + VT_CONTROLDEPS = 14, + VT_OUTPUTOFOP = 16, + VT_INPUTSFOROP = 18, + VT_CONTROLDEPSFOROP = 20, + VT_CONTROLDEPSFORVAR = 22, + VT_GRADIENTVARIABLE = 24, + VT_UILABELEXTRA = 26, + VT_CONSTANTVALUE = 28 + }; + const IntPair *id() const { + return GetPointer(VT_ID); + } + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); + } + VarType type() const { + return static_cast(GetField(VT_TYPE, 0)); + } + DType datatype() const { + return static_cast(GetField(VT_DATATYPE, 0)); + } + const flatbuffers::Vector *shape() const { + return GetPointer *>(VT_SHAPE); + } + const flatbuffers::Vector> *controlDeps() const { + return GetPointer> *>(VT_CONTROLDEPS); + } + const flatbuffers::String *outputOfOp() const { + return GetPointer(VT_OUTPUTOFOP); + } + const flatbuffers::Vector> *inputsForOp() const { + return GetPointer> *>(VT_INPUTSFOROP); + } + const flatbuffers::Vector> *controlDepsForOp() const { + return GetPointer> *>(VT_CONTROLDEPSFOROP); + } + const flatbuffers::Vector> *controlDepsForVar() const { + return GetPointer> *>(VT_CONTROLDEPSFORVAR); + } + const flatbuffers::String *gradientVariable() const { + return GetPointer(VT_GRADIENTVARIABLE); + } + const flatbuffers::String *uiLabelExtra() const { + return GetPointer(VT_UILABELEXTRA); + } + const FlatArray *constantValue() const { + return GetPointer(VT_CONSTANTVALUE); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_ID) && + verifier.VerifyTable(id()) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyField(verifier, VT_TYPE) && + VerifyField(verifier, VT_DATATYPE) && + VerifyOffset(verifier, VT_SHAPE) && + verifier.VerifyVector(shape()) && + VerifyOffset(verifier, VT_CONTROLDEPS) && + verifier.VerifyVector(controlDeps()) && + verifier.VerifyVectorOfStrings(controlDeps()) && + VerifyOffset(verifier, VT_OUTPUTOFOP) && + verifier.VerifyString(outputOfOp()) && + VerifyOffset(verifier, VT_INPUTSFOROP) && + verifier.VerifyVector(inputsForOp()) && + verifier.VerifyVectorOfStrings(inputsForOp()) && + VerifyOffset(verifier, VT_CONTROLDEPSFOROP) && + verifier.VerifyVector(controlDepsForOp()) && + verifier.VerifyVectorOfStrings(controlDepsForOp()) && + VerifyOffset(verifier, VT_CONTROLDEPSFORVAR) && + verifier.VerifyVector(controlDepsForVar()) && + verifier.VerifyVectorOfStrings(controlDepsForVar()) && + VerifyOffset(verifier, VT_GRADIENTVARIABLE) && + verifier.VerifyString(gradientVariable()) && + VerifyOffset(verifier, VT_UILABELEXTRA) && + verifier.VerifyString(uiLabelExtra()) && + VerifyOffset(verifier, VT_CONSTANTVALUE) && + verifier.VerifyTable(constantValue()) && + verifier.EndTable(); + } +}; + +struct UIVariableBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_id(flatbuffers::Offset id) { + fbb_.AddOffset(UIVariable::VT_ID, id); + } + void add_name(flatbuffers::Offset name) { + fbb_.AddOffset(UIVariable::VT_NAME, name); + } + void add_type(VarType type) { + fbb_.AddElement(UIVariable::VT_TYPE, static_cast(type), 0); + } + void add_datatype(DType datatype) { + fbb_.AddElement(UIVariable::VT_DATATYPE, static_cast(datatype), 0); + } + void add_shape(flatbuffers::Offset> shape) { + fbb_.AddOffset(UIVariable::VT_SHAPE, shape); + } + void add_controlDeps(flatbuffers::Offset>> controlDeps) { + fbb_.AddOffset(UIVariable::VT_CONTROLDEPS, controlDeps); + } + void add_outputOfOp(flatbuffers::Offset outputOfOp) { + fbb_.AddOffset(UIVariable::VT_OUTPUTOFOP, outputOfOp); + } + void add_inputsForOp(flatbuffers::Offset>> inputsForOp) { + fbb_.AddOffset(UIVariable::VT_INPUTSFOROP, inputsForOp); + } + void add_controlDepsForOp(flatbuffers::Offset>> controlDepsForOp) { + fbb_.AddOffset(UIVariable::VT_CONTROLDEPSFOROP, controlDepsForOp); + } + void add_controlDepsForVar(flatbuffers::Offset>> controlDepsForVar) { + fbb_.AddOffset(UIVariable::VT_CONTROLDEPSFORVAR, controlDepsForVar); + } + void add_gradientVariable(flatbuffers::Offset gradientVariable) { + fbb_.AddOffset(UIVariable::VT_GRADIENTVARIABLE, gradientVariable); + } + void add_uiLabelExtra(flatbuffers::Offset uiLabelExtra) { + fbb_.AddOffset(UIVariable::VT_UILABELEXTRA, uiLabelExtra); + } + void add_constantValue(flatbuffers::Offset constantValue) { + fbb_.AddOffset(UIVariable::VT_CONSTANTVALUE, constantValue); + } + explicit UIVariableBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + UIVariableBuilder &operator=(const UIVariableBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUIVariable( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset id = 0, + flatbuffers::Offset name = 0, + VarType type = VarType_VARIABLE, + DType datatype = DType_INHERIT, + flatbuffers::Offset> shape = 0, + flatbuffers::Offset>> controlDeps = 0, + flatbuffers::Offset outputOfOp = 0, + flatbuffers::Offset>> inputsForOp = 0, + flatbuffers::Offset>> controlDepsForOp = 0, + flatbuffers::Offset>> controlDepsForVar = 0, + flatbuffers::Offset gradientVariable = 0, + flatbuffers::Offset uiLabelExtra = 0, + flatbuffers::Offset constantValue = 0) { + UIVariableBuilder builder_(_fbb); + builder_.add_constantValue(constantValue); + builder_.add_uiLabelExtra(uiLabelExtra); + builder_.add_gradientVariable(gradientVariable); + builder_.add_controlDepsForVar(controlDepsForVar); + builder_.add_controlDepsForOp(controlDepsForOp); + builder_.add_inputsForOp(inputsForOp); + builder_.add_outputOfOp(outputOfOp); + builder_.add_controlDeps(controlDeps); + builder_.add_shape(shape); + builder_.add_name(name); + builder_.add_id(id); + builder_.add_datatype(datatype); + builder_.add_type(type); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateUIVariableDirect( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset id = 0, + const char *name = nullptr, + VarType type = VarType_VARIABLE, + DType datatype = DType_INHERIT, + const std::vector *shape = nullptr, + const std::vector> *controlDeps = nullptr, + const char *outputOfOp = nullptr, + const std::vector> *inputsForOp = nullptr, + const std::vector> *controlDepsForOp = nullptr, + const std::vector> *controlDepsForVar = nullptr, + const char *gradientVariable = nullptr, + const char *uiLabelExtra = nullptr, + flatbuffers::Offset constantValue = 0) { + return sd::graph::CreateUIVariable( + _fbb, + id, + name ? _fbb.CreateString(name) : 0, + type, + datatype, + shape ? _fbb.CreateVector(*shape) : 0, + controlDeps ? _fbb.CreateVector>(*controlDeps) : 0, + outputOfOp ? _fbb.CreateString(outputOfOp) : 0, + inputsForOp ? _fbb.CreateVector>(*inputsForOp) : 0, + controlDepsForOp ? _fbb.CreateVector>(*controlDepsForOp) : 0, + controlDepsForVar ? _fbb.CreateVector>(*controlDepsForVar) : 0, + gradientVariable ? _fbb.CreateString(gradientVariable) : 0, + uiLabelExtra ? _fbb.CreateString(uiLabelExtra) : 0, + constantValue); +} + +struct UIOp FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_NAME = 4, + VT_OPNAME = 6, + VT_INPUTS = 8, + VT_OUTPUTS = 10, + VT_CONTROLDEPS = 12, + VT_UILABELEXTRA = 14 + }; + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); + } + const flatbuffers::String *opName() const { + return GetPointer(VT_OPNAME); + } + const flatbuffers::Vector> *inputs() const { + return GetPointer> *>(VT_INPUTS); + } + const flatbuffers::Vector> *outputs() const { + return GetPointer> *>(VT_OUTPUTS); + } + const flatbuffers::Vector> *controlDeps() const { + return GetPointer> *>(VT_CONTROLDEPS); + } + const flatbuffers::String *uiLabelExtra() const { + return GetPointer(VT_UILABELEXTRA); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyOffset(verifier, VT_OPNAME) && + verifier.VerifyString(opName()) && + VerifyOffset(verifier, VT_INPUTS) && + verifier.VerifyVector(inputs()) && + verifier.VerifyVectorOfStrings(inputs()) && + VerifyOffset(verifier, VT_OUTPUTS) && + verifier.VerifyVector(outputs()) && + verifier.VerifyVectorOfStrings(outputs()) && + VerifyOffset(verifier, VT_CONTROLDEPS) && + verifier.VerifyVector(controlDeps()) && + verifier.VerifyVectorOfStrings(controlDeps()) && + VerifyOffset(verifier, VT_UILABELEXTRA) && + verifier.VerifyString(uiLabelExtra()) && + verifier.EndTable(); + } +}; + +struct UIOpBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_name(flatbuffers::Offset name) { + fbb_.AddOffset(UIOp::VT_NAME, name); + } + void add_opName(flatbuffers::Offset opName) { + fbb_.AddOffset(UIOp::VT_OPNAME, opName); + } + void add_inputs(flatbuffers::Offset>> inputs) { + fbb_.AddOffset(UIOp::VT_INPUTS, inputs); + } + void add_outputs(flatbuffers::Offset>> outputs) { + fbb_.AddOffset(UIOp::VT_OUTPUTS, outputs); + } + void add_controlDeps(flatbuffers::Offset>> controlDeps) { + fbb_.AddOffset(UIOp::VT_CONTROLDEPS, controlDeps); + } + void add_uiLabelExtra(flatbuffers::Offset uiLabelExtra) { + fbb_.AddOffset(UIOp::VT_UILABELEXTRA, uiLabelExtra); + } + explicit UIOpBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + UIOpBuilder &operator=(const UIOpBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUIOp( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset name = 0, + flatbuffers::Offset opName = 0, + flatbuffers::Offset>> inputs = 0, + flatbuffers::Offset>> outputs = 0, + flatbuffers::Offset>> controlDeps = 0, + flatbuffers::Offset uiLabelExtra = 0) { + UIOpBuilder builder_(_fbb); + builder_.add_uiLabelExtra(uiLabelExtra); + builder_.add_controlDeps(controlDeps); + builder_.add_outputs(outputs); + builder_.add_inputs(inputs); + builder_.add_opName(opName); + builder_.add_name(name); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateUIOpDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *name = nullptr, + const char *opName = nullptr, + const std::vector> *inputs = nullptr, + const std::vector> *outputs = nullptr, + const std::vector> *controlDeps = nullptr, + const char *uiLabelExtra = nullptr) { + return sd::graph::CreateUIOp( + _fbb, + name ? _fbb.CreateString(name) : 0, + opName ? _fbb.CreateString(opName) : 0, + inputs ? _fbb.CreateVector>(*inputs) : 0, + outputs ? _fbb.CreateVector>(*outputs) : 0, + controlDeps ? _fbb.CreateVector>(*controlDeps) : 0, + uiLabelExtra ? _fbb.CreateString(uiLabelExtra) : 0); +} + +} // namespace graph +} // namespace sd + +#endif // FLATBUFFERS_GENERATED_UIGRAPHSTATIC_ND4J_GRAPH_H_ diff --git a/libnd4j/include/graph/generated/uigraphstatic_generated.js b/libnd4j/include/graph/generated/uigraphstatic_generated.js new file mode 100644 index 000000000..bdfebac71 --- /dev/null +++ b/libnd4j/include/graph/generated/uigraphstatic_generated.js @@ -0,0 +1,1125 @@ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ + +/** + * @const + * @namespace + */ +var nd4j = nd4j || {}; + +/** + * @const + * @namespace + */ +nd4j.graph = nd4j.graph || {}; + +/** + * @enum + */ +nd4j.graph.UIInfoType = { + GRAPH_STRUCTURE: 0, + SYTEM_INFO: 1, + START_EVENTS: 2 +}; + +/** + * @constructor + */ +nd4j.graph.UIStaticInfoRecord = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.UIStaticInfoRecord} + */ +nd4j.graph.UIStaticInfoRecord.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.UIStaticInfoRecord=} obj + * @returns {nd4j.graph.UIStaticInfoRecord} + */ +nd4j.graph.UIStaticInfoRecord.getRootAsUIStaticInfoRecord = function(bb, obj) { + return (obj || new nd4j.graph.UIStaticInfoRecord).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {nd4j.graph.UIInfoType} + */ +nd4j.graph.UIStaticInfoRecord.prototype.infoType = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? /** @type {nd4j.graph.UIInfoType} */ (this.bb.readInt8(this.bb_pos + offset)) : nd4j.graph.UIInfoType.GRAPH_STRUCTURE; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.UIStaticInfoRecord.startUIStaticInfoRecord = function(builder) { + builder.startObject(1); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {nd4j.graph.UIInfoType} infoType + */ +nd4j.graph.UIStaticInfoRecord.addInfoType = function(builder, infoType) { + builder.addFieldInt8(0, infoType, nd4j.graph.UIInfoType.GRAPH_STRUCTURE); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIStaticInfoRecord.endUIStaticInfoRecord = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @constructor + */ +nd4j.graph.UISystemInfo = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.UISystemInfo} + */ +nd4j.graph.UISystemInfo.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.UISystemInfo=} obj + * @returns {nd4j.graph.UISystemInfo} + */ +nd4j.graph.UISystemInfo.getRootAsUISystemInfo = function(bb, obj) { + return (obj || new nd4j.graph.UISystemInfo).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {number} + */ +nd4j.graph.UISystemInfo.prototype.physicalCores = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.UISystemInfo.startUISystemInfo = function(builder) { + builder.startObject(1); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} physicalCores + */ +nd4j.graph.UISystemInfo.addPhysicalCores = function(builder, physicalCores) { + builder.addFieldInt32(0, physicalCores, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UISystemInfo.endUISystemInfo = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @constructor + */ +nd4j.graph.UIGraphStructure = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.UIGraphStructure} + */ +nd4j.graph.UIGraphStructure.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.UIGraphStructure=} obj + * @returns {nd4j.graph.UIGraphStructure} + */ +nd4j.graph.UIGraphStructure.getRootAsUIGraphStructure = function(bb, obj) { + return (obj || new nd4j.graph.UIGraphStructure).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.UIGraphStructure.prototype.inputs = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIGraphStructure.prototype.inputsLength = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {nd4j.graph.IntPair=} obj + * @returns {nd4j.graph.IntPair} + */ +nd4j.graph.UIGraphStructure.prototype.inputsPair = function(index, obj) { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? (obj || new nd4j.graph.IntPair).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIGraphStructure.prototype.inputsPairLength = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.UIGraphStructure.prototype.outputs = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIGraphStructure.prototype.outputsLength = function() { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {nd4j.graph.UIVariable=} obj + * @returns {nd4j.graph.UIVariable} + */ +nd4j.graph.UIGraphStructure.prototype.variables = function(index, obj) { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? (obj || new nd4j.graph.UIVariable).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIGraphStructure.prototype.variablesLength = function() { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {nd4j.graph.UIOp=} obj + * @returns {nd4j.graph.UIOp} + */ +nd4j.graph.UIGraphStructure.prototype.ops = function(index, obj) { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? (obj || new nd4j.graph.UIOp).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos + offset) + index * 4), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIGraphStructure.prototype.opsLength = function() { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.UIGraphStructure.startUIGraphStructure = function(builder) { + builder.startObject(5); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} inputsOffset + */ +nd4j.graph.UIGraphStructure.addInputs = function(builder, inputsOffset) { + builder.addFieldOffset(0, inputsOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIGraphStructure.createInputsVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UIGraphStructure.startInputsVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} inputsPairOffset + */ +nd4j.graph.UIGraphStructure.addInputsPair = function(builder, inputsPairOffset) { + builder.addFieldOffset(1, inputsPairOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIGraphStructure.createInputsPairVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UIGraphStructure.startInputsPairVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} outputsOffset + */ +nd4j.graph.UIGraphStructure.addOutputs = function(builder, outputsOffset) { + builder.addFieldOffset(2, outputsOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIGraphStructure.createOutputsVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UIGraphStructure.startOutputsVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} variablesOffset + */ +nd4j.graph.UIGraphStructure.addVariables = function(builder, variablesOffset) { + builder.addFieldOffset(3, variablesOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIGraphStructure.createVariablesVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UIGraphStructure.startVariablesVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} opsOffset + */ +nd4j.graph.UIGraphStructure.addOps = function(builder, opsOffset) { + builder.addFieldOffset(4, opsOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIGraphStructure.createOpsVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UIGraphStructure.startOpsVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIGraphStructure.endUIGraphStructure = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @constructor + */ +nd4j.graph.UIVariable = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.UIVariable} + */ +nd4j.graph.UIVariable.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.UIVariable=} obj + * @returns {nd4j.graph.UIVariable} + */ +nd4j.graph.UIVariable.getRootAsUIVariable = function(bb, obj) { + return (obj || new nd4j.graph.UIVariable).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @param {nd4j.graph.IntPair=} obj + * @returns {nd4j.graph.IntPair|null} + */ +nd4j.graph.UIVariable.prototype.id = function(obj) { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? (obj || new nd4j.graph.IntPair).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.UIVariable.prototype.name = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @returns {nd4j.graph.VarType} + */ +nd4j.graph.UIVariable.prototype.type = function() { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? /** @type {nd4j.graph.VarType} */ (this.bb.readInt8(this.bb_pos + offset)) : nd4j.graph.VarType.VARIABLE; +}; + +/** + * @returns {nd4j.graph.DType} + */ +nd4j.graph.UIVariable.prototype.datatype = function() { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? /** @type {nd4j.graph.DType} */ (this.bb.readInt8(this.bb_pos + offset)) : nd4j.graph.DType.INHERIT; +}; + +/** + * @param {number} index + * @returns {flatbuffers.Long} + */ +nd4j.graph.UIVariable.prototype.shape = function(index) { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? this.bb.readInt64(this.bb.__vector(this.bb_pos + offset) + index * 8) : this.bb.createLong(0, 0); +}; + +/** + * @returns {number} + */ +nd4j.graph.UIVariable.prototype.shapeLength = function() { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.UIVariable.prototype.controlDeps = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIVariable.prototype.controlDepsLength = function() { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.UIVariable.prototype.outputOfOp = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 16); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.UIVariable.prototype.inputsForOp = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 18); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIVariable.prototype.inputsForOpLength = function() { + var offset = this.bb.__offset(this.bb_pos, 18); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.UIVariable.prototype.controlDepsForOp = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 20); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIVariable.prototype.controlDepsForOpLength = function() { + var offset = this.bb.__offset(this.bb_pos, 20); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.UIVariable.prototype.controlDepsForVar = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 22); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIVariable.prototype.controlDepsForVarLength = function() { + var offset = this.bb.__offset(this.bb_pos, 22); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.UIVariable.prototype.gradientVariable = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 24); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.UIVariable.prototype.uiLabelExtra = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 26); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @param {nd4j.graph.FlatArray=} obj + * @returns {nd4j.graph.FlatArray|null} + */ +nd4j.graph.UIVariable.prototype.constantValue = function(obj) { + var offset = this.bb.__offset(this.bb_pos, 28); + return offset ? (obj || new nd4j.graph.FlatArray).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.UIVariable.startUIVariable = function(builder) { + builder.startObject(13); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} idOffset + */ +nd4j.graph.UIVariable.addId = function(builder, idOffset) { + builder.addFieldOffset(0, idOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} nameOffset + */ +nd4j.graph.UIVariable.addName = function(builder, nameOffset) { + builder.addFieldOffset(1, nameOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {nd4j.graph.VarType} type + */ +nd4j.graph.UIVariable.addType = function(builder, type) { + builder.addFieldInt8(2, type, nd4j.graph.VarType.VARIABLE); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {nd4j.graph.DType} datatype + */ +nd4j.graph.UIVariable.addDatatype = function(builder, datatype) { + builder.addFieldInt8(3, datatype, nd4j.graph.DType.INHERIT); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} shapeOffset + */ +nd4j.graph.UIVariable.addShape = function(builder, shapeOffset) { + builder.addFieldOffset(4, shapeOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIVariable.createShapeVector = function(builder, data) { + builder.startVector(8, data.length, 8); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt64(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UIVariable.startShapeVector = function(builder, numElems) { + builder.startVector(8, numElems, 8); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} controlDepsOffset + */ +nd4j.graph.UIVariable.addControlDeps = function(builder, controlDepsOffset) { + builder.addFieldOffset(5, controlDepsOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIVariable.createControlDepsVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UIVariable.startControlDepsVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} outputOfOpOffset + */ +nd4j.graph.UIVariable.addOutputOfOp = function(builder, outputOfOpOffset) { + builder.addFieldOffset(6, outputOfOpOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} inputsForOpOffset + */ +nd4j.graph.UIVariable.addInputsForOp = function(builder, inputsForOpOffset) { + builder.addFieldOffset(7, inputsForOpOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIVariable.createInputsForOpVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UIVariable.startInputsForOpVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} controlDepsForOpOffset + */ +nd4j.graph.UIVariable.addControlDepsForOp = function(builder, controlDepsForOpOffset) { + builder.addFieldOffset(8, controlDepsForOpOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIVariable.createControlDepsForOpVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UIVariable.startControlDepsForOpVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} controlDepsForVarOffset + */ +nd4j.graph.UIVariable.addControlDepsForVar = function(builder, controlDepsForVarOffset) { + builder.addFieldOffset(9, controlDepsForVarOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIVariable.createControlDepsForVarVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UIVariable.startControlDepsForVarVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} gradientVariableOffset + */ +nd4j.graph.UIVariable.addGradientVariable = function(builder, gradientVariableOffset) { + builder.addFieldOffset(10, gradientVariableOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} uiLabelExtraOffset + */ +nd4j.graph.UIVariable.addUiLabelExtra = function(builder, uiLabelExtraOffset) { + builder.addFieldOffset(11, uiLabelExtraOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} constantValueOffset + */ +nd4j.graph.UIVariable.addConstantValue = function(builder, constantValueOffset) { + builder.addFieldOffset(12, constantValueOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIVariable.endUIVariable = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @constructor + */ +nd4j.graph.UIOp = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.UIOp} + */ +nd4j.graph.UIOp.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.UIOp=} obj + * @returns {nd4j.graph.UIOp} + */ +nd4j.graph.UIOp.getRootAsUIOp = function(bb, obj) { + return (obj || new nd4j.graph.UIOp).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.UIOp.prototype.name = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.UIOp.prototype.opName = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.UIOp.prototype.inputs = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIOp.prototype.inputsLength = function() { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.UIOp.prototype.outputs = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIOp.prototype.outputsLength = function() { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.UIOp.prototype.controlDeps = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.UIOp.prototype.controlDepsLength = function() { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.UIOp.prototype.uiLabelExtra = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.UIOp.startUIOp = function(builder) { + builder.startObject(6); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} nameOffset + */ +nd4j.graph.UIOp.addName = function(builder, nameOffset) { + builder.addFieldOffset(0, nameOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} opNameOffset + */ +nd4j.graph.UIOp.addOpName = function(builder, opNameOffset) { + builder.addFieldOffset(1, opNameOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} inputsOffset + */ +nd4j.graph.UIOp.addInputs = function(builder, inputsOffset) { + builder.addFieldOffset(2, inputsOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIOp.createInputsVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UIOp.startInputsVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} outputsOffset + */ +nd4j.graph.UIOp.addOutputs = function(builder, outputsOffset) { + builder.addFieldOffset(3, outputsOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIOp.createOutputsVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UIOp.startOutputsVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} controlDepsOffset + */ +nd4j.graph.UIOp.addControlDeps = function(builder, controlDepsOffset) { + builder.addFieldOffset(4, controlDepsOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIOp.createControlDepsVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.UIOp.startControlDepsVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} uiLabelExtraOffset + */ +nd4j.graph.UIOp.addUiLabelExtra = function(builder, uiLabelExtraOffset) { + builder.addFieldOffset(5, uiLabelExtraOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.UIOp.endUIOp = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +// Exports for Node.js and RequireJS +this.nd4j = nd4j; diff --git a/libnd4j/include/graph/generated/utils_generated.h b/libnd4j/include/graph/generated/utils_generated.h new file mode 100644 index 000000000..8e7896bb4 --- /dev/null +++ b/libnd4j/include/graph/generated/utils_generated.h @@ -0,0 +1,517 @@ +// automatically generated by the FlatBuffers compiler, do not modify + + +#ifndef FLATBUFFERS_GENERATED_UTILS_ND4J_GRAPH_H_ +#define FLATBUFFERS_GENERATED_UTILS_ND4J_GRAPH_H_ + +#include "flatbuffers/flatbuffers.h" + +namespace sd { +namespace graph { + +struct LongPair; + +struct LongTriple; + +struct IntPair; + +struct IntTriple; + +enum OpType { + OpType_TRANSFORM_FLOAT = 0, + OpType_TRANSFORM_SAME = 1, + OpType_TRANSFORM_BOOL = 2, + OpType_TRANSFORM_STRICT = 3, + OpType_TRANSFORM_ANY = 4, + OpType_REDUCE_FLOAT = 5, + OpType_REDUCE_SAME = 6, + OpType_REDUCE_LONG = 7, + OpType_REDUCE_BOOL = 8, + OpType_INDEX_REDUCE = 9, + OpType_SCALAR = 10, + OpType_SCALAR_BOOL = 11, + OpType_BROADCAST = 12, + OpType_BROADCAST_BOOL = 13, + OpType_PAIRWISE = 14, + OpType_PAIRWISE_BOOL = 15, + OpType_REDUCE_3 = 16, + OpType_SUMMARYSTATS = 17, + OpType_SHAPE = 18, + OpType_AGGREGATION = 19, + OpType_RANDOM = 20, + OpType_CUSTOM = 21, + OpType_GRAPH = 22, + OpType_VARIABLE = 40, + OpType_BOOLEAN = 60, + OpType_LOGIC = 119, + OpType_MIN = OpType_TRANSFORM_FLOAT, + OpType_MAX = OpType_LOGIC +}; + +inline const OpType (&EnumValuesOpType())[26] { + static const OpType values[] = { + OpType_TRANSFORM_FLOAT, + OpType_TRANSFORM_SAME, + OpType_TRANSFORM_BOOL, + OpType_TRANSFORM_STRICT, + OpType_TRANSFORM_ANY, + OpType_REDUCE_FLOAT, + OpType_REDUCE_SAME, + OpType_REDUCE_LONG, + OpType_REDUCE_BOOL, + OpType_INDEX_REDUCE, + OpType_SCALAR, + OpType_SCALAR_BOOL, + OpType_BROADCAST, + OpType_BROADCAST_BOOL, + OpType_PAIRWISE, + OpType_PAIRWISE_BOOL, + OpType_REDUCE_3, + OpType_SUMMARYSTATS, + OpType_SHAPE, + OpType_AGGREGATION, + OpType_RANDOM, + OpType_CUSTOM, + OpType_GRAPH, + OpType_VARIABLE, + OpType_BOOLEAN, + OpType_LOGIC + }; + return values; +} + +inline const char * const *EnumNamesOpType() { + static const char * const names[] = { + "TRANSFORM_FLOAT", + "TRANSFORM_SAME", + "TRANSFORM_BOOL", + "TRANSFORM_STRICT", + "TRANSFORM_ANY", + "REDUCE_FLOAT", + "REDUCE_SAME", + "REDUCE_LONG", + "REDUCE_BOOL", + "INDEX_REDUCE", + "SCALAR", + "SCALAR_BOOL", + "BROADCAST", + "BROADCAST_BOOL", + "PAIRWISE", + "PAIRWISE_BOOL", + "REDUCE_3", + "SUMMARYSTATS", + "SHAPE", + "AGGREGATION", + "RANDOM", + "CUSTOM", + "GRAPH", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "VARIABLE", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "BOOLEAN", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "LOGIC", + nullptr + }; + return names; +} + +inline const char *EnumNameOpType(OpType e) { + const size_t index = static_cast(e); + return EnumNamesOpType()[index]; +} + +enum InputType { + InputType_UNDEFINED = 0, + InputType_NUMERIC = 1, + InputType_STRINGULAR = 2, + InputType_NUMERIC_SET = 3, + InputType_STRINGULAR_SET = 4, + InputType_MIN = InputType_UNDEFINED, + InputType_MAX = InputType_STRINGULAR_SET +}; + +inline const InputType (&EnumValuesInputType())[5] { + static const InputType values[] = { + InputType_UNDEFINED, + InputType_NUMERIC, + InputType_STRINGULAR, + InputType_NUMERIC_SET, + InputType_STRINGULAR_SET + }; + return values; +} + +inline const char * const *EnumNamesInputType() { + static const char * const names[] = { + "UNDEFINED", + "NUMERIC", + "STRINGULAR", + "NUMERIC_SET", + "STRINGULAR_SET", + nullptr + }; + return names; +} + +inline const char *EnumNameInputType(InputType e) { + const size_t index = static_cast(e); + return EnumNamesInputType()[index]; +} + +enum OpClass { + OpClass_TRANSFORM = 0, + OpClass_REDUCTION = 1, + OpClass_MULTIPLICATOR = 2, + OpClass_GRAPH = 3, + OpClass_CONDITIONAL = 4, + OpClass_LOOP = 5, + OpClass_MIN = OpClass_TRANSFORM, + OpClass_MAX = OpClass_LOOP +}; + +inline const OpClass (&EnumValuesOpClass())[6] { + static const OpClass values[] = { + OpClass_TRANSFORM, + OpClass_REDUCTION, + OpClass_MULTIPLICATOR, + OpClass_GRAPH, + OpClass_CONDITIONAL, + OpClass_LOOP + }; + return values; +} + +inline const char * const *EnumNamesOpClass() { + static const char * const names[] = { + "TRANSFORM", + "REDUCTION", + "MULTIPLICATOR", + "GRAPH", + "CONDITIONAL", + "LOOP", + nullptr + }; + return names; +} + +inline const char *EnumNameOpClass(OpClass e) { + const size_t index = static_cast(e); + return EnumNamesOpClass()[index]; +} + +struct LongPair FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_FIRST = 4, + VT_SECOND = 6 + }; + int64_t first() const { + return GetField(VT_FIRST, 0); + } + int64_t second() const { + return GetField(VT_SECOND, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FIRST) && + VerifyField(verifier, VT_SECOND) && + verifier.EndTable(); + } +}; + +struct LongPairBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_first(int64_t first) { + fbb_.AddElement(LongPair::VT_FIRST, first, 0); + } + void add_second(int64_t second) { + fbb_.AddElement(LongPair::VT_SECOND, second, 0); + } + explicit LongPairBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + LongPairBuilder &operator=(const LongPairBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateLongPair( + flatbuffers::FlatBufferBuilder &_fbb, + int64_t first = 0, + int64_t second = 0) { + LongPairBuilder builder_(_fbb); + builder_.add_second(second); + builder_.add_first(first); + return builder_.Finish(); +} + +struct LongTriple FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_FIRST = 4, + VT_SECOND = 6, + VT_THIRD = 8 + }; + int64_t first() const { + return GetField(VT_FIRST, 0); + } + int64_t second() const { + return GetField(VT_SECOND, 0); + } + int64_t third() const { + return GetField(VT_THIRD, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FIRST) && + VerifyField(verifier, VT_SECOND) && + VerifyField(verifier, VT_THIRD) && + verifier.EndTable(); + } +}; + +struct LongTripleBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_first(int64_t first) { + fbb_.AddElement(LongTriple::VT_FIRST, first, 0); + } + void add_second(int64_t second) { + fbb_.AddElement(LongTriple::VT_SECOND, second, 0); + } + void add_third(int64_t third) { + fbb_.AddElement(LongTriple::VT_THIRD, third, 0); + } + explicit LongTripleBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + LongTripleBuilder &operator=(const LongTripleBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateLongTriple( + flatbuffers::FlatBufferBuilder &_fbb, + int64_t first = 0, + int64_t second = 0, + int64_t third = 0) { + LongTripleBuilder builder_(_fbb); + builder_.add_third(third); + builder_.add_second(second); + builder_.add_first(first); + return builder_.Finish(); +} + +struct IntPair FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_FIRST = 4, + VT_SECOND = 6 + }; + int32_t first() const { + return GetField(VT_FIRST, 0); + } + int32_t second() const { + return GetField(VT_SECOND, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FIRST) && + VerifyField(verifier, VT_SECOND) && + verifier.EndTable(); + } +}; + +struct IntPairBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_first(int32_t first) { + fbb_.AddElement(IntPair::VT_FIRST, first, 0); + } + void add_second(int32_t second) { + fbb_.AddElement(IntPair::VT_SECOND, second, 0); + } + explicit IntPairBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + IntPairBuilder &operator=(const IntPairBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateIntPair( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t first = 0, + int32_t second = 0) { + IntPairBuilder builder_(_fbb); + builder_.add_second(second); + builder_.add_first(first); + return builder_.Finish(); +} + +struct IntTriple FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_FIRST = 4, + VT_SECOND = 6, + VT_THIRD = 8 + }; + int32_t first() const { + return GetField(VT_FIRST, 0); + } + int32_t second() const { + return GetField(VT_SECOND, 0); + } + int32_t third() const { + return GetField(VT_THIRD, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_FIRST) && + VerifyField(verifier, VT_SECOND) && + VerifyField(verifier, VT_THIRD) && + verifier.EndTable(); + } +}; + +struct IntTripleBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_first(int32_t first) { + fbb_.AddElement(IntTriple::VT_FIRST, first, 0); + } + void add_second(int32_t second) { + fbb_.AddElement(IntTriple::VT_SECOND, second, 0); + } + void add_third(int32_t third) { + fbb_.AddElement(IntTriple::VT_THIRD, third, 0); + } + explicit IntTripleBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + IntTripleBuilder &operator=(const IntTripleBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateIntTriple( + flatbuffers::FlatBufferBuilder &_fbb, + int32_t first = 0, + int32_t second = 0, + int32_t third = 0) { + IntTripleBuilder builder_(_fbb); + builder_.add_third(third); + builder_.add_second(second); + builder_.add_first(first); + return builder_.Finish(); +} + +} // namespace graph +} // namespace sd + +#endif // FLATBUFFERS_GENERATED_UTILS_ND4J_GRAPH_H_ diff --git a/libnd4j/include/graph/generated/utils_generated.js b/libnd4j/include/graph/generated/utils_generated.js new file mode 100644 index 000000000..9c0a86628 --- /dev/null +++ b/libnd4j/include/graph/generated/utils_generated.js @@ -0,0 +1,453 @@ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ + +/** + * @const + * @namespace + */ +var nd4j = nd4j || {}; + +/** + * @const + * @namespace + */ +nd4j.graph = nd4j.graph || {}; + +/** + * @enum + */ +nd4j.graph.OpType = { + TRANSFORM_FLOAT: 0, + TRANSFORM_SAME: 1, + TRANSFORM_BOOL: 2, + TRANSFORM_STRICT: 3, + TRANSFORM_ANY: 4, + REDUCE_FLOAT: 5, + REDUCE_SAME: 6, + REDUCE_LONG: 7, + REDUCE_BOOL: 8, + INDEX_REDUCE: 9, + SCALAR: 10, + SCALAR_BOOL: 11, + BROADCAST: 12, + BROADCAST_BOOL: 13, + PAIRWISE: 14, + PAIRWISE_BOOL: 15, + REDUCE_3: 16, + SUMMARYSTATS: 17, + SHAPE: 18, + AGGREGATION: 19, + RANDOM: 20, + CUSTOM: 21, + GRAPH: 22, + VARIABLE: 40, + BOOLEAN: 60, + LOGIC: 119 +}; + +/** + * @enum + */ +nd4j.graph.InputType = { + UNDEFINED: 0, + NUMERIC: 1, + STRINGULAR: 2, + NUMERIC_SET: 3, + STRINGULAR_SET: 4 +}; + +/** + * @enum + */ +nd4j.graph.OpClass = { + TRANSFORM: 0, + REDUCTION: 1, + MULTIPLICATOR: 2, + GRAPH: 3, + CONDITIONAL: 4, + LOOP: 5 +}; + +/** + * @constructor + */ +nd4j.graph.LongPair = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.LongPair} + */ +nd4j.graph.LongPair.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.LongPair=} obj + * @returns {nd4j.graph.LongPair} + */ +nd4j.graph.LongPair.getRootAsLongPair = function(bb, obj) { + return (obj || new nd4j.graph.LongPair).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.LongPair.prototype.first = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.LongPair.prototype.second = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.LongPair.startLongPair = function(builder) { + builder.startObject(2); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} first + */ +nd4j.graph.LongPair.addFirst = function(builder, first) { + builder.addFieldInt64(0, first, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} second + */ +nd4j.graph.LongPair.addSecond = function(builder, second) { + builder.addFieldInt64(1, second, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.LongPair.endLongPair = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @constructor + */ +nd4j.graph.LongTriple = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.LongTriple} + */ +nd4j.graph.LongTriple.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.LongTriple=} obj + * @returns {nd4j.graph.LongTriple} + */ +nd4j.graph.LongTriple.getRootAsLongTriple = function(bb, obj) { + return (obj || new nd4j.graph.LongTriple).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.LongTriple.prototype.first = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.LongTriple.prototype.second = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @returns {flatbuffers.Long} + */ +nd4j.graph.LongTriple.prototype.third = function() { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? this.bb.readInt64(this.bb_pos + offset) : this.bb.createLong(0, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.LongTriple.startLongTriple = function(builder) { + builder.startObject(3); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} first + */ +nd4j.graph.LongTriple.addFirst = function(builder, first) { + builder.addFieldInt64(0, first, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} second + */ +nd4j.graph.LongTriple.addSecond = function(builder, second) { + builder.addFieldInt64(1, second, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Long} third + */ +nd4j.graph.LongTriple.addThird = function(builder, third) { + builder.addFieldInt64(2, third, builder.createLong(0, 0)); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.LongTriple.endLongTriple = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @constructor + */ +nd4j.graph.IntPair = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.IntPair} + */ +nd4j.graph.IntPair.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.IntPair=} obj + * @returns {nd4j.graph.IntPair} + */ +nd4j.graph.IntPair.getRootAsIntPair = function(bb, obj) { + return (obj || new nd4j.graph.IntPair).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {number} + */ +nd4j.graph.IntPair.prototype.first = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @returns {number} + */ +nd4j.graph.IntPair.prototype.second = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.IntPair.startIntPair = function(builder) { + builder.startObject(2); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} first + */ +nd4j.graph.IntPair.addFirst = function(builder, first) { + builder.addFieldInt32(0, first, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} second + */ +nd4j.graph.IntPair.addSecond = function(builder, second) { + builder.addFieldInt32(1, second, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.IntPair.endIntPair = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @constructor + */ +nd4j.graph.IntTriple = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.IntTriple} + */ +nd4j.graph.IntTriple.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.IntTriple=} obj + * @returns {nd4j.graph.IntTriple} + */ +nd4j.graph.IntTriple.getRootAsIntTriple = function(bb, obj) { + return (obj || new nd4j.graph.IntTriple).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @returns {number} + */ +nd4j.graph.IntTriple.prototype.first = function() { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @returns {number} + */ +nd4j.graph.IntTriple.prototype.second = function() { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @returns {number} + */ +nd4j.graph.IntTriple.prototype.third = function() { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.IntTriple.startIntTriple = function(builder) { + builder.startObject(3); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} first + */ +nd4j.graph.IntTriple.addFirst = function(builder, first) { + builder.addFieldInt32(0, first, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} second + */ +nd4j.graph.IntTriple.addSecond = function(builder, second) { + builder.addFieldInt32(1, second, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} third + */ +nd4j.graph.IntTriple.addThird = function(builder, third) { + builder.addFieldInt32(2, third, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.IntTriple.endIntTriple = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +// Exports for Node.js and RequireJS +this.nd4j = nd4j; diff --git a/libnd4j/include/graph/generated/variable_generated.h b/libnd4j/include/graph/generated/variable_generated.h new file mode 100644 index 000000000..a0e43a5af --- /dev/null +++ b/libnd4j/include/graph/generated/variable_generated.h @@ -0,0 +1,251 @@ +// automatically generated by the FlatBuffers compiler, do not modify + + +#ifndef FLATBUFFERS_GENERATED_VARIABLE_ND4J_GRAPH_H_ +#define FLATBUFFERS_GENERATED_VARIABLE_ND4J_GRAPH_H_ + +#include "flatbuffers/flatbuffers.h" + +#include "array_generated.h" +#include "utils_generated.h" + +namespace sd { +namespace graph { + +struct FlatVariable; + +enum VarType { + VarType_VARIABLE = 0, + VarType_CONSTANT = 1, + VarType_ARRAY = 2, + VarType_PLACEHOLDER = 3, + VarType_MIN = VarType_VARIABLE, + VarType_MAX = VarType_PLACEHOLDER +}; + +inline const VarType (&EnumValuesVarType())[4] { + static const VarType values[] = { + VarType_VARIABLE, + VarType_CONSTANT, + VarType_ARRAY, + VarType_PLACEHOLDER + }; + return values; +} + +inline const char * const *EnumNamesVarType() { + static const char * const names[] = { + "VARIABLE", + "CONSTANT", + "ARRAY", + "PLACEHOLDER", + nullptr + }; + return names; +} + +inline const char *EnumNameVarType(VarType e) { + const size_t index = static_cast(e); + return EnumNamesVarType()[index]; +} + +struct FlatVariable FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + enum { + VT_ID = 4, + VT_NAME = 6, + VT_DTYPE = 8, + VT_SHAPE = 10, + VT_NDARRAY = 12, + VT_DEVICE = 14, + VT_VARIABLETYPE = 16, + VT_CONTROLDEPS = 18, + VT_CONTROLDEPFOROP = 20, + VT_CONTROLDEPSFORVAR = 22 + }; + const IntPair *id() const { + return GetPointer(VT_ID); + } + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); + } + DType dtype() const { + return static_cast(GetField(VT_DTYPE, 0)); + } + const flatbuffers::Vector *shape() const { + return GetPointer *>(VT_SHAPE); + } + const FlatArray *ndarray() const { + return GetPointer(VT_NDARRAY); + } + int32_t device() const { + return GetField(VT_DEVICE, 0); + } + VarType variabletype() const { + return static_cast(GetField(VT_VARIABLETYPE, 0)); + } + const flatbuffers::Vector> *controlDeps() const { + return GetPointer> *>(VT_CONTROLDEPS); + } + const flatbuffers::Vector> *controlDepForOp() const { + return GetPointer> *>(VT_CONTROLDEPFOROP); + } + const flatbuffers::Vector> *controlDepsForVar() const { + return GetPointer> *>(VT_CONTROLDEPSFORVAR); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_ID) && + verifier.VerifyTable(id()) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyField(verifier, VT_DTYPE) && + VerifyOffset(verifier, VT_SHAPE) && + verifier.VerifyVector(shape()) && + VerifyOffset(verifier, VT_NDARRAY) && + verifier.VerifyTable(ndarray()) && + VerifyField(verifier, VT_DEVICE) && + VerifyField(verifier, VT_VARIABLETYPE) && + VerifyOffset(verifier, VT_CONTROLDEPS) && + verifier.VerifyVector(controlDeps()) && + verifier.VerifyVectorOfStrings(controlDeps()) && + VerifyOffset(verifier, VT_CONTROLDEPFOROP) && + verifier.VerifyVector(controlDepForOp()) && + verifier.VerifyVectorOfStrings(controlDepForOp()) && + VerifyOffset(verifier, VT_CONTROLDEPSFORVAR) && + verifier.VerifyVector(controlDepsForVar()) && + verifier.VerifyVectorOfStrings(controlDepsForVar()) && + verifier.EndTable(); + } +}; + +struct FlatVariableBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_id(flatbuffers::Offset id) { + fbb_.AddOffset(FlatVariable::VT_ID, id); + } + void add_name(flatbuffers::Offset name) { + fbb_.AddOffset(FlatVariable::VT_NAME, name); + } + void add_dtype(DType dtype) { + fbb_.AddElement(FlatVariable::VT_DTYPE, static_cast(dtype), 0); + } + void add_shape(flatbuffers::Offset> shape) { + fbb_.AddOffset(FlatVariable::VT_SHAPE, shape); + } + void add_ndarray(flatbuffers::Offset ndarray) { + fbb_.AddOffset(FlatVariable::VT_NDARRAY, ndarray); + } + void add_device(int32_t device) { + fbb_.AddElement(FlatVariable::VT_DEVICE, device, 0); + } + void add_variabletype(VarType variabletype) { + fbb_.AddElement(FlatVariable::VT_VARIABLETYPE, static_cast(variabletype), 0); + } + void add_controlDeps(flatbuffers::Offset>> controlDeps) { + fbb_.AddOffset(FlatVariable::VT_CONTROLDEPS, controlDeps); + } + void add_controlDepForOp(flatbuffers::Offset>> controlDepForOp) { + fbb_.AddOffset(FlatVariable::VT_CONTROLDEPFOROP, controlDepForOp); + } + void add_controlDepsForVar(flatbuffers::Offset>> controlDepsForVar) { + fbb_.AddOffset(FlatVariable::VT_CONTROLDEPSFORVAR, controlDepsForVar); + } + explicit FlatVariableBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + FlatVariableBuilder &operator=(const FlatVariableBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateFlatVariable( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset id = 0, + flatbuffers::Offset name = 0, + DType dtype = DType_INHERIT, + flatbuffers::Offset> shape = 0, + flatbuffers::Offset ndarray = 0, + int32_t device = 0, + VarType variabletype = VarType_VARIABLE, + flatbuffers::Offset>> controlDeps = 0, + flatbuffers::Offset>> controlDepForOp = 0, + flatbuffers::Offset>> controlDepsForVar = 0) { + FlatVariableBuilder builder_(_fbb); + builder_.add_controlDepsForVar(controlDepsForVar); + builder_.add_controlDepForOp(controlDepForOp); + builder_.add_controlDeps(controlDeps); + builder_.add_device(device); + builder_.add_ndarray(ndarray); + builder_.add_shape(shape); + builder_.add_name(name); + builder_.add_id(id); + builder_.add_variabletype(variabletype); + builder_.add_dtype(dtype); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateFlatVariableDirect( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset id = 0, + const char *name = nullptr, + DType dtype = DType_INHERIT, + const std::vector *shape = nullptr, + flatbuffers::Offset ndarray = 0, + int32_t device = 0, + VarType variabletype = VarType_VARIABLE, + const std::vector> *controlDeps = nullptr, + const std::vector> *controlDepForOp = nullptr, + const std::vector> *controlDepsForVar = nullptr) { + return sd::graph::CreateFlatVariable( + _fbb, + id, + name ? _fbb.CreateString(name) : 0, + dtype, + shape ? _fbb.CreateVector(*shape) : 0, + ndarray, + device, + variabletype, + controlDeps ? _fbb.CreateVector>(*controlDeps) : 0, + controlDepForOp ? _fbb.CreateVector>(*controlDepForOp) : 0, + controlDepsForVar ? _fbb.CreateVector>(*controlDepsForVar) : 0); +} + +inline const sd::graph::FlatVariable *GetFlatVariable(const void *buf) { + return flatbuffers::GetRoot(buf); +} + +inline const sd::graph::FlatVariable *GetSizePrefixedFlatVariable(const void *buf) { + return flatbuffers::GetSizePrefixedRoot(buf); +} + +inline bool VerifyFlatVariableBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifyBuffer(nullptr); +} + +inline bool VerifySizePrefixedFlatVariableBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifySizePrefixedBuffer(nullptr); +} + +inline void FinishFlatVariableBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.Finish(root); +} + +inline void FinishSizePrefixedFlatVariableBuffer( + flatbuffers::FlatBufferBuilder &fbb, + flatbuffers::Offset root) { + fbb.FinishSizePrefixed(root); +} + +} // namespace graph +} // namespace sd + +#endif // FLATBUFFERS_GENERATED_VARIABLE_ND4J_GRAPH_H_ diff --git a/libnd4j/include/graph/generated/variable_generated.js b/libnd4j/include/graph/generated/variable_generated.js new file mode 100644 index 000000000..5b5ce1c10 --- /dev/null +++ b/libnd4j/include/graph/generated/variable_generated.js @@ -0,0 +1,389 @@ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ + +/** + * @const + * @namespace + */ +var nd4j = nd4j || {}; + +/** + * @const + * @namespace + */ +nd4j.graph = nd4j.graph || {}; + +/** + * @enum + */ +nd4j.graph.VarType = { + VARIABLE: 0, + CONSTANT: 1, + ARRAY: 2, + PLACEHOLDER: 3 +}; + +/** + * @constructor + */ +nd4j.graph.FlatVariable = function() { + /** + * @type {flatbuffers.ByteBuffer} + */ + this.bb = null; + + /** + * @type {number} + */ + this.bb_pos = 0; +}; + +/** + * @param {number} i + * @param {flatbuffers.ByteBuffer} bb + * @returns {nd4j.graph.FlatVariable} + */ +nd4j.graph.FlatVariable.prototype.__init = function(i, bb) { + this.bb_pos = i; + this.bb = bb; + return this; +}; + +/** + * @param {flatbuffers.ByteBuffer} bb + * @param {nd4j.graph.FlatVariable=} obj + * @returns {nd4j.graph.FlatVariable} + */ +nd4j.graph.FlatVariable.getRootAsFlatVariable = function(bb, obj) { + return (obj || new nd4j.graph.FlatVariable).__init(bb.readInt32(bb.position()) + bb.position(), bb); +}; + +/** + * @param {nd4j.graph.IntPair=} obj + * @returns {nd4j.graph.IntPair|null} + */ +nd4j.graph.FlatVariable.prototype.id = function(obj) { + var offset = this.bb.__offset(this.bb_pos, 4); + return offset ? (obj || new nd4j.graph.IntPair).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; +}; + +/** + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array|null} + */ +nd4j.graph.FlatVariable.prototype.name = function(optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 6); + return offset ? this.bb.__string(this.bb_pos + offset, optionalEncoding) : null; +}; + +/** + * @returns {nd4j.graph.DType} + */ +nd4j.graph.FlatVariable.prototype.dtype = function() { + var offset = this.bb.__offset(this.bb_pos, 8); + return offset ? /** @type {nd4j.graph.DType} */ (this.bb.readInt8(this.bb_pos + offset)) : nd4j.graph.DType.INHERIT; +}; + +/** + * @param {number} index + * @returns {flatbuffers.Long} + */ +nd4j.graph.FlatVariable.prototype.shape = function(index) { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? this.bb.readInt64(this.bb.__vector(this.bb_pos + offset) + index * 8) : this.bb.createLong(0, 0); +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatVariable.prototype.shapeLength = function() { + var offset = this.bb.__offset(this.bb_pos, 10); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {nd4j.graph.FlatArray=} obj + * @returns {nd4j.graph.FlatArray|null} + */ +nd4j.graph.FlatVariable.prototype.ndarray = function(obj) { + var offset = this.bb.__offset(this.bb_pos, 12); + return offset ? (obj || new nd4j.graph.FlatArray).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatVariable.prototype.device = function() { + var offset = this.bb.__offset(this.bb_pos, 14); + return offset ? this.bb.readInt32(this.bb_pos + offset) : 0; +}; + +/** + * @returns {nd4j.graph.VarType} + */ +nd4j.graph.FlatVariable.prototype.variabletype = function() { + var offset = this.bb.__offset(this.bb_pos, 16); + return offset ? /** @type {nd4j.graph.VarType} */ (this.bb.readInt8(this.bb_pos + offset)) : nd4j.graph.VarType.VARIABLE; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.FlatVariable.prototype.controlDeps = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 18); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatVariable.prototype.controlDepsLength = function() { + var offset = this.bb.__offset(this.bb_pos, 18); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.FlatVariable.prototype.controlDepForOp = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 20); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatVariable.prototype.controlDepForOpLength = function() { + var offset = this.bb.__offset(this.bb_pos, 20); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {number} index + * @param {flatbuffers.Encoding=} optionalEncoding + * @returns {string|Uint8Array} + */ +nd4j.graph.FlatVariable.prototype.controlDepsForVar = function(index, optionalEncoding) { + var offset = this.bb.__offset(this.bb_pos, 22); + return offset ? this.bb.__string(this.bb.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +}; + +/** + * @returns {number} + */ +nd4j.graph.FlatVariable.prototype.controlDepsForVarLength = function() { + var offset = this.bb.__offset(this.bb_pos, 22); + return offset ? this.bb.__vector_len(this.bb_pos + offset) : 0; +}; + +/** + * @param {flatbuffers.Builder} builder + */ +nd4j.graph.FlatVariable.startFlatVariable = function(builder) { + builder.startObject(10); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} idOffset + */ +nd4j.graph.FlatVariable.addId = function(builder, idOffset) { + builder.addFieldOffset(0, idOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} nameOffset + */ +nd4j.graph.FlatVariable.addName = function(builder, nameOffset) { + builder.addFieldOffset(1, nameOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {nd4j.graph.DType} dtype + */ +nd4j.graph.FlatVariable.addDtype = function(builder, dtype) { + builder.addFieldInt8(2, dtype, nd4j.graph.DType.INHERIT); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} shapeOffset + */ +nd4j.graph.FlatVariable.addShape = function(builder, shapeOffset) { + builder.addFieldOffset(3, shapeOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatVariable.createShapeVector = function(builder, data) { + builder.startVector(8, data.length, 8); + for (var i = data.length - 1; i >= 0; i--) { + builder.addInt64(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatVariable.startShapeVector = function(builder, numElems) { + builder.startVector(8, numElems, 8); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} ndarrayOffset + */ +nd4j.graph.FlatVariable.addNdarray = function(builder, ndarrayOffset) { + builder.addFieldOffset(4, ndarrayOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} device + */ +nd4j.graph.FlatVariable.addDevice = function(builder, device) { + builder.addFieldInt32(5, device, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {nd4j.graph.VarType} variabletype + */ +nd4j.graph.FlatVariable.addVariabletype = function(builder, variabletype) { + builder.addFieldInt8(6, variabletype, nd4j.graph.VarType.VARIABLE); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} controlDepsOffset + */ +nd4j.graph.FlatVariable.addControlDeps = function(builder, controlDepsOffset) { + builder.addFieldOffset(7, controlDepsOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatVariable.createControlDepsVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatVariable.startControlDepsVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} controlDepForOpOffset + */ +nd4j.graph.FlatVariable.addControlDepForOp = function(builder, controlDepForOpOffset) { + builder.addFieldOffset(8, controlDepForOpOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatVariable.createControlDepForOpVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatVariable.startControlDepForOpVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} controlDepsForVarOffset + */ +nd4j.graph.FlatVariable.addControlDepsForVar = function(builder, controlDepsForVarOffset) { + builder.addFieldOffset(9, controlDepsForVarOffset, 0); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {Array.} data + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatVariable.createControlDepsForVarVector = function(builder, data) { + builder.startVector(4, data.length, 4); + for (var i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]); + } + return builder.endVector(); +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {number} numElems + */ +nd4j.graph.FlatVariable.startControlDepsForVarVector = function(builder, numElems) { + builder.startVector(4, numElems, 4); +}; + +/** + * @param {flatbuffers.Builder} builder + * @returns {flatbuffers.Offset} + */ +nd4j.graph.FlatVariable.endFlatVariable = function(builder) { + var offset = builder.endObject(); + return offset; +}; + +/** + * @param {flatbuffers.Builder} builder + * @param {flatbuffers.Offset} offset + */ +nd4j.graph.FlatVariable.finishFlatVariableBuffer = function(builder, offset) { + builder.finish(offset); +}; + +// Exports for Node.js and RequireJS +this.nd4j = nd4j; diff --git a/libnd4j/include/ops/declarable/generic/parity_ops/bincount.cpp b/libnd4j/include/ops/declarable/generic/parity_ops/bincount.cpp index cf028e7cb..86868ef67 100644 --- a/libnd4j/include/ops/declarable/generic/parity_ops/bincount.cpp +++ b/libnd4j/include/ops/declarable/generic/parity_ops/bincount.cpp @@ -38,7 +38,7 @@ namespace sd { CUSTOM_OP_IMPL(bincount, 1, 1, false, 0, 0) { auto values = INPUT_VARIABLE(0); - + NDArray *weights = nullptr; int maxLength = -1; @@ -54,11 +54,24 @@ namespace sd { if (block.width() == 2) { // the second argument is weights weights = INPUT_VARIABLE(1); + if(weights->lengthOf() < 1) { + weights = NDArrayFactory::create_('c',values->getShapeAsVector(),values->dataType()); + weights->assign(1); + } else if(weights->isScalar()) { + auto value = weights->asVectorT(); + weights = NDArrayFactory::create_('c',values->getShapeAsVector(),values->dataType()); + weights->assign(value[0]); + + } + REQUIRE_TRUE(values->isSameShape(weights), 0, "bincount: the input and weights shapes should be equals"); } else if (block.width() == 3) { // the second argument is min and the third is max auto min= INPUT_VARIABLE(1); - auto max = INPUT_VARIABLE(2); + auto max = min; + if(INPUT_VARIABLE(2)->lengthOf() > 0) { + max = INPUT_VARIABLE(2); + } minLength = min->e(0); maxLength = max->e(0); } @@ -66,24 +79,38 @@ namespace sd { auto min= INPUT_VARIABLE(2); auto max = INPUT_VARIABLE(3); minLength = min->e(0); - maxLength = max->e(0); + if(INPUT_VARIABLE(2)->lengthOf() > 0) { + maxLength = max->e(0); + } + else + maxLength = minLength; weights = INPUT_VARIABLE(1); + if(weights->lengthOf() < 1) { + weights = NDArrayFactory::create_('c',values->getShapeAsVector(),values->dataType()); + weights->assign(1); + } else if(weights->isScalar()) { + auto value = weights->asVectorT(); + weights = NDArrayFactory::create_('c',values->getShapeAsVector(),values->dataType()); + weights->assign(value[0]); + + } REQUIRE_TRUE(values->isSameShape(weights), 0, "bincount: the input and weights shapes should be equals"); } + minLength = sd::math::nd4j_max(minLength, 0); maxLength = sd::math::nd4j_min(maxLength, values->e(maxIndex) + 1); auto result = OUTPUT_VARIABLE(0); result->assign(0.0f); - + helpers::adjustWeights(block.launchContext(), values, weights, result, minLength, maxLength); return Status::OK(); } DECLARE_SHAPE_FN(bincount) { - auto shapeList = SHAPELIST(); + auto shapeList = SHAPELIST(); auto in = INPUT_VARIABLE(0); sd::DataType dtype = DataType::INT32; if (block.width() > 1) @@ -94,28 +121,38 @@ namespace sd { int maxIndex = in->argMax(); int maxLength = in->e(maxIndex) + 1; int outLength = maxLength; + if (block.numI() > 0) outLength = sd::math::nd4j_max(maxLength, INT_ARG(0)); - if (block.numI() > 1) + if (block.numI() > 1) outLength = sd::math::nd4j_min(outLength, INT_ARG(1)); + if (block.width() == 3) { // the second argument is min and the third is max - auto min= INPUT_VARIABLE(1)->e(0); - auto max = INPUT_VARIABLE(2)->e(0); + auto min = INPUT_VARIABLE(1)->e(0); + auto max = min; + if(INPUT_VARIABLE(2)->lengthOf() > 0) { + max = INPUT_VARIABLE(2)->e(0); + } + outLength = sd::math::nd4j_max(maxLength, min); outLength = sd::math::nd4j_min(outLength, max); } else if (block.width() > 3) { auto min= INPUT_VARIABLE(2); - auto max = INPUT_VARIABLE(3); + auto max = min; + if(INPUT_VARIABLE(3)->lengthOf() > 0) { + max = INPUT_VARIABLE(3); + } outLength = sd::math::nd4j_max(maxLength, min->e(0)); outLength = sd::math::nd4j_min(outLength, max->e(0)); } + auto newshape = ConstantShapeHelper::getInstance().vectorShapeInfo(outLength, dtype); - shapeList->push_back(newshape); + shapeList->push_back(newshape); return shapeList; } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/ir/MapperNamespace.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/ir/MapperNamespace.java index 51c920e2e..0f1f7d837 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/ir/MapperNamespace.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/ir/MapperNamespace.java @@ -1,23 +1,3 @@ -/* - * ****************************************************************************** - * * - * * - * * This program and the accompanying materials are made available under the - * * terms of the Apache License, Version 2.0 which is available at - * * https://www.apache.org/licenses/LICENSE-2.0. - * * - * * See the NOTICE file distributed with this work for additional - * * information regarding copyright ownership. - * * 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. - * * - * * SPDX-License-Identifier: Apache-2.0 - * ***************************************************************************** - */ - // Generated by the protocol buffer compiler. DO NOT EDIT! // source: mapper.proto diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/ir/OpNamespace.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/ir/OpNamespace.java index a9fabbd74..a7e826739 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/ir/OpNamespace.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/ir/OpNamespace.java @@ -1,23 +1,3 @@ -/* - * ****************************************************************************** - * * - * * - * * This program and the accompanying materials are made available under the - * * terms of the Apache License, Version 2.0 which is available at - * * https://www.apache.org/licenses/LICENSE-2.0. - * * - * * See the NOTICE file distributed with this work for additional - * * information regarding copyright ownership. - * * 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. - * * - * * SPDX-License-Identifier: Apache-2.0 - * ***************************************************************************** - */ - // Generated by the protocol buffer compiler. DO NOT EDIT! // source: op.proto diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/ir/TensorNamespace.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/ir/TensorNamespace.java index 33fb7e045..434bda3a8 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/ir/TensorNamespace.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/ir/TensorNamespace.java @@ -1,23 +1,3 @@ -/* - * ****************************************************************************** - * * - * * - * * This program and the accompanying materials are made available under the - * * terms of the Apache License, Version 2.0 which is available at - * * https://www.apache.org/licenses/LICENSE-2.0. - * * - * * See the NOTICE file distributed with this work for additional - * * information regarding copyright ownership. - * * 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. - * * - * * SPDX-License-Identifier: Apache-2.0 - * ***************************************************************************** - */ - // Generated by the protocol buffer compiler. DO NOT EDIT! // source: tensor.proto diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/controlflow/compat/Merge.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/controlflow/compat/Merge.java index 6d7bbcc42..00e6c9e4d 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/controlflow/compat/Merge.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/controlflow/compat/Merge.java @@ -93,8 +93,7 @@ public class Merge extends BaseCompatOp { @Override public List calculateOutputDataTypes(List inputDataTypes){ - Preconditions.checkState(inputDataTypes != null && inputDataTypes.size() == 2, "Expected 2 input dataypes for %s, got %s", getClass(), inputDataTypes); - Preconditions.checkState(inputDataTypes.get(0) == inputDataTypes.get(1), "Input datatypes must be the same for %s, got %s", getClass(), inputDataTypes); + Preconditions.checkState(inputDataTypes != null && inputDataTypes.size() >= 1, "Expected at least 1 input data types for %s, got %s", getClass(), inputDataTypes); return Collections.singletonList(inputDataTypes.get(0)); } } diff --git a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/DeConv2DTF.java b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/DeConv2DTF.java index 47c822ff3..14f594611 100644 --- a/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/DeConv2DTF.java +++ b/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/layers/convolution/DeConv2DTF.java @@ -244,6 +244,9 @@ public class DeConv2DTF extends DynamicCustomOp { public List calculateOutputDataTypes(List inputDataTypes){ //inShape, weights, input int n = args().length; Preconditions.checkState(inputDataTypes != null && inputDataTypes.size() == n, "Expected %s input data types for %s, got %s", n, getClass(), inputDataTypes); + if(!dArguments.isEmpty()) { + return Arrays.asList(dArguments.get(0)); + } return Collections.singletonList(inputDataTypes.get(2)); } } diff --git a/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/pom.xml b/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/pom.xml index 2c592d645..056e98fde 100644 --- a/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/pom.xml +++ b/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/pom.xml @@ -380,7 +380,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.0.2 + 3.1.2 unpack diff --git a/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/org.bytedecojavacpp1.5.4, b/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/org.bytedecojavacpp1.5.4, new file mode 100644 index 000000000..e69de29bb diff --git a/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/pom.xml b/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/pom.xml index db6bf71c8..c9d706d6a 100644 --- a/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/pom.xml +++ b/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/pom.xml @@ -88,14 +88,14 @@ ${javacpp.parser.skip} - org/nd4j/nativeblas/Nd4jCpuPresets.java + org/nd4j/nativeblas/**.java - 7 - 7 + 8 + 8 @@ -185,7 +185,7 @@ build - + javacpp-compiler process-classes @@ -387,7 +387,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.0.2 + 3.1.2 unpack diff --git a/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/linalg/cpu/nativecpu/ops/NativeOpExecutioner.java b/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/linalg/cpu/nativecpu/ops/NativeOpExecutioner.java index 384e9ae15..8b7074694 100644 --- a/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/linalg/cpu/nativecpu/ops/NativeOpExecutioner.java +++ b/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/linalg/cpu/nativecpu/ops/NativeOpExecutioner.java @@ -264,7 +264,7 @@ public class NativeOpExecutioner extends DefaultOpExecutioner { } // FIXME: this should be moved down to C++ on per-op basis - val dimension = Shape.normalizeAxis(x.rank(), op.dimensions().toIntVector()); + val dimension = Shape.normalizeAxis(x.rank(), op.dimensions() != null ? op.dimensions().toIntVector() : null); // reduce to scalar case, ReduceBool ops require special treatment if (op instanceof BaseReduceBoolOp && x.isEmpty() && (dimension == null || (dimension.length == 1 && dimension[0] == Integer.MAX_VALUE))) { if (z == null) { diff --git a/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/nativeblas/Nd4jCpu.java b/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/nativeblas/Nd4jCpu.java index 23818981c..ad6242886 100644 --- a/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/nativeblas/Nd4jCpu.java +++ b/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/nativeblas/Nd4jCpu.java @@ -1,23 +1,3 @@ -/* - * ****************************************************************************** - * * - * * - * * This program and the accompanying materials are made available under the - * * terms of the Apache License, Version 2.0 which is available at - * * https://www.apache.org/licenses/LICENSE-2.0. - * * - * * See the NOTICE file distributed with this work for additional - * * information regarding copyright ownership. - * * 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. - * * - * * SPDX-License-Identifier: Apache-2.0 - * ***************************************************************************** - */ - // Targeted by JavaCPP version 1.5.4: DO NOT EDIT THIS FILE package org.nd4j.nativeblas; @@ -520,21 +500,25 @@ public class Nd4jCpu extends org.nd4j.nativeblas.Nd4jCpuHelper { // Parsed from array/PointerDeallocator.h -/******************************************************************************* - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://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. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ // // @author raver119@gmail.com @@ -553,21 +537,25 @@ public class Nd4jCpu extends org.nd4j.nativeblas.Nd4jCpuHelper { // Parsed from array/PointerWrapper.h -/******************************************************************************* - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://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. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ // // @author raver119@gmail.com @@ -650,21 +638,25 @@ public class Nd4jCpu extends org.nd4j.nativeblas.Nd4jCpuHelper { // Parsed from array/ConstantShapeBuffer.h -/******************************************************************************* - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://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. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ // // @author raver119@gmail.com @@ -707,21 +699,25 @@ public class Nd4jCpu extends org.nd4j.nativeblas.Nd4jCpuHelper { // Parsed from array/ConstantOffsetsBuffer.h -/******************************************************************************* - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://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. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ // // @author raver119@gmail.com @@ -1016,13 +1012,15 @@ public class Nd4jCpu extends org.nd4j.nativeblas.Nd4jCpuHelper { // Parsed from execution/ExecutionMode.h -/******************************************************************************* - * Copyright (c) 2019-2020 Konduit K.K +/* ****************************************************************************** + * * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * + * See the NOTICE file distributed with this work for additional + * information regarding copyright ownership. * 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 @@ -1032,6 +1030,7 @@ public class Nd4jCpu extends org.nd4j.nativeblas.Nd4jCpuHelper { * SPDX-License-Identifier: Apache-2.0 ******************************************************************************/ + // // @author raver119@gmail.com // @@ -18600,22 +18599,25 @@ public static final double TAD_THRESHOLD = TAD_THRESHOLD(); // Parsed from ops/declarable/headers/parity_ops.h -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://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. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ // // @author raver119@gmail.com @@ -23556,22 +23558,25 @@ public static final double TAD_THRESHOLD = TAD_THRESHOLD(); // Parsed from ops/declarable/headers/random.h -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019 Konduit K.K. - * - * This program and the accompanying materials are made available under the - * terms of the Apache License, Version 2.0 which is available at - * https://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. - * - * SPDX-License-Identifier: Apache-2.0 - ******************************************************************************/ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ // // @author raver119@gmail.com @@ -26311,14 +26316,15 @@ public static final double TAD_THRESHOLD = TAD_THRESHOLD(); // Parsed from array/ShapeDescriptor.h -/******************************************************************************* - * Copyright (c) 2015-2018 Skymind, Inc. - * Copyright (c) 2019-2020 Konduit K.K. - * +/* ****************************************************************************** + * + * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * + * See the NOTICE file distributed with this work for additional + * information regarding copyright ownership. * 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 diff --git a/nd4j/nd4j-backends/nd4j-backend-impls/pom.xml b/nd4j/nd4j-backends/nd4j-backend-impls/pom.xml index cc14a9520..5bf329385 100644 --- a/nd4j/nd4j-backends/nd4j-backend-impls/pom.xml +++ b/nd4j/nd4j-backends/nd4j-backend-impls/pom.xml @@ -36,11 +36,6 @@ nd4j-backend-impls - - nd4j-cuda - nd4j-cuda-platform - - ${project.groupId} diff --git a/nd4j/nd4j-backends/nd4j-tests/ops-removed-old.txt b/nd4j/nd4j-backends/nd4j-tests/ops-removed-old.txt index 201dc67b4..870f040eb 100644 --- a/nd4j/nd4j-backends/nd4j-tests/ops-removed-old.txt +++ b/nd4j/nd4j-backends/nd4j-tests/ops-removed-old.txt @@ -1,19 +1,3 @@ -in_0 -while/Const -while/add/y -in_0/read -while/Enter -while/Enter_1 -while/Merge -while/Merge_1 -while/Less -while/LoopCond -while/Switch -while/Switch_1 -while/Identity -while/Exit -while/Identity_1 -while/Exit_1 -while/add -while/NextIteration_1 -while/NextIteration +alpha +Sum/reduction_indices +Sum diff --git a/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/imports/TFGraphs/TFGraphTestAllSameDiff.java b/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/imports/TFGraphs/TFGraphTestAllSameDiff.java index 8b8dc90d7..3b512a4f0 100644 --- a/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/imports/TFGraphs/TFGraphTestAllSameDiff.java +++ b/nd4j/nd4j-backends/nd4j-tests/src/test/java/org/nd4j/imports/TFGraphs/TFGraphTestAllSameDiff.java @@ -69,9 +69,28 @@ public class TFGraphTestAllSameDiff { //Note: Can't extend BaseNd4jTest here a * the status of the test failing. No tests will run. */ public final static List EXECUTE_ONLY_MODELS = Arrays.asList( - "fused_batch_norm/float32_nhwc" - // , "fused_batch_norm/float16_nhwc" - + "conv2d_transpose/channels_last_b1_k2_s2_SAME", + "conv2d_transpose/channels_last_b1_k2_s1_SAME", + "bincount/rank1", + "bincount/rank1_weights", + "bincount/rank1_max5", + "emptyArrayTests/zeros/ones_rank3", + "conv2d_transpose/channels_last_b2_k2_s1_SAME_nobias", + "emptyArrayTests/identity_n/rank3.", + "emptyReduceAxisTests/reduce_sum/rank1", + "emptyReduceAxisTests/reduce_sum/rank1_keep", + "emptyReduceAxisTests/reduce_sum/rank3", + "emptyReduceAxisTests/reduce_any/rank2", + "embedding_lookup/rank2_multiple_div_nomaxnorm", + "emptyReduceAxisTests/reduce_all/rank2_keep", + "conv2d_transpose/channels_first_b1_k2_s1_SAME_sigmoid", + "conv2d_transpose/channels_first_b1_k2_s1_SAME_elu", + "emptyReduceAxisTests/reduce_prod/rank1", + "conv2d_transpose/channels_first_b2_k2_s1_SAME_nobias", + "conv2d_transpose/channels_last_b2_k2_s1_SAME_regularizers", + "conv2d_transpose/channels_last_b1_k2_s1_SAME_elu", + "conv2d_transpose/channels_first_b1_k2_s1_SAME_selu_nobias", + "embedding_lookup/rank2_multiple_mod_maxnorm1" ); public static final String[] IGNORE_REGEXES = new String[]{ diff --git a/nd4j/nd4j-common/src/test/java/org/nd4j/common/base/TestPreconditions.java b/nd4j/nd4j-common/src/test/java/org/nd4j/common/base/TestPreconditions.java index 12f0aba3a..9a4b4aa5a 100644 --- a/nd4j/nd4j-common/src/test/java/org/nd4j/common/base/TestPreconditions.java +++ b/nd4j/nd4j-common/src/test/java/org/nd4j/common/base/TestPreconditions.java @@ -21,7 +21,6 @@ package org.nd4j.common.base; import org.junit.Test; -import org.nd4j.common.base.Preconditions; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; diff --git a/nd4j/pom.xml b/nd4j/pom.xml index a3899dafe..170523f67 100644 --- a/nd4j/pom.xml +++ b/nd4j/pom.xml @@ -129,7 +129,7 @@ maven-jar-plugin - ${maven-jar-plugin.version} + 3.0.2 **/*.so diff --git a/nd4j/samediff-import/pom.xml b/nd4j/samediff-import/pom.xml index 6b522c0d2..3e38007df 100644 --- a/nd4j/samediff-import/pom.xml +++ b/nd4j/samediff-import/pom.xml @@ -44,7 +44,7 @@ - 1.4.30-M1 + 1.4.30 1.8 true 4.12 @@ -93,184 +93,149 @@ + + - - - org.projectlombok - lombok-maven-plugin - 1.18.12.0 - - - delombok - generate-sources - - delombok - - - - skip - - true - - - - test-delombok - generate-test-sources - - testDelombok - - - true - - - - + + + + org.projectlombok + lombok-maven-plugin + 1.18.12.0 + + + delombok + generate-sources + + delombok + + + + skip + + true + + + + test-delombok + generate-test-sources + + testDelombok + + + true + + + + - - org.codehaus.mojo - build-helper-maven-plugin - 3.0.0 - - - add-source - generate-sources - add-source - - - src/main/stubs - - - - - + + org.codehaus.mojo + build-helper-maven-plugin + 3.0.0 + + + add-source + generate-sources + add-source + + + src/main/stubs + + + + + - - org.apache.maven.plugins - maven-shade-plugin - ${maven-shade-plugin.version} - - true - false - - - *:* - - org/datanucleus/** - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - - - - + + org.jetbrains.kotlin + kotlin-maven-plugin + ${kotlin.version} + + + -Xjsr305=strict + + + spring + jpa + + + + + org.jetbrains.kotlin + kotlin-maven-allopen + 1.4.30-M1 + + + org.jetbrains.kotlin + kotlin-maven-noarg + 1.4.30-M1 + + + + + compile + compile + + + ${project.basedir}/src/main/stubs + ${project.basedir}/src/main/kotlin + ${project.basedir}/src/main/java + ${project.basedir}/src/main/ops + + + + + test-compile + test-compile + + + ${project.basedir}/src/test/stubs + ${project.basedir}/src/test/kotlin + ${project.basedir}/src/test/java + ${project.basedir}/src/test/ops + + + + + - - - package - - shade - - - - - reference.conf - - - - - - - - - - - org.jetbrains.kotlin - kotlin-maven-plugin - 1.4.30-M1 - - - -Xjsr305=strict - - - spring - jpa - - - - - org.jetbrains.kotlin - kotlin-maven-allopen - ${kotlin.version} - - - org.jetbrains.kotlin - kotlin-maven-noarg - ${kotlin.version} - - - - - compile - compile - - - ${project.basedir}/src/main/stubs - ${project.basedir}/src/main/kotlin - ${project.basedir}/src/main/java - ${project.basedir}/src/main/ops - - - - - test-compile - test-compile - - - ${project.basedir}/src/test/stubs - ${project.basedir}/src/test/kotlin - ${project.basedir}/src/test/java - ${project.basedir}/src/test/ops - - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.5.1 - - - - default-compile - none - - - - default-testCompile - none - - - java-compile - compile - compile - - - java-test-compile - test-compile - testCompile - - - - ${java.version} - ${java.version} - - - + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + + + default-compile + none + + + + default-testCompile + none + + + java-compile + compile + compile + + + java-test-compile + test-compile + testCompile + + + + ${java.version} + ${java.version} + + + + diff --git a/nd4j/samediff-import/samediff-import-api/pom.xml b/nd4j/samediff-import/samediff-import-api/pom.xml index d7c3997c7..80f113e9c 100644 --- a/nd4j/samediff-import/samediff-import-api/pom.xml +++ b/nd4j/samediff-import/samediff-import-api/pom.xml @@ -21,7 +21,7 @@ --> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 samediff-import-api @@ -46,6 +46,19 @@ 4.1 + + + + org.jetbrains.kotlin + kotlin-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + + + + io.github.classgraph diff --git a/nd4j/samediff-import/samediff-import-api/src/main/kotlin/org/nd4j/samediff/frameworkimport/ImportGraph.kt b/nd4j/samediff-import/samediff-import-api/src/main/kotlin/org/nd4j/samediff/frameworkimport/ImportGraph.kt index 5a11d1547..945c0aea8 100644 --- a/nd4j/samediff-import/samediff-import-api/src/main/kotlin/org/nd4j/samediff/frameworkimport/ImportGraph.kt +++ b/nd4j/samediff-import/samediff-import-api/src/main/kotlin/org/nd4j/samediff/frameworkimport/ImportGraph.kt @@ -441,10 +441,18 @@ open class ImportGraph intended number for ops //a common example is when ops convert input ndarrays to integers or float inputs - val numInputsToTake = importInfo[name]!!.second.argDescriptorList.filter { input -> input.argType == OpNamespace.ArgDescriptor.ArgType.INPUT_TENSOR } - .size - op.inputsToOp = inNames.subList(0,numInputsToTake) + val resolvedArgInputs = importInfo[name]!!.second.argDescriptorList.filter {input -> input.argType == OpNamespace.ArgDescriptor.ArgType.INPUT_TENSOR} + .sortedBy { argDescriptor -> argDescriptor.argIndex } + val numInputsToTake = resolvedArgInputs.size + if(numInputsToTake != inNames.size) { + if(numInputsToTake < inNames.size) + op.inputsToOp = inNames.subList(0, numInputsToTake) + else if(numInputsToTake > inNames.size) { + op.inputsToOp = resolvedArgInputs.map { input -> input.name } + } + } else + op.inputsToOp = inNames //add nodes/other pre processing in order for this node to work sd.ops[name] = op //clear out inputs for variables as well to reflect the actual graph structure diff --git a/nd4j/samediff-import/samediff-import-api/src/main/kotlin/org/nd4j/samediff/frameworkimport/context/MappingContext.kt b/nd4j/samediff-import/samediff-import-api/src/main/kotlin/org/nd4j/samediff/frameworkimport/context/MappingContext.kt index a3bf706fc..f82c07974 100644 --- a/nd4j/samediff-import/samediff-import-api/src/main/kotlin/org/nd4j/samediff/frameworkimport/context/MappingContext.kt +++ b/nd4j/samediff-import/samediff-import-api/src/main/kotlin/org/nd4j/samediff/frameworkimport/context/MappingContext.kt @@ -81,6 +81,12 @@ interface MappingContext): List { val ret = ArrayList() val mappingsToPerform = inputArgumentMappings() + val nameUsageCounts = Counter() mappingsToPerform.forEach { (k, v) -> ret.add(ArgDescriptor { - name = k + name = mappingContext.nodeInputNameForOpDefInputName(v) argType = OpNamespace.ArgDescriptor.ArgType.INPUT_TENSOR inputValue = mappingContext.tensorInputFor(v).toArgTensor() argIndex = lookupIndexForArgDescriptor( @@ -98,6 +100,8 @@ abstract class BaseNDArrayMappingRule< argDescriptorType = OpNamespace.ArgDescriptor.ArgType.INPUT_TENSOR ) }) + + nameUsageCounts.incrementCount(v,1.0) } diff --git a/nd4j/samediff-import/samediff-import-api/src/main/kotlin/org/nd4j/samediff/frameworkimport/rule/tensor/MultiInputIndexMappingRule.kt b/nd4j/samediff-import/samediff-import-api/src/main/kotlin/org/nd4j/samediff/frameworkimport/rule/tensor/MultiInputIndexMappingRule.kt index 911e8d257..d61f8182b 100644 --- a/nd4j/samediff-import/samediff-import-api/src/main/kotlin/org/nd4j/samediff/frameworkimport/rule/tensor/MultiInputIndexMappingRule.kt +++ b/nd4j/samediff-import/samediff-import-api/src/main/kotlin/org/nd4j/samediff/frameworkimport/rule/tensor/MultiInputIndexMappingRule.kt @@ -94,7 +94,7 @@ abstract class MultiInputIndexMappingRule< //in the outputs yet relevantInputs.forEachIndexed {index,inputName -> ret.add(ArgDescriptor { - name = "$k:$index" + name = "$v" argType = OpNamespace.ArgDescriptor.ArgType.INPUT_TENSOR inputValue = mappingContext.tensorInputFromInputFrameworkName(inputName).toArgTensor() argIndex = baseIndex + index diff --git a/nd4j/samediff-import/samediff-import-api/src/main/kotlin/org/nd4j/samediff/frameworkimport/rule/tensor/PassThroughMultiTensorMapping.kt b/nd4j/samediff-import/samediff-import-api/src/main/kotlin/org/nd4j/samediff/frameworkimport/rule/tensor/PassThroughMultiTensorMapping.kt new file mode 100644 index 000000000..76d6e13a0 --- /dev/null +++ b/nd4j/samediff-import/samediff-import-api/src/main/kotlin/org/nd4j/samediff/frameworkimport/rule/tensor/PassThroughMultiTensorMapping.kt @@ -0,0 +1,178 @@ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ +package org.nd4j.samediff.frameworkimport.rule.tensor + +import org.nd4j.ir.MapperNamespace +import org.nd4j.ir.OpNamespace +import org.nd4j.ir.TensorNamespace +import org.nd4j.samediff.frameworkimport.ArgDescriptor +import org.nd4j.samediff.frameworkimport.context.MappingContext +import org.nd4j.samediff.frameworkimport.findOp +import org.nd4j.samediff.frameworkimport.opdefs.OpDescriptorLoaderHolder +import org.nd4j.samediff.frameworkimport.process.MappingProcess +import org.nd4j.shade.protobuf.GeneratedMessageV3 +import org.nd4j.shade.protobuf.ProtocolMessageEnum + +abstract class PassThroughMultiTensorMapping< + GRAPH_DEF : GeneratedMessageV3, + OP_DEF_TYPE : GeneratedMessageV3, NODE_DEF_TYPE : GeneratedMessageV3, ATTR_DEF : GeneratedMessageV3, + ATTR_VALUE_TYPE : GeneratedMessageV3, TENSOR_TYPE : GeneratedMessageV3, + DATA_TYPE>( + mappingNamesToPerform: MutableMap = mutableMapOf(), + transformerArgs: Map> = emptyMap() +) : + TensorMappingRule + where DATA_TYPE : ProtocolMessageEnum { + + protected var opDescriptor: OpNamespace.OpDescriptor? = null + protected val mappingNamesToPerform = mappingNamesToPerform + protected val transformerArgs = transformerArgs + protected var mappingProcess: MappingProcess? = + null + protected var inputFrameworkOpName: String? = null + + override fun inputFrameworkOpName(): String { + return inputFrameworkOpName!! + } + + override fun modifyInputFrameworkOpName(inputFrameworkOpName: String) { + this.inputFrameworkOpName = inputFrameworkOpName + } + + override fun initWithMappingProcess(mappingProcess: MappingProcess) { + val opDescriptorList = OpDescriptorLoaderHolder.nd4jOpDescriptor + if (!opDescriptorList.opListList.map { it -> it.name }.contains(mappingProcess.opName())) { + throw java.lang.IllegalArgumentException("Op name ${mappingProcess.opName()} not found!") + } + opDescriptor = opDescriptorList.opListList.first { input -> + input.name == mappingProcess.opName() + } ?: error("") + this.mappingProcess = mappingProcess + this.inputFrameworkOpName = mappingProcess.inputFrameworkOpName() + } + + + operator fun set(outputAttribute: String, inputAttribute: String) { + mappingNamesToPerform[outputAttribute] = inputAttribute + } + + override fun name(): String { + return "passthrough" + } + + + override fun mappingNamesToPerform(): Map { + return mappingNamesToPerform + } + + + override fun convertInput(mappingContext: MappingContext): List { + val ret = ArrayList() + mappingContext.irNode().inputs().forEachIndexed { index,v -> + ret.add(ArgDescriptor { + name = "$v" + argType = OpNamespace.ArgDescriptor.ArgType.INPUT_TENSOR + inputValue = mappingContext.tensorInputFromInputFrameworkName(v).toArgTensor() + argIndex = index + }) + } + return ret + } + + abstract fun createTensorProto(input: TENSOR_TYPE): TensorNamespace.TensorProto + + + override fun convertInputsReverse(toReverse: List): List { + for (argument in toReverse) { + require(argument.argType == OpNamespace.ArgDescriptor.ArgType.INPUT_TENSOR) { "Type to reverse must be an input tensor." } + } + TODO("Not yet implemented") + } + + override fun inputArgumentMappings(): Map { + return mappingNamesToPerform + } + + override fun serialize(): MapperNamespace.MappingRule { + val builder = MapperNamespace.MappingRule.newBuilder() + builder.ruleName = name() + builder.functionName = name() + builder.ruleType = "tensor" + builder.inputFrameworkOpName = inputFrameworkOpName() + + for ((k, v) in transformerArgs) { + val descriptor = opDescriptor!!.argDescriptorList.filter { input -> input.name == k }[0] + when (descriptor.argType) { + OpNamespace.ArgDescriptor.ArgType.BOOL -> builder.addOutputBooleanName(k) + OpNamespace.ArgDescriptor.ArgType.INT64 -> builder.addOutputIntName(k) + OpNamespace.ArgDescriptor.ArgType.FLOAT -> builder.addOutputFloatName(k) + OpNamespace.ArgDescriptor.ArgType.DOUBLE -> builder.addOutputDoubleName(k) + OpNamespace.ArgDescriptor.ArgType.INT64 -> builder.addOutputIntName(k) + OpNamespace.ArgDescriptor.ArgType.INPUT_TENSOR -> builder.addInputTensorName(k) + OpNamespace.ArgDescriptor.ArgType.OUTPUT_TENSOR -> builder.addOutputTensorName(k) + } + + for (associatedInput in v) { + when (associatedInput.argType) { + OpNamespace.ArgDescriptor.ArgType.STRING -> builder.addInputStringAttrName(associatedInput.name) + OpNamespace.ArgDescriptor.ArgType.BOOL -> builder.addInputBooleanName(associatedInput.name) + OpNamespace.ArgDescriptor.ArgType.DOUBLE, OpNamespace.ArgDescriptor.ArgType.FLOAT -> builder.addInputFloatName(associatedInput.name) + OpNamespace.ArgDescriptor.ArgType.INT32, OpNamespace.ArgDescriptor.ArgType.INT64 -> builder.addInputIntName(associatedInput.name) + OpNamespace.ArgDescriptor.ArgType.INPUT_TENSOR -> builder.addInputTensorName(associatedInput.name) + } + } + + + } + + mappingNamesToPerform.forEach { outputName, inputName -> + builder.addInputTensorName(inputName) + builder.addOutputTensorName(outputName) + builder.putInputToOutput(outputName,inputName) + } + + + + return builder.build() + } + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other !is PassThroughMultiTensorMapping<*, *, *, *, *, *, *>) return false + + if (opDescriptor != other.opDescriptor) return false + if (mappingNamesToPerform != other.mappingNamesToPerform) return false + if (transformerArgs != other.transformerArgs) return false + + return true + } + + override fun hashCode(): Int { + var result = opDescriptor?.hashCode() ?: 0 + result = 31 * result + mappingNamesToPerform.hashCode() + result = 31 * result + transformerArgs.hashCode() + return result + } + + override fun toString(): String { + return "MultiInputIndexMappingRule(opDescriptor=$opDescriptor, mappingNamesToPerform=$mappingNamesToPerform, transformerArgs=$transformerArgs)" + } + +} \ No newline at end of file diff --git a/nd4j/samediff-import/samediff-import-api/src/main/resources/nd4j-op-def.pbtxt b/nd4j/samediff-import/samediff-import-api/src/main/resources/nd4j-op-def.pbtxt index e56b3fe6d..0982d23b2 100644 --- a/nd4j/samediff-import/samediff-import-api/src/main/resources/nd4j-op-def.pbtxt +++ b/nd4j/samediff-import/samediff-import-api/src/main/resources/nd4j-op-def.pbtxt @@ -25,10 +25,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -38,6 +34,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -51,8 +51,8 @@ opList { argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -63,14 +63,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "ClipByValue" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "clipValueMin" argType: DOUBLE @@ -84,6 +84,10 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -154,10 +158,6 @@ opList { } opList { name: "Pow_bp" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "dLdx" argType: OUTPUT_TENSOR @@ -168,8 +168,8 @@ opList { argIndex: 1 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -195,6 +195,10 @@ opList { argType: INPUT_TENSOR argIndex: 4 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "Reciprocal" @@ -202,29 +206,25 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "RelativeError" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -235,6 +235,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -276,10 +280,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "condition" argType: INPUT_TENSOR @@ -294,60 +294,60 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "While" - argDescriptor { - name: "isConstant" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "condition" - argType: INPUT_TENSOR - } argDescriptor { name: "frameName" argType: STRING } + argDescriptor { + name: "isConstant" + argType: BOOL + } + argDescriptor { + name: "condition" + argType: INPUT_TENSOR + } opDeclarationType: LOGIC_OP_IMPL } opList { name: "_geluderivative" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "_mishderivative" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -358,14 +358,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "_powderivative" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "pow" argType: DOUBLE @@ -374,6 +374,10 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -382,6 +386,10 @@ opList { } opList { name: "_precise_geluderivative" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "inPlace" argType: BOOL @@ -392,32 +400,24 @@ opList { argIndex: 1 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { name: "_sigmoidderivative" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -428,21 +428,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "_swishderivative" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -453,46 +453,50 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "_tanhderivative" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "abs" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -501,10 +505,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -523,6 +523,10 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "absolute_difference_loss_grad" @@ -540,10 +544,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -562,45 +562,49 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "acos" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "acosh" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -852,17 +856,13 @@ opList { } opList { name: "add" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -873,14 +873,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "add_bp" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "gradX" argType: OUTPUT_TENSOR @@ -891,8 +891,8 @@ opList { argIndex: 1 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -908,17 +908,21 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "add_scalar" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -965,10 +969,6 @@ opList { } opList { name: "adjust_hue" - argDescriptor { - name: "delta" - argType: DOUBLE - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -990,6 +990,10 @@ opList { } opList { name: "adjust_saturation" + argDescriptor { + name: "factor" + argType: DOUBLE + } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -1011,18 +1015,23 @@ opList { } opList { name: "all" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "dimensions" argType: INT64 @@ -1032,7 +1041,7 @@ opList { opList { name: "alpha_dropout" argDescriptor { - name: "p" + name: "a" argType: DOUBLE } argDescriptor { @@ -1107,20 +1116,20 @@ opList { } opList { name: "amax" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "y" + name: "dimensions" argType: INPUT_TENSOR argIndex: 1 } @@ -1136,10 +1145,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1149,24 +1154,28 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "amean" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "y" + name: "dimensions" argType: INPUT_TENSOR argIndex: 1 } @@ -1178,20 +1187,20 @@ opList { } opList { name: "amin" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "y" + name: "dimensions" argType: INPUT_TENSOR argIndex: 1 } @@ -1207,10 +1216,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1220,6 +1225,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -1309,10 +1318,6 @@ opList { } opList { name: "and" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "comparable" argType: DOUBLE @@ -1322,25 +1327,29 @@ opList { argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "and_scalar" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1349,18 +1358,23 @@ opList { } opList { name: "any" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "dimensions" argType: INT64 @@ -1402,17 +1416,13 @@ opList { } opList { name: "argamax" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -1427,20 +1437,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "argamin" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -1455,20 +1465,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "argmax" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -1483,20 +1493,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "argmin" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -1511,45 +1521,49 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "asin" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "asinh" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -1580,10 +1594,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1598,23 +1608,27 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "asum" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "y" + name: "dimensions" argType: INPUT_TENSOR argIndex: 1 } @@ -1626,42 +1640,42 @@ opList { } opList { name: "atan" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "atanh" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -1670,14 +1684,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -1739,10 +1753,6 @@ opList { name: "gradI" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1752,6 +1762,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -1813,14 +1827,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kD" argType: INT64 @@ -1902,10 +1916,6 @@ opList { name: "gradI" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -1915,6 +1925,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kD" argType: INT64 @@ -2000,10 +2014,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2022,6 +2032,10 @@ opList { name: "n" argType: INT64 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { @@ -2030,10 +2044,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "rowP" argType: INPUT_TENSOR @@ -2057,6 +2067,10 @@ opList { name: "N" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "barnes_gains" @@ -2096,10 +2110,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "rowP" argType: INPUT_TENSOR @@ -2123,21 +2133,17 @@ opList { name: "N" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "batch_to_space" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2151,20 +2157,30 @@ opList { name: "blockSize" argType: INT64 } + argDescriptor { + name: "croppingTop" + argType: INT64 + argIndex: 1 + } + argDescriptor { + name: "croppingBottom" + argType: INT64 + argIndex: 2 + } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "batch_to_space_nd" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -2184,9 +2200,17 @@ opList { name: "blocks" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "batched_gemm" + argDescriptor { + name: "vC" + argType: OUTPUT_TENSOR + } argDescriptor { name: "transposeA" argType: BOOL @@ -2196,14 +2220,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "vC" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "alpha" argType: INPUT_TENSOR @@ -2267,9 +2283,21 @@ opList { argType: INT64 argIndex: 8 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "batchnorm" + argDescriptor { + name: "epsilon" + argType: DOUBLE + } + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "inPlace" argType: BOOL @@ -2284,18 +2312,6 @@ opList { argType: BOOL argIndex: 2 } - argDescriptor { - name: "epsilon" - argType: DOUBLE - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2324,23 +2340,13 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "batchnorm_bp" - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "applyGamma" - argType: BOOL - argIndex: 1 - } - argDescriptor { - name: "applyBeta" - argType: BOOL - argIndex: 2 - } argDescriptor { name: "epsilon" argType: DOUBLE @@ -2365,8 +2371,18 @@ opList { argIndex: 3 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL + } + argDescriptor { + name: "applyGamma" + argType: BOOL + argIndex: 1 + } + argDescriptor { + name: "applyBeta" + argType: BOOL + argIndex: 2 } argDescriptor { name: "input" @@ -2396,6 +2412,10 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "betainc" @@ -2421,17 +2441,13 @@ opList { } opList { name: "biasadd" - argDescriptor { - name: "nchw" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "nchw" + argType: BOOL } argDescriptor { name: "input" @@ -2442,13 +2458,13 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "biasadd_bp" - argDescriptor { - name: "nchw" - argType: BOOL - } argDescriptor { name: "gradI" argType: OUTPUT_TENSOR @@ -2459,8 +2475,8 @@ opList { argIndex: 1 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "nchw" + argType: BOOL } argDescriptor { name: "input" @@ -2476,6 +2492,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "bincount" @@ -2483,10 +2503,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "outputType" - argType: DATA_TYPE - } argDescriptor { name: "values" argType: INPUT_TENSOR @@ -2520,6 +2536,10 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "outputType" + argType: DATA_TYPE + } } opList { name: "bitcast" @@ -2527,10 +2547,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2539,6 +2555,10 @@ opList { name: "newType" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "bits_hamming_distance" @@ -2546,10 +2566,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2559,20 +2575,20 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "bitwise_and" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -2583,21 +2599,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "bitwise_or" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -2608,21 +2624,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "bitwise_xor" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -2633,6 +2649,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { @@ -2641,14 +2661,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -2721,14 +2741,14 @@ opList { } opList { name: "broadcast_amax" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2746,14 +2766,14 @@ opList { } opList { name: "broadcast_amin" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2775,10 +2795,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2788,17 +2804,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "broadcast_equalto" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2816,14 +2836,14 @@ opList { } opList { name: "broadcast_greaterthan" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2841,14 +2861,14 @@ opList { } opList { name: "broadcast_greaterthanorequal" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2866,14 +2886,14 @@ opList { } opList { name: "broadcast_lessthan" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2891,14 +2911,14 @@ opList { } opList { name: "broadcast_lessthanorequal" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2916,14 +2936,14 @@ opList { } opList { name: "broadcast_max" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2941,14 +2961,14 @@ opList { } opList { name: "broadcast_min" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2966,14 +2986,14 @@ opList { } opList { name: "broadcast_notequal" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -2995,10 +3015,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3008,17 +3024,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "broadcastadd" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3036,14 +3056,14 @@ opList { } opList { name: "broadcastcopy" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3061,14 +3081,14 @@ opList { } opList { name: "broadcastdiv" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3086,14 +3106,14 @@ opList { } opList { name: "broadcastgradientargs" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3111,14 +3131,14 @@ opList { } opList { name: "broadcastmul" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3136,14 +3156,14 @@ opList { } opList { name: "broadcastrdiv" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3161,14 +3181,14 @@ opList { } opList { name: "broadcastrsub" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3186,14 +3206,14 @@ opList { } opList { name: "broadcastsub" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3229,10 +3249,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "to" argType: INPUT_TENSOR @@ -3246,6 +3262,10 @@ opList { name: "mode" argType: INT64 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -3268,10 +3288,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3280,21 +3296,21 @@ opList { name: "mode" argType: INT64 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "cast" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -3304,9 +3320,17 @@ opList { name: "dst" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "cbow" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "trainWords" argType: BOOL @@ -3316,10 +3340,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "target" argType: INPUT_TENSOR @@ -3407,37 +3427,33 @@ opList { } opList { name: "ceil" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "cell_contains" - argDescriptor { - name: "contains" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "contains" + argType: BOOL } argDescriptor { name: "corner" @@ -3457,6 +3473,10 @@ opList { name: "dimension" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "check_numerics" @@ -3464,10 +3484,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3477,6 +3493,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "choice" @@ -3522,10 +3542,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "arg" argType: INPUT_TENSOR @@ -3539,6 +3555,10 @@ opList { name: "mode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "clip_by_global_norm" @@ -3550,14 +3570,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "clipbyavgnorm" @@ -3589,10 +3609,6 @@ opList { name: "gradI" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3602,6 +3618,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "clipbynorm" @@ -3633,10 +3653,6 @@ opList { name: "gradI" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3650,6 +3666,10 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "clipbyvalue" @@ -3690,10 +3710,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3742,6 +3758,10 @@ opList { argType: INT64 argIndex: 7 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "compare_and_bitpack" @@ -3753,10 +3773,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3766,6 +3782,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "compat_sparse_to_dense" @@ -3773,10 +3793,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "indices" argType: INPUT_TENSOR @@ -3796,6 +3812,10 @@ opList { argType: INPUT_TENSOR argIndex: 3 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "compat_string_split" @@ -3808,10 +3828,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3831,20 +3847,20 @@ opList { argType: INPUT_TENSOR argIndex: 3 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "concat" - argDescriptor { - name: "isDynamicAxis" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "isDynamicAxis" + argType: BOOL } argDescriptor { name: "input" @@ -3859,20 +3875,20 @@ opList { name: "concatDimension" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "concat_bp" - argDescriptor { - name: "dynamicAxis" - argType: BOOL - } argDescriptor { name: "epsilonChunk" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "dynamicAxis" + argType: BOOL } argDescriptor { name: "input" @@ -3887,6 +3903,10 @@ opList { name: "concatDimension" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "confusion_matrix" @@ -3894,10 +3914,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "labels" argType: INPUT_TENSOR @@ -3913,13 +3929,12 @@ opList { argIndex: 2 } argDescriptor { - name: "numClasses" + name: "dataType" argType: INT64 } argDescriptor { - name: "dataType" - argType: INT64 - argIndex: 1 + name: "dtype" + argType: DATA_TYPE } } opList { @@ -3928,10 +3943,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -3946,6 +3957,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kW" argType: INT64 @@ -3997,10 +4012,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4054,6 +4065,10 @@ opList { argType: INT64 argIndex: 6 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "conv2d" @@ -4061,10 +4076,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4079,6 +4090,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -4150,10 +4165,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4173,6 +4184,10 @@ opList { argType: INPUT_TENSOR argIndex: 3 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -4234,10 +4249,6 @@ opList { name: "gradI" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "gradIShape" argType: INPUT_TENSOR @@ -4252,6 +4263,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -4313,10 +4328,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4331,6 +4342,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kD" argType: INT64 @@ -4422,10 +4437,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4445,6 +4456,10 @@ opList { argType: INPUT_TENSOR argIndex: 3 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kD" argType: INT64 @@ -4522,17 +4537,13 @@ opList { } opList { name: "copy" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -4543,46 +4554,50 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "cos" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "cosh" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -4591,10 +4606,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -4618,6 +4629,10 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "cosine_distance_loss_grad" @@ -4635,10 +4650,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -4662,9 +4673,17 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "cosinedistance" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "keepDims" argType: BOOL @@ -4674,10 +4693,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4695,6 +4710,10 @@ opList { } opList { name: "cosinesimilarity" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "keepDims" argType: BOOL @@ -4704,10 +4723,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4725,18 +4740,23 @@ opList { } opList { name: "countNonZero" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "dimensions" argType: INT64 @@ -4745,18 +4765,23 @@ opList { } opList { name: "countZero" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "dimensions" argType: INT64 @@ -4765,17 +4790,13 @@ opList { } opList { name: "create" - argDescriptor { - name: "init" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "outputType" - argType: DATA_TYPE + name: "init" + argType: BOOL } argDescriptor { name: "input" @@ -4790,6 +4811,10 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "outputType" + argType: DATA_TYPE + } } opList { name: "create_list" @@ -4818,14 +4843,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "crelu_bp" @@ -4833,10 +4858,6 @@ opList { name: "epsilon" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -4846,6 +4867,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "crop_and_resize" @@ -4857,10 +4882,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "image" argType: INPUT_TENSOR @@ -4884,6 +4905,10 @@ opList { name: "method" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "cross" @@ -4904,22 +4929,22 @@ opList { } opList { name: "cube" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { @@ -4941,26 +4966,30 @@ opList { } opList { name: "cubederivative" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "cumprod" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "exclusive" argType: BOOL @@ -4970,10 +4999,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5001,6 +5026,10 @@ opList { } opList { name: "cumprod_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "exclusive" argType: BOOL @@ -5010,14 +5039,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5046,9 +5067,17 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "cumsum" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "exclusive" argType: BOOL @@ -5058,10 +5087,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5089,6 +5114,10 @@ opList { } opList { name: "cumsum_bp" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "exclusive" argType: BOOL @@ -5098,14 +5127,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5134,20 +5155,20 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "cyclic_rshift_bits" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -5158,21 +5179,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "cyclic_shift_bits" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -5183,6 +5204,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { @@ -5191,10 +5216,6 @@ opList { name: "updates" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "start" argType: INPUT_TENSOR @@ -5204,6 +5225,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "decode_threshold" @@ -5211,10 +5236,6 @@ opList { name: "updates" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "weights" argType: INPUT_TENSOR @@ -5224,6 +5245,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "deconv2d" @@ -5231,10 +5256,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5249,6 +5270,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -5320,10 +5345,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5343,6 +5364,10 @@ opList { argType: INPUT_TENSOR argIndex: 3 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -5404,10 +5429,6 @@ opList { name: "gradI" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "gradIShape" argType: INPUT_TENSOR @@ -5422,6 +5443,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -5483,10 +5508,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5501,6 +5522,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kD" argType: INT64 @@ -5592,10 +5617,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5615,6 +5636,10 @@ opList { argType: INPUT_TENSOR argIndex: 3 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kD" argType: INT64 @@ -5717,10 +5742,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5734,6 +5755,10 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "depthwise_conv2d" @@ -5741,10 +5766,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5759,6 +5780,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -5830,10 +5855,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -5853,6 +5874,10 @@ opList { argType: INPUT_TENSOR argIndex: 3 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -5910,41 +5935,41 @@ opList { } opList { name: "diag" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "diag_part" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "digamma" @@ -5960,6 +5985,10 @@ opList { } opList { name: "dilation2d" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "isSameMode" argType: BOOL @@ -5969,14 +5998,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6010,6 +6031,10 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "distribution_bernoulli" @@ -6107,7 +6132,7 @@ opList { opList { name: "distribution_lognormal" argDescriptor { - name: "stddev" + name: "mean" argType: DOUBLE } argDescriptor { @@ -6201,17 +6226,13 @@ opList { } opList { name: "divide" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -6222,14 +6243,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "divide_bp" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "gradX" argType: OUTPUT_TENSOR @@ -6240,8 +6261,8 @@ opList { argIndex: 1 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -6257,6 +6278,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "divide_no_nan" @@ -6277,6 +6302,10 @@ opList { } opList { name: "dot" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "newFormat" argType: BOOL @@ -6286,10 +6315,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6307,15 +6332,6 @@ opList { } opList { name: "dot_product_attention" - argDescriptor { - name: "scaled" - argType: BOOL - } - argDescriptor { - name: "withWeights" - argType: BOOL - argIndex: 1 - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR @@ -6326,8 +6342,13 @@ opList { argIndex: 1 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "scaled" + argType: BOOL + } + argDescriptor { + name: "withWeights" + argType: BOOL + argIndex: 1 } argDescriptor { name: "queries" @@ -6357,13 +6378,13 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "dot_product_attention_bp" - argDescriptor { - name: "scaled" - argType: BOOL - } argDescriptor { name: "dLdq" argType: OUTPUT_TENSOR @@ -6379,8 +6400,8 @@ opList { argIndex: 2 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "scaled" + argType: BOOL } argDescriptor { name: "queries" @@ -6410,6 +6431,10 @@ opList { name: "normalization" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "draw_bounding_boxes" @@ -6525,10 +6550,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6577,6 +6598,10 @@ opList { name: "timeMajor" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "dynamic_partition" @@ -6584,10 +6609,6 @@ opList { name: "outputList" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6601,6 +6622,10 @@ opList { name: "numPartitions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "dynamic_partition_bp" @@ -6608,10 +6633,6 @@ opList { name: "outputList" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6630,6 +6651,10 @@ opList { name: "numPartition" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "dynamic_rnn" @@ -6642,10 +6667,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6674,6 +6695,10 @@ opList { name: "timeMajor" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "dynamic_stitch" @@ -6681,10 +6706,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "index" argType: INPUT_TENSOR @@ -6698,6 +6719,10 @@ opList { name: "numPartitions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "elu" @@ -6742,10 +6767,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6759,6 +6780,15 @@ opList { name: "partition_mode" argType: INT64 } + argDescriptor { + name: "indices" + argType: INT64 + argIndex: 1 + } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "encode_bitmap" @@ -6775,10 +6805,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6793,6 +6819,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "encode_threshold" @@ -6809,10 +6839,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6826,40 +6852,49 @@ opList { name: "boundary" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "enter" - argDescriptor { - name: "isConstant" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "frameName" argType: STRING } + argDescriptor { + name: "isConstant" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } } opList { name: "entropy" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "dimensions" argType: INT64 @@ -6868,17 +6903,13 @@ opList { } opList { name: "eps" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -6889,18 +6920,22 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "eps_scalar" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6909,17 +6944,13 @@ opList { } opList { name: "equals" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -6930,18 +6961,22 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_BOOL_OP_IMPL } opList { name: "equals_scalar" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -6950,10 +6985,6 @@ opList { } opList { name: "equals_with_eps" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "eps" argType: DOUBLE @@ -6962,12 +6993,16 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "y" + name: "dimensions" argType: INPUT_TENSOR argIndex: 1 } @@ -6979,46 +7014,50 @@ opList { } opList { name: "erf" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "erfc" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "euclidean" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "keepDims" argType: BOOL @@ -7028,10 +7067,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7049,6 +7084,10 @@ opList { } opList { name: "evaluate_reduction_shape" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "keepDims" argType: BOOL @@ -7058,14 +7097,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "inputShape" argType: INPUT_TENSOR @@ -7075,6 +7106,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "exit" @@ -7082,33 +7117,33 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "frameName" argType: STRING } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } } opList { name: "exp" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -7117,10 +7152,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7129,25 +7160,29 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "expm1" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -7156,33 +7191,33 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "extract_image_patches" - argDescriptor { - name: "sameMode" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "sameMode" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "ksizeRows" argType: INT64 @@ -7228,10 +7263,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "numRows" argType: INT64 @@ -7251,13 +7282,13 @@ opList { argType: INT64 argIndex: 3 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "fake_quant_with_min_max_args" - argDescriptor { - name: "narrowRange" - argType: BOOL - } argDescriptor { name: "min" argType: DOUBLE @@ -7271,6 +7302,10 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "narrowRange" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7282,10 +7317,6 @@ opList { } opList { name: "fake_quant_with_min_max_vars" - argDescriptor { - name: "narrowed" - argType: BOOL - } argDescriptor { name: "m" argType: DOUBLE @@ -7299,6 +7330,10 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "narrowed" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7321,14 +7356,14 @@ opList { } opList { name: "fake_quant_with_min_max_vars_per_channel" - argDescriptor { - name: "narrowed" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "narrowed" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7359,18 +7394,18 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "shapeArray" argType: INPUT_TENSOR } argDescriptor { - name: "outputDataType" + name: "dtype" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "fill_as" @@ -7390,21 +7425,17 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "first_index" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "compare" argType: DOUBLE @@ -7418,12 +7449,16 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "dimensions" + name: "mode" argType: INT64 } opDeclarationType: LEGACY_XYZ @@ -7434,10 +7469,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7446,40 +7477,59 @@ opList { name: "order" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { - name: "floor" - argDescriptor { - name: "inPlace" - argType: BOOL - } + name: "flatten_2d" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "dimensions" + argType: INT64 + } + argDescriptor { + name: "dtype" argType: DATA_TYPE } +} +opList { + name: "floor" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "floordiv" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -7490,14 +7540,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "floordiv_bp" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "gradX" argType: OUTPUT_TENSOR @@ -7508,8 +7558,8 @@ opList { argIndex: 1 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -7525,20 +7575,20 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "floormod" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -7549,14 +7599,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "floormod_bp" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "gradX" argType: OUTPUT_TENSOR @@ -7567,8 +7617,8 @@ opList { argIndex: 1 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -7584,20 +7634,20 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "fmod" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -7608,6 +7658,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -7647,10 +7701,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7689,20 +7739,20 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "gather" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -7722,6 +7772,10 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "gather_list" @@ -7729,10 +7783,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "list" argType: INPUT_TENSOR @@ -7742,21 +7792,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } opDeclarationType: LIST_OP_IMPL } opList { name: "gather_nd" - argDescriptor { - name: "checkIndices" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "checkIndices" + argType: BOOL } argDescriptor { name: "input" @@ -7767,9 +7817,17 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "gelu" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "inPlace" argType: BOOL @@ -7780,17 +7838,13 @@ opList { argIndex: 1 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { @@ -7822,17 +7876,13 @@ opList { } opList { name: "greater" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -7843,21 +7893,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_BOOL_OP_IMPL } opList { name: "greater_equal" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -7868,18 +7918,22 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_BOOL_OP_IMPL } opList { name: "greaterthan_scalar" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7888,14 +7942,14 @@ opList { } opList { name: "greaterthanorequal_scalar" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7925,10 +7979,6 @@ opList { name: "h" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -7953,6 +8003,10 @@ opList { argType: INPUT_TENSOR argIndex: 4 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "gruCell" @@ -7975,10 +8029,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8008,6 +8058,10 @@ opList { argType: INPUT_TENSOR argIndex: 5 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "gruCell_bp" @@ -8040,10 +8094,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 5 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8093,6 +8143,10 @@ opList { argType: INPUT_TENSOR argIndex: 9 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "gru_bp" @@ -8120,10 +8174,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 4 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8153,9 +8203,17 @@ opList { argType: INPUT_TENSOR argIndex: 5 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "hammingdistance" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "keepDims" argType: BOOL @@ -8165,10 +8223,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8186,42 +8240,42 @@ opList { } opList { name: "hard_sigmoid" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "hard_sigmoidderivative" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -8255,22 +8309,22 @@ opList { } opList { name: "hardtanh" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { @@ -8292,22 +8346,22 @@ opList { } opList { name: "hardtanhderivative" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -8316,25 +8370,25 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "hasinf" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8347,14 +8401,14 @@ opList { } opList { name: "hasnan" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8371,10 +8425,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "logits" argType: INPUT_TENSOR @@ -8393,6 +8443,10 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "hinge_loss_grad" @@ -8410,10 +8464,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "logits" argType: INPUT_TENSOR @@ -8432,6 +8482,10 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "histogram" @@ -8439,10 +8493,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8451,6 +8501,10 @@ opList { name: "numBins" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "histogram_fixed_width" @@ -8458,10 +8512,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8480,6 +8530,10 @@ opList { name: "nbins" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "hsv_to_rgb" @@ -8507,10 +8561,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -8529,6 +8579,10 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "huber_loss_grad" @@ -8550,10 +8604,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -8572,25 +8622,29 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "identity" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: OP_IMPL } opList { @@ -8616,14 +8670,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "igamma" @@ -8669,10 +8723,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8721,6 +8771,10 @@ opList { argType: INT64 argIndex: 7 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "im2col_bp" @@ -8732,10 +8786,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8784,9 +8834,17 @@ opList { argType: INT64 argIndex: 7 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "image_resize" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "preserveAspectRatio" argType: BOOL @@ -8796,14 +8854,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "image" argType: INPUT_TENSOR @@ -8817,20 +8867,20 @@ opList { name: "method" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "in_top_k" - argDescriptor { - name: "sorted" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "sorted" + argType: BOOL } argDescriptor { name: "predictions" @@ -8845,37 +8895,41 @@ opList { name: "k" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "invert_permutation" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "is_non_decreasing" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8884,14 +8938,14 @@ opList { } opList { name: "is_numeric_tensor" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8900,14 +8954,14 @@ opList { } opList { name: "is_strictly_increasing" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -8916,42 +8970,42 @@ opList { } opList { name: "isfinite" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "isinf" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -8972,26 +9026,30 @@ opList { } opList { name: "isnan" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "jaccarddistance" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "keepDims" argType: BOOL @@ -9001,10 +9059,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9026,10 +9080,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9049,6 +9099,10 @@ opList { argType: INPUT_TENSOR argIndex: 3 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "l2_loss" @@ -9056,21 +9110,17 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "last_index" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "compare" argType: DOUBLE @@ -9084,26 +9134,30 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "dimensions" + name: "mode" argType: INT64 } opDeclarationType: LEGACY_XYZ } opList { name: "layer_norm" - argDescriptor { - name: "channelsFirst" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "noBias" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9126,10 +9180,6 @@ opList { } opList { name: "layer_norm_bp" - argDescriptor { - name: "channelsFirst" - argType: BOOL - } argDescriptor { name: "dLdx" argType: OUTPUT_TENSOR @@ -9145,8 +9195,8 @@ opList { argIndex: 2 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "noBias" + argType: BOOL } argDescriptor { name: "input" @@ -9186,6 +9236,10 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "leakyrelu" @@ -9197,6 +9251,10 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9213,6 +9271,10 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9221,17 +9283,13 @@ opList { } opList { name: "less" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -9242,21 +9300,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_BOOL_OP_IMPL } opList { name: "less_equal" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -9267,18 +9325,22 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_BOOL_OP_IMPL } opList { name: "lessthan_scalar" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9287,14 +9349,14 @@ opList { } opList { name: "lessthanorequal_scalar" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9328,10 +9390,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "start" argType: INPUT_TENSOR @@ -9347,9 +9405,18 @@ opList { argIndex: 2 } argDescriptor { - name: "dataType" + name: "elements" argType: INT64 } + argDescriptor { + name: "number" + argType: INT64 + argIndex: 1 + } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } } opList { name: "linspace_random" @@ -9358,7 +9425,7 @@ opList { argType: DOUBLE } argDescriptor { - name: "step" + name: "to" argType: DOUBLE argIndex: 1 } @@ -9370,11 +9437,6 @@ opList { name: "length" argType: INT64 } - argDescriptor { - name: "dataType" - argType: INT64 - argIndex: 1 - } opDeclarationType: LEGACY_XYZ } opList { @@ -9388,10 +9450,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "values" argType: INPUT_TENSOR @@ -9401,45 +9459,49 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "log" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "log1p" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -9452,10 +9514,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -9474,6 +9532,10 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "log_loss_grad" @@ -9495,10 +9557,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -9517,39 +9575,39 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "log_matrix_determinant" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } } opList { name: "log_poisson_loss" - argDescriptor { - name: "full" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "full" + argType: BOOL } argDescriptor { name: "log_predictions" @@ -9569,13 +9627,13 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "log_poisson_loss_grad" - argDescriptor { - name: "full" - argType: BOOL - } argDescriptor { name: "dLdp" argType: OUTPUT_TENSOR @@ -9591,8 +9649,8 @@ opList { argIndex: 2 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "full" + argType: BOOL } argDescriptor { name: "log_predictions" @@ -9612,6 +9670,10 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "log_softmax" @@ -9672,29 +9734,34 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "logentropy" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dimensions" + argType: INPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "dimensions" argType: INT64 @@ -9703,22 +9770,22 @@ opList { } opList { name: "logsigmoid" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -9731,6 +9798,10 @@ opList { name: "frameName" argType: STRING } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } } opList { name: "lrelu" @@ -9771,10 +9842,6 @@ opList { } opList { name: "lrn" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "bias" argType: DOUBLE @@ -9793,6 +9860,10 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9805,10 +9876,6 @@ opList { } opList { name: "lrn_bp" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "bias" argType: DOUBLE @@ -9827,6 +9894,10 @@ opList { name: "gradI" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9867,10 +9938,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -9919,6 +9986,10 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "lstmBlock" @@ -9965,10 +10036,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 6 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "maxTSLength" argType: INPUT_TENSOR @@ -10022,6 +10089,10 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "lstmBlockCell" @@ -10068,10 +10139,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 6 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "xt" argType: INPUT_TENSOR @@ -10115,6 +10182,10 @@ opList { name: "peephole" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "lstmCell" @@ -10141,10 +10212,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "xt" argType: INPUT_TENSOR @@ -10193,48 +10260,13 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "lstmLayer" - argDescriptor { - name: "hasBiases" - argType: BOOL - } - argDescriptor { - name: "hasSeqLen" - argType: BOOL - argIndex: 1 - } - argDescriptor { - name: "hasInitH" - argType: BOOL - argIndex: 2 - } - argDescriptor { - name: "hasInitC" - argType: BOOL - argIndex: 3 - } - argDescriptor { - name: "hasPH" - argType: BOOL - argIndex: 4 - } - argDescriptor { - name: "retFullSeq" - argType: BOOL - argIndex: 5 - } - argDescriptor { - name: "retLastH" - argType: BOOL - argIndex: 6 - } - argDescriptor { - name: "retLastC" - argType: BOOL - argIndex: 7 - } argDescriptor { name: "cellClip" argType: DOUBLE @@ -10284,8 +10316,43 @@ opList { argIndex: 2 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "hasBiases" + argType: BOOL + } + argDescriptor { + name: "hasSeqLen" + argType: BOOL + argIndex: 1 + } + argDescriptor { + name: "hasInitH" + argType: BOOL + argIndex: 2 + } + argDescriptor { + name: "hasInitC" + argType: BOOL + argIndex: 3 + } + argDescriptor { + name: "hasPH" + argType: BOOL + argIndex: 4 + } + argDescriptor { + name: "retFullSeq" + argType: BOOL + argIndex: 5 + } + argDescriptor { + name: "retLastH" + argType: BOOL + argIndex: 6 + } + argDescriptor { + name: "retLastC" + argType: BOOL + argIndex: 7 } argDescriptor { name: "input" @@ -10326,6 +10393,10 @@ opList { argType: INPUT_TENSOR argIndex: 7 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "dataFormat" argType: INT64 @@ -10353,15 +10424,6 @@ opList { } opList { name: "lstmLayerCell" - argDescriptor { - name: "hasBiases" - argType: BOOL - } - argDescriptor { - name: "hasPH" - argType: BOOL - argIndex: 1 - } argDescriptor { name: "cellClip" argType: DOUBLE @@ -10406,8 +10468,13 @@ opList { argIndex: 1 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "hasBiases" + argType: BOOL + } + argDescriptor { + name: "hasPH" + argType: BOOL + argIndex: 1 } argDescriptor { name: "input" @@ -10457,18 +10524,13 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "lstmLayerCellBp" - argDescriptor { - name: "hasBiases" - argType: BOOL - } - argDescriptor { - name: "hasPH" - argType: BOOL - argIndex: 1 - } argDescriptor { name: "cellClip" argType: DOUBLE @@ -10538,8 +10600,13 @@ opList { argIndex: 6 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "hasBiases" + argType: BOOL + } + argDescriptor { + name: "hasPH" + argType: BOOL + argIndex: 1 } argDescriptor { name: "input" @@ -10580,6 +10647,10 @@ opList { argType: INPUT_TENSOR argIndex: 7 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "gateAct" argType: INT64 @@ -10597,45 +10668,6 @@ opList { } opList { name: "lstmLayer_bp" - argDescriptor { - name: "hasBiases" - argType: BOOL - } - argDescriptor { - name: "hasSeqLen" - argType: BOOL - argIndex: 1 - } - argDescriptor { - name: "hasInitH" - argType: BOOL - argIndex: 2 - } - argDescriptor { - name: "hasInitC" - argType: BOOL - argIndex: 3 - } - argDescriptor { - name: "hasPH" - argType: BOOL - argIndex: 4 - } - argDescriptor { - name: "retFullSeq" - argType: BOOL - argIndex: 5 - } - argDescriptor { - name: "retLastH" - argType: BOOL - argIndex: 6 - } - argDescriptor { - name: "retLastC" - argType: BOOL - argIndex: 7 - } argDescriptor { name: "cellClip" argType: DOUBLE @@ -10705,8 +10737,43 @@ opList { argIndex: 6 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "hasBiases" + argType: BOOL + } + argDescriptor { + name: "hasSeqLen" + argType: BOOL + argIndex: 1 + } + argDescriptor { + name: "hasInitH" + argType: BOOL + argIndex: 2 + } + argDescriptor { + name: "hasInitC" + argType: BOOL + argIndex: 3 + } + argDescriptor { + name: "hasPH" + argType: BOOL + argIndex: 4 + } + argDescriptor { + name: "retFullSeq" + argType: BOOL + argIndex: 5 + } + argDescriptor { + name: "retLastH" + argType: BOOL + argIndex: 6 + } + argDescriptor { + name: "retLastC" + argType: BOOL + argIndex: 7 } argDescriptor { name: "input" @@ -10767,6 +10834,10 @@ opList { argType: INPUT_TENSOR argIndex: 11 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "dataFormat" argType: INT64 @@ -10794,10 +10865,6 @@ opList { } opList { name: "lstsq" - argDescriptor { - name: "fastFlag" - argType: BOOL - } argDescriptor { name: "l2_factor" argType: DOUBLE @@ -10807,8 +10874,8 @@ opList { argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "fastFlag" + argType: BOOL } argDescriptor { name: "a" @@ -10819,6 +10886,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "lu" @@ -10831,17 +10902,21 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "manhattan" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "keepDims" argType: BOOL @@ -10851,10 +10926,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -10872,10 +10943,6 @@ opList { } opList { name: "match_condition" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "compare" argType: DOUBLE @@ -10889,12 +10956,16 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "dimensions" + name: "mode" argType: INT64 } opDeclarationType: LEGACY_XYZ @@ -10905,50 +10976,26 @@ opList { name: "compare" argType: DOUBLE } - argDescriptor { - name: "eps" - argType: DOUBLE - argIndex: 1 - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } - argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 - } argDescriptor { name: "mode" argType: INT64 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "matmul" - argDescriptor { - name: "transposeX" - argType: BOOL - } - argDescriptor { - name: "transposeY" - argType: BOOL - argIndex: 1 - } - argDescriptor { - name: "transposeZ" - argType: BOOL - argIndex: 2 - } argDescriptor { name: "alpha" argType: DOUBLE @@ -10963,8 +11010,18 @@ opList { argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "transposeX" + argType: BOOL + } + argDescriptor { + name: "transposeY" + argType: BOOL + argIndex: 1 + } + argDescriptor { + name: "transposeZ" + argType: BOOL + argIndex: 2 } argDescriptor { name: "input" @@ -10989,6 +11046,10 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "matmul_bp" @@ -11010,10 +11071,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11052,6 +11109,10 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "matrix_band_part" @@ -11086,71 +11147,71 @@ opList { } opList { name: "matrix_determinant" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "matrix_diag" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "diagonal" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "matrix_diag_part" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "matrix_inverse" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11159,14 +11220,14 @@ opList { } opList { name: "matrix_set_diag" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11184,10 +11245,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11197,6 +11254,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -11210,10 +11271,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11223,6 +11280,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -11297,17 +11358,13 @@ opList { } opList { name: "maximum" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -11318,6 +11375,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { @@ -11331,10 +11392,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11349,25 +11406,29 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "maxout" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -11376,14 +11437,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -11445,10 +11506,6 @@ opList { name: "gradI" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11458,6 +11515,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -11519,14 +11580,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kD" argType: INT64 @@ -11608,10 +11669,6 @@ opList { name: "gradI" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -11621,6 +11678,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kD" argType: INT64 @@ -11702,10 +11763,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -11724,6 +11781,10 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "mean_pairwssqerr_loss_grad" @@ -11741,10 +11802,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -11763,6 +11820,10 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "mean_sqerr_loss" @@ -11770,10 +11831,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -11792,6 +11849,10 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "mean_sqerr_loss_grad" @@ -11809,10 +11870,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "predictions" argType: INPUT_TENSOR @@ -11831,6 +11888,10 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "merge" @@ -11842,30 +11903,25 @@ opList { name: "input" argType: INPUT_TENSOR } - argDescriptor { - name: "b" - argType: INPUT_TENSOR - argIndex: 1 - } } opList { name: "mergeadd" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "inArrs" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: OP_IMPL } opList { @@ -11874,10 +11930,6 @@ opList { name: "outArrs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "gradient" argType: INPUT_TENSOR @@ -11887,6 +11939,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "mergeavg" @@ -11906,10 +11962,6 @@ opList { name: "outArrs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "gradient" argType: INPUT_TENSOR @@ -11919,6 +11971,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "mergemax" @@ -11938,10 +11994,6 @@ opList { name: "outArrs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "inArrs" argType: INPUT_TENSOR @@ -11951,6 +12003,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "mergemaxindex" @@ -11958,10 +12014,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "inArrs" argType: INPUT_TENSOR @@ -11970,6 +12022,10 @@ opList { name: "dataType" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "mergesum" @@ -11984,17 +12040,13 @@ opList { } opList { name: "meshgrid" - argDescriptor { - name: "cartesian" - argType: BOOL - } argDescriptor { name: "outArrs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "cartesian" + argType: BOOL } argDescriptor { name: "inArrs" @@ -12004,6 +12056,10 @@ opList { name: "swapFirst2Dims" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "meta_postulate" @@ -12047,10 +12103,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12060,21 +12112,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "minimum" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -12085,6 +12137,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { @@ -12098,10 +12154,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12116,20 +12168,20 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "mirror_pad" - argDescriptor { - name: "isSymmetric" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "isSymmetric" + argType: BOOL } argDescriptor { name: "input" @@ -12144,40 +12196,40 @@ opList { name: "mode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "mish" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "mod" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -12188,14 +12240,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "mod_bp" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "gradX" argType: OUTPUT_TENSOR @@ -12206,8 +12258,8 @@ opList { argIndex: 1 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -12223,6 +12275,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "moments" @@ -12239,10 +12295,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12261,17 +12313,21 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "mul_scalar" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12280,6 +12336,10 @@ opList { } opList { name: "multi_head_dot_product_attention" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "scaled" argType: BOOL @@ -12289,14 +12349,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "queries" argType: INPUT_TENSOR @@ -12345,13 +12397,13 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "multi_head_dot_product_attention_bp" - argDescriptor { - name: "scaled" - argType: BOOL - } argDescriptor { name: "dLdq" argType: OUTPUT_TENSOR @@ -12387,8 +12439,8 @@ opList { argIndex: 6 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "scaled" + argType: BOOL } argDescriptor { name: "queries" @@ -12438,20 +12490,20 @@ opList { name: "normalization" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "multiply" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -12462,14 +12514,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "multiply_bp" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "gradX" argType: OUTPUT_TENSOR @@ -12480,8 +12532,8 @@ opList { argIndex: 1 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -12497,6 +12549,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "nadam_updater" @@ -12575,22 +12631,22 @@ opList { } opList { name: "neg" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -12640,14 +12696,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } argDescriptor { name: "frameName" argType: STRING } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } } opList { name: "non_max_suppression" @@ -12655,10 +12711,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "boxes" argType: INPUT_TENSOR @@ -12687,6 +12739,10 @@ opList { name: "maxOutputSize" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "non_max_suppression_overlaps" @@ -12703,10 +12759,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "boxes" argType: INPUT_TENSOR @@ -12735,6 +12787,10 @@ opList { name: "maxOutputSize" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "non_max_suppression_v3" @@ -12742,10 +12798,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "boxes" argType: INPUT_TENSOR @@ -12774,6 +12826,10 @@ opList { name: "maxOutputSize" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "noop" @@ -12823,10 +12879,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "counts" argType: INPUT_TENSOR @@ -12851,6 +12903,10 @@ opList { argType: INPUT_TENSOR argIndex: 4 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "not" @@ -12862,10 +12918,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12875,21 +12927,21 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "not_equals" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -12900,18 +12952,22 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_BOOL_OP_IMPL } opList { name: "not_scalar" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12920,14 +12976,14 @@ opList { } opList { name: "notequals_scalar" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -12936,17 +12992,13 @@ opList { } opList { name: "nth_element" - argDescriptor { - name: "reverse" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "reverse" + argType: BOOL } argDescriptor { name: "input" @@ -12961,25 +13013,29 @@ opList { name: "reverse" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "old_assign" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -12997,10 +13053,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13034,25 +13086,29 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "oneminus" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -13061,10 +13117,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13073,13 +13125,13 @@ opList { name: "dataType" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "or" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "comparable" argType: DOUBLE @@ -13088,10 +13140,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13101,18 +13149,22 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "or_scalar" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13125,14 +13177,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "pad" @@ -13144,10 +13196,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13161,6 +13209,10 @@ opList { name: "mode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "parallel_stack" @@ -13168,10 +13220,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13181,6 +13229,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "percentile" @@ -13202,10 +13254,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13214,6 +13262,10 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "permute" @@ -13221,10 +13273,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13238,6 +13286,10 @@ opList { name: "reverseDims" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "pick_list" @@ -13262,14 +13314,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kY" argType: INT64 @@ -13335,10 +13387,6 @@ opList { name: "gradI" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13348,6 +13396,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -13409,10 +13461,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13436,6 +13484,10 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "polygamma" @@ -13456,14 +13508,14 @@ opList { } opList { name: "pooling3dpool3dnew_bp" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13476,10 +13528,6 @@ opList { } opList { name: "pow" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "pow" argType: DOUBLE @@ -13488,6 +13536,10 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13501,17 +13553,13 @@ opList { } opList { name: "pow_pairwise" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -13522,10 +13570,18 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "precise_gelu" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "inPlace" argType: BOOL @@ -13536,17 +13592,13 @@ opList { argIndex: 1 } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "dataType" argType: DATA_TYPE } - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } opDeclarationType: LEGACY_XYZ } opList { @@ -13617,28 +13669,24 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "print_variable" - argDescriptor { - name: "printSpecial" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "printSpecial" + argType: BOOL } argDescriptor { name: "input" @@ -13649,6 +13697,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "probablistic_merge" @@ -13673,10 +13725,6 @@ opList { } opList { name: "qr" - argDescriptor { - name: "fullMatricies" - argType: BOOL - } argDescriptor { name: "outputQ" argType: OUTPUT_TENSOR @@ -13687,13 +13735,17 @@ opList { argIndex: 1 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "fullMatricies" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "random_bernoulli" @@ -13705,14 +13757,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "random_crop" @@ -13720,10 +13772,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13737,6 +13785,10 @@ opList { name: "seed" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "random_exponential" @@ -13748,14 +13800,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "shape" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "random_gamma" @@ -13763,10 +13815,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "shape" argType: INPUT_TENSOR @@ -13785,6 +13833,10 @@ opList { name: "seed" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "random_multinomial" @@ -13792,10 +13844,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -13809,6 +13857,10 @@ opList { name: "dimC" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "random_normal" @@ -13816,14 +13868,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "random_poisson" @@ -13831,10 +13883,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "shape" argType: INPUT_TENSOR @@ -13848,6 +13896,10 @@ opList { name: "seed" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "random_shuffle" @@ -13900,10 +13952,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "shape" argType: INPUT_TENSOR @@ -13922,6 +13970,10 @@ opList { name: "dtype" argType: INT64 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } } opList { name: "range" @@ -13943,96 +13995,96 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "from" + argType: INPUT_TENSOR + } + argDescriptor { + name: "to" + argType: INPUT_TENSOR + argIndex: 1 + } + argDescriptor { + name: "step" + argType: INPUT_TENSOR + argIndex: 2 + } + argDescriptor { + name: "from" + argType: INT64 + } + argDescriptor { + name: "to" + argType: INT64 + argIndex: 1 + } + argDescriptor { + name: "step" + argType: INT64 + argIndex: 2 + } argDescriptor { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "from" - argType: INPUT_TENSOR - } - argDescriptor { - name: "to" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "step" - argType: INPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "from" - argType: INT64 - } - argDescriptor { - name: "to" - argType: INT64 - argIndex: 1 - } - argDescriptor { - name: "step" - argType: INT64 - argIndex: 2 - } } opList { name: "rank" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "inPlace" argType: BOOL } argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR + name: "input" + argType: INPUT_TENSOR } argDescriptor { name: "dtype" argType: DATA_TYPE } - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } } opList { name: "rational_tanh" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "rational_tanh_derivative" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -14087,10 +14139,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "importDataType" - argType: DATA_TYPE - } argDescriptor { name: "list" argType: INPUT_TENSOR @@ -14104,21 +14152,21 @@ opList { name: "index" argType: INT64 } + argDescriptor { + name: "importDataType" + argType: DATA_TYPE + } opDeclarationType: LIST_OP_IMPL } opList { name: "realdiv" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -14129,6 +14177,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { @@ -14142,10 +14194,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14160,45 +14208,49 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "rectified_tanh" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "rectified_tanh_derivative" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -14232,10 +14284,6 @@ opList { } opList { name: "reduce_dot_bp" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "gradX" argType: OUTPUT_TENSOR @@ -14246,8 +14294,8 @@ opList { argIndex: 1 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14277,13 +14325,13 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_logsumexp" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "keepDims" argType: DOUBLE @@ -14293,8 +14341,8 @@ opList { argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDim" + argType: BOOL } argDescriptor { name: "input" @@ -14309,20 +14357,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_max" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14337,20 +14385,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_max_bp" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "gradI" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14370,20 +14418,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_mean" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14398,20 +14446,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_mean_bp" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "gradI" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14431,20 +14479,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_min" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14459,20 +14507,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_min_bp" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "gradI" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14492,20 +14540,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_norm1" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14520,20 +14568,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_norm1_bp" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "gradI" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14553,20 +14601,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_norm2" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14581,20 +14629,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_norm2_bp" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "gradI" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14614,20 +14662,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_norm_max" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14638,20 +14686,20 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_norm_max_bp" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "gradI" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14671,23 +14719,27 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_normmax" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "y" + name: "dimensions" argType: INPUT_TENSOR argIndex: 1 } @@ -14699,17 +14751,13 @@ opList { } opList { name: "reduce_prod" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14724,20 +14772,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_prod_bp" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "gradI" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14757,20 +14805,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_sqnorm" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "gradI" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14785,20 +14833,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_sqnorm_bp" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "gradI" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14818,6 +14866,10 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_stdev" @@ -14834,10 +14886,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14847,18 +14895,13 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_stdev_bp" - argDescriptor { - name: "biasCorrected" - argType: BOOL - } - argDescriptor { - name: "keepDims" - argType: BOOL - argIndex: 1 - } argDescriptor { name: "keepDims" argType: DOUBLE @@ -14873,8 +14916,13 @@ opList { argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "biasCorrected" + argType: BOOL + } + argDescriptor { + name: "keepDims" + argType: BOOL + argIndex: 1 } argDescriptor { name: "input" @@ -14894,20 +14942,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_sum" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14922,20 +14970,20 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_sum_bp" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "gradI" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "keepDims" + argType: BOOL } argDescriptor { name: "input" @@ -14955,6 +15003,10 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_variance" @@ -14971,10 +15023,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -14984,18 +15032,13 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reduce_variance_bp" - argDescriptor { - name: "biasCorrected" - argType: BOOL - } - argDescriptor { - name: "keepDims" - argType: BOOL - argIndex: 1 - } argDescriptor { name: "keepDims" argType: DOUBLE @@ -15010,8 +15053,13 @@ opList { argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "biasCorrected" + argType: BOOL + } + argDescriptor { + name: "keepDims" + argType: BOOL + argIndex: 1 } argDescriptor { name: "input" @@ -15031,13 +15079,13 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "relu" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "cutoff" argType: DOUBLE @@ -15046,6 +15094,10 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15054,10 +15106,6 @@ opList { } opList { name: "relu6" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "cutoff" argType: DOUBLE @@ -15067,13 +15115,17 @@ opList { argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { @@ -15124,10 +15176,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15142,21 +15190,42 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "remainder" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } + argDescriptor { + name: "input" + argType: INPUT_TENSOR + } + argDescriptor { + name: "y" + argType: INPUT_TENSOR + argIndex: 1 + } argDescriptor { name: "dataType" argType: DATA_TYPE } + opDeclarationType: LEGACY_XYZ +} +opList { + name: "remainder_scalar" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15168,32 +15237,12 @@ opList { } opDeclarationType: LEGACY_XYZ } -opList { - name: "remainder_scalar" - argDescriptor { - name: "inPlace" - argType: BOOL - } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "input" - argType: INPUT_TENSOR - } - opDeclarationType: LEGACY_XYZ -} opList { name: "repeat" argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15202,13 +15251,13 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "replace_nans" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "set" argType: DOUBLE @@ -15217,6 +15266,10 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15229,10 +15282,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15246,6 +15295,10 @@ opList { name: "shapeArr" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reshapeas" @@ -15253,10 +15306,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15266,20 +15315,20 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "resize_area" - argDescriptor { - name: "alignCorners" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "alignCorners" + argType: BOOL } argDescriptor { name: "image" @@ -15299,9 +15348,17 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "resize_bicubic" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "alignCorners" argType: BOOL @@ -15311,14 +15368,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "image" argType: INPUT_TENSOR @@ -15328,9 +15377,17 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "resize_bilinear" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "alignCorners" argType: BOOL @@ -15340,14 +15397,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "image" argType: INPUT_TENSOR @@ -15366,9 +15415,17 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "resize_images" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "alignCorners" argType: BOOL @@ -15378,14 +15435,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "image" argType: INPUT_TENSOR @@ -15400,9 +15449,17 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "resize_nearest_neighbor" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "alignCorners" argType: BOOL @@ -15412,14 +15469,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "image" argType: INPUT_TENSOR @@ -15438,6 +15487,10 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "restorev2" @@ -15473,10 +15526,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15495,6 +15544,10 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reverse_sequence" @@ -15502,10 +15555,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15524,31 +15573,31 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reverse_v2" - argDescriptor { - name: "isLegacy" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "isLegacy" + argType: BOOL + } } opList { name: "reversedivide" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -15559,14 +15608,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "reversedivide_bp" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "gradX" argType: OUTPUT_TENSOR @@ -15577,8 +15626,8 @@ opList { argIndex: 1 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -15594,6 +15643,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reversemod" @@ -15623,10 +15676,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15641,20 +15690,20 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "reversesubtract" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -15665,14 +15714,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "reversesubtract_bp" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "gradX" argType: OUTPUT_TENSOR @@ -15683,8 +15732,8 @@ opList { argIndex: 1 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -15700,6 +15749,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "rgb_to_grs" @@ -15707,10 +15760,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -15719,6 +15768,10 @@ opList { name: "dimC" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "rgb_to_hsv" @@ -15770,22 +15823,22 @@ opList { } opList { name: "rint" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: OP_IMPL } opList { @@ -15863,46 +15916,37 @@ opList { name: "shift" argType: INT64 } - argDescriptor { - name: "dimensions" - argType: INT64 - argIndex: 1 - } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { name: "round" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "rshift_bits" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -15913,26 +15957,30 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "rsqrt" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -15942,13 +15990,12 @@ opList { argType: OUTPUT_TENSOR } argDescriptor { - name: "input" - argType: INPUT_TENSOR + name: "inPlace" + argType: BOOL } argDescriptor { - name: "y" + name: "input" argType: INPUT_TENSOR - argIndex: 1 } opDeclarationType: LEGACY_XYZ } @@ -15978,6 +16025,10 @@ opList { } opList { name: "scatter_add" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "lock" argType: BOOL @@ -15987,10 +16038,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16009,6 +16056,10 @@ opList { } opList { name: "scatter_div" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "lock" argType: BOOL @@ -16018,10 +16069,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16044,10 +16091,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "list" argType: INPUT_TENSOR @@ -16062,10 +16105,18 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } opDeclarationType: LIST_OP_IMPL } opList { name: "scatter_max" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "lock" argType: BOOL @@ -16075,10 +16126,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16097,6 +16144,10 @@ opList { } opList { name: "scatter_min" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "lock" argType: BOOL @@ -16106,10 +16157,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16128,6 +16175,10 @@ opList { } opList { name: "scatter_mul" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "lock" argType: BOOL @@ -16137,10 +16188,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16159,6 +16206,10 @@ opList { } opList { name: "scatter_nd" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "lock" argType: BOOL @@ -16168,14 +16219,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "indices" argType: INPUT_TENSOR @@ -16190,9 +16233,17 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "scatter_nd_add" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "lock" argType: BOOL @@ -16202,10 +16253,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16224,6 +16271,10 @@ opList { } opList { name: "scatter_nd_sub" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "lock" argType: BOOL @@ -16233,10 +16284,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16255,6 +16302,10 @@ opList { } opList { name: "scatter_nd_update" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "lock" argType: BOOL @@ -16264,10 +16315,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16286,6 +16333,10 @@ opList { } opList { name: "scatter_sub" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "lock" argType: BOOL @@ -16295,10 +16346,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16317,6 +16364,10 @@ opList { } opList { name: "scatter_upd" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "lock" argType: BOOL @@ -16326,10 +16377,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16378,10 +16425,6 @@ opList { name: "*output" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "*input" argType: INPUT_TENSOR @@ -16396,6 +16439,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -16472,10 +16519,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "*input" argType: INPUT_TENSOR @@ -16495,6 +16538,10 @@ opList { argType: INPUT_TENSOR argIndex: 3 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } argDescriptor { name: "kH" argType: INT64 @@ -16556,10 +16603,6 @@ opList { name: "segmentedOutput" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16569,6 +16612,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "segment_max_bp" @@ -16581,10 +16628,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16599,6 +16642,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "segment_mean" @@ -16606,10 +16653,6 @@ opList { name: "segmentedOutput" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16619,6 +16662,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "segment_mean_bp" @@ -16631,10 +16678,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16649,6 +16692,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "segment_min" @@ -16656,10 +16703,6 @@ opList { name: "segmentedOutput" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16669,6 +16712,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "segment_min_bp" @@ -16681,10 +16728,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16699,6 +16742,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "segment_prod" @@ -16706,10 +16753,6 @@ opList { name: "segmentedOutput" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16719,6 +16762,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "segment_prod_bp" @@ -16731,10 +16778,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16749,6 +16792,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "segment_sum" @@ -16756,10 +16803,6 @@ opList { name: "segmentedOutput" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16769,6 +16812,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "segment_sum_bp" @@ -16776,10 +16823,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "data" argType: INPUT_TENSOR @@ -16794,6 +16837,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "select" @@ -16801,10 +16848,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "cond" argType: INPUT_TENSOR @@ -16819,25 +16862,29 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "selu" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { @@ -16859,37 +16906,33 @@ opList { } opList { name: "seluderivative" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "sequence_mask" - argDescriptor { - name: "is_static_maxlen" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "is_static_maxlen" + argType: BOOL } argDescriptor { name: "input" @@ -16905,9 +16948,8 @@ opList { argType: INT64 } argDescriptor { - name: "dataType" - argType: INT64 - argIndex: 1 + name: "dtype" + argType: DATA_TYPE } } opList { @@ -16917,30 +16959,29 @@ opList { argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "y" - argType: INPUT_TENSOR - argIndex: 1 + name: "dataType" + argType: DATA_TYPE } opDeclarationType: LEGACY_XYZ } opList { name: "set_scalar" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16953,10 +16994,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -16965,13 +17002,13 @@ opList { name: "seed" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "setrange" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "min" argType: DOUBLE @@ -16986,25 +17023,29 @@ opList { argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "setvalorless_scalar" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17034,20 +17075,20 @@ opList { } opList { name: "shannonentropy" - argDescriptor { - name: "keepDims" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "keepDims" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "y" + name: "dimensions" argType: INPUT_TENSOR argIndex: 1 } @@ -17059,55 +17100,51 @@ opList { } opList { name: "shape_of" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "shapes_of" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "shift_bits" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -17118,6 +17155,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { @@ -17130,10 +17171,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "logits" argType: INPUT_TENSOR @@ -17152,6 +17189,10 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sigm_cross_entropy_loss_grad" @@ -17173,10 +17214,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "logits" argType: INPUT_TENSOR @@ -17195,25 +17232,29 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sigmoid" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { @@ -17235,62 +17276,62 @@ opList { } opList { name: "sign" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "sin" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "sinh" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -17299,14 +17340,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "size_at" @@ -17314,10 +17355,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17326,6 +17363,10 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "size_list" @@ -17341,6 +17382,10 @@ opList { } opList { name: "skipgram" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "isInference" argType: BOOL @@ -17350,10 +17395,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "target" argType: INPUT_TENSOR @@ -17430,10 +17471,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17452,6 +17489,10 @@ opList { name: "size" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "slice_bp" @@ -17459,10 +17500,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17483,23 +17520,19 @@ opList { argIndex: 3 } argDescriptor { - name: "size" - argType: INT64 + name: "dtype" + argType: DATA_TYPE } } opList { name: "softmax" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -17509,6 +17542,10 @@ opList { name: "dimension" argType: INT64 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { @@ -17542,10 +17579,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "logits" argType: INPUT_TENSOR @@ -17564,6 +17597,10 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "softmax_cross_entropy_loss_grad" @@ -17585,10 +17622,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "logits" argType: INPUT_TENSOR @@ -17607,6 +17640,10 @@ opList { name: "reductionMode" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "softmax_cross_entropy_loss_with_logits" @@ -17614,10 +17651,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "logits" argType: INPUT_TENSOR @@ -17631,6 +17664,10 @@ opList { name: "classesDim" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "softmax_cross_entropy_loss_with_logits_grad" @@ -17643,10 +17680,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "logits" argType: INPUT_TENSOR @@ -17660,25 +17693,29 @@ opList { name: "classesDim" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "softplus" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { @@ -17700,22 +17737,22 @@ opList { } opList { name: "softsign" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { @@ -17737,37 +17774,33 @@ opList { } opList { name: "softsignderivative" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "solve" - argDescriptor { - name: "useAdjoint" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "useAdjoint" + argType: BOOL } argDescriptor { name: "a" @@ -17783,13 +17816,13 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "solve_ls" - argDescriptor { - name: "fastFlag" - argType: BOOL - } argDescriptor { name: "l2_factor" argType: DOUBLE @@ -17799,8 +17832,8 @@ opList { argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "fastFlag" + argType: BOOL } argDescriptor { name: "a" @@ -17811,6 +17844,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "somepoolingpool2d" @@ -17845,10 +17882,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17872,20 +17905,20 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "space_to_batch_nd" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -17905,6 +17938,10 @@ opList { name: "blocks" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "space_to_depth" @@ -17912,10 +17949,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -17929,6 +17962,10 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sparse_softmax_cross_entropy_loss_with_logits" @@ -17936,10 +17973,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "labels" argType: INPUT_TENSOR @@ -17949,6 +17982,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sparse_softmax_cross_entropy_loss_with_logits_grad" @@ -17956,10 +17993,6 @@ opList { name: "dLdp" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "labels" argType: INPUT_TENSOR @@ -17969,6 +18002,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "split" @@ -17976,10 +18013,6 @@ opList { name: "outArrs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "a" argType: INPUT_TENSOR @@ -17998,6 +18031,10 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "split_list" @@ -18005,10 +18042,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "list" argType: INPUT_TENSOR @@ -18023,6 +18056,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } opDeclarationType: LIST_OP_IMPL } opList { @@ -18031,10 +18068,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18044,6 +18077,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "split_v" @@ -18051,10 +18088,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18078,25 +18111,29 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sqrt" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -18113,37 +18150,33 @@ opList { } opList { name: "square" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: OP_IMPL } opList { name: "squaredsubtract" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -18154,6 +18187,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { @@ -18167,10 +18204,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18185,6 +18218,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "squeeze" @@ -18192,10 +18229,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18209,6 +18242,10 @@ opList { name: "_a" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sru" @@ -18221,10 +18258,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18249,6 +18282,10 @@ opList { argType: INPUT_TENSOR argIndex: 4 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sruCell" @@ -18261,10 +18298,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "xt" argType: INPUT_TENSOR @@ -18284,6 +18317,10 @@ opList { argType: INPUT_TENSOR argIndex: 3 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sru_bi" @@ -18296,10 +18333,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18324,6 +18357,10 @@ opList { argType: INPUT_TENSOR argIndex: 4 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sru_bi_bp" @@ -18346,10 +18383,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18389,6 +18422,10 @@ opList { argType: INPUT_TENSOR argIndex: 7 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sru_bp" @@ -18411,10 +18448,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18454,13 +18487,13 @@ opList { argType: INPUT_TENSOR argIndex: 7 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "stabilize" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "realMin" argType: DOUBLE @@ -18480,13 +18513,17 @@ opList { argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -18495,10 +18532,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18512,6 +18545,10 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "stack_list" @@ -18519,14 +18556,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "list" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } opDeclarationType: LIST_OP_IMPL } opList { @@ -18556,10 +18593,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18578,6 +18611,10 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "static_bidirectional_rnn" @@ -18595,10 +18632,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18643,6 +18676,10 @@ opList { argType: INPUT_TENSOR argIndex: 8 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "static_rnn" @@ -18655,10 +18692,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18683,9 +18716,17 @@ opList { argType: INPUT_TENSOR argIndex: 4 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "std" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "biasCorrected" argType: BOOL @@ -18695,10 +18736,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18711,10 +18748,6 @@ opList { } opList { name: "step" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "cutoff" argType: DOUBLE @@ -18723,6 +18756,10 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18731,22 +18768,22 @@ opList { } opList { name: "stop_gradient" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: OP_IMPL } opList { @@ -18755,10 +18792,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18802,6 +18835,10 @@ opList { argType: INT64 argIndex: 4 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "strided_slice_bp" @@ -18809,10 +18846,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18861,6 +18894,10 @@ opList { argType: INT64 argIndex: 4 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sub_scalar" @@ -18881,17 +18918,13 @@ opList { } opList { name: "subtract" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -18902,14 +18935,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "subtract_bp" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "gradX" argType: OUTPUT_TENSOR @@ -18920,8 +18953,8 @@ opList { argIndex: 1 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -18937,6 +18970,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "sufficient_statistics" @@ -18959,10 +18996,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 3 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -18977,9 +19010,17 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "svd" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "fullUV" argType: BOOL @@ -18989,33 +19030,10 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } - argDescriptor { - name: "s" - argType: INPUT_TENSOR - argIndex: 1 - } - argDescriptor { - name: "u" - argType: INPUT_TENSOR - argIndex: 2 - } - argDescriptor { - name: "v" - argType: INPUT_TENSOR - argIndex: 3 - } argDescriptor { name: "fullUV" argType: INT64 @@ -19030,25 +19048,29 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "swish" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -19057,6 +19079,10 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "frameName" + argType: STRING + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19066,29 +19092,25 @@ opList { argType: INPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "frameName" - argType: STRING - } } opList { name: "tan" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -19097,34 +19119,34 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "tanh" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { @@ -19150,14 +19172,14 @@ opList { name: "outE" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "tensorarrayv3" @@ -19183,6 +19205,10 @@ opList { } opList { name: "tensordot" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "transposeX" argType: BOOL @@ -19197,10 +19223,6 @@ opList { argType: BOOL argIndex: 2 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19221,10 +19243,6 @@ opList { name: "c" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "a" argType: INPUT_TENSOR @@ -19243,6 +19261,10 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "tensormmul_bp" @@ -19255,10 +19277,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "A" argType: INPUT_TENSOR @@ -19277,6 +19295,10 @@ opList { name: "axe0Size" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "test_output_reshape" @@ -19296,14 +19318,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "testcustom" @@ -19348,17 +19370,13 @@ opList { } opList { name: "tf_atan2" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "y" @@ -19369,14 +19387,14 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { name: "thresholdedrelu" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "cutoff" argType: DOUBLE @@ -19385,6 +19403,10 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19414,17 +19436,13 @@ opList { } opList { name: "tile" - argDescriptor { - name: "is_static_reps" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "is_static_reps" + argType: BOOL } argDescriptor { name: "input" @@ -19439,6 +19457,10 @@ opList { name: "dimensions" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "tile_bp" @@ -19446,10 +19468,6 @@ opList { name: "gradI" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19460,9 +19478,12 @@ opList { argIndex: 1 } argDescriptor { - name: "grad" - argType: INPUT_TENSOR - argIndex: 2 + name: "repeat" + argType: INT64 + } + argDescriptor { + name: "dtype" + argType: DATA_TYPE } } opList { @@ -19471,14 +19492,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "tile_to_shape_bp" @@ -19486,10 +19507,6 @@ opList { name: "gradX" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19499,25 +19516,29 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "timesoneminus" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { @@ -19526,14 +19547,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "to_float16" @@ -19541,14 +19562,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "to_float32" @@ -19556,14 +19577,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "to_int32" @@ -19571,14 +19592,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "to_int64" @@ -19586,14 +19607,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "to_uint32" @@ -19601,14 +19622,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "to_uint64" @@ -19616,14 +19637,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "toggle_bits" @@ -19639,10 +19660,6 @@ opList { } opList { name: "top_k" - argDescriptor { - name: "needSort" - argType: BOOL - } argDescriptor { name: "values" argType: OUTPUT_TENSOR @@ -19653,8 +19670,8 @@ opList { argIndex: 1 } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "needSort" + argType: BOOL } argDescriptor { name: "input" @@ -19664,6 +19681,10 @@ opList { name: "k" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "trace" @@ -19671,14 +19692,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "transpose" @@ -19686,22 +19707,18 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } argDescriptor { - name: "permutationVector" + name: "permuteDims" argType: INPUT_TENSOR argIndex: 1 } argDescriptor { - name: "permuteDims" - argType: INT64 + name: "dtype" + argType: DATA_TYPE } } opList { @@ -19731,6 +19748,10 @@ opList { } opList { name: "triangular_solve" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "isLower" argType: BOOL @@ -19740,14 +19761,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "a" argType: INPUT_TENSOR @@ -19757,6 +19770,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "triu" @@ -19764,10 +19781,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19776,6 +19789,10 @@ opList { name: "diag" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "triu_bp" @@ -19783,10 +19800,6 @@ opList { name: "gradI" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19800,20 +19813,20 @@ opList { name: "diag" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "truncatediv" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -19824,6 +19837,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: BROADCASTABLE_OP_IMPL } opList { @@ -19837,14 +19854,14 @@ opList { argType: OUTPUT_TENSOR argIndex: 1 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unique_with_counts" @@ -19862,14 +19879,14 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_max" @@ -19877,10 +19894,6 @@ opList { name: "segmentedOutput" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19894,6 +19907,10 @@ opList { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_max_bp" @@ -19901,10 +19918,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "data" argType: INPUT_TENSOR @@ -19923,6 +19936,10 @@ opList { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_mean" @@ -19930,10 +19947,6 @@ opList { name: "segmentedOutput" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -19947,6 +19960,10 @@ opList { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_mean_bp" @@ -19954,10 +19971,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "data" argType: INPUT_TENSOR @@ -19976,6 +19989,10 @@ opList { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_min" @@ -19983,10 +20000,6 @@ opList { name: "segmentedOutput" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20000,6 +20013,10 @@ opList { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_min_bp" @@ -20007,10 +20024,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "data" argType: INPUT_TENSOR @@ -20029,6 +20042,10 @@ opList { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_prod" @@ -20036,10 +20053,6 @@ opList { name: "segmentedOutput" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20053,6 +20066,10 @@ opList { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_prod_bp" @@ -20060,10 +20077,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20082,6 +20095,10 @@ opList { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_sqrt_n" @@ -20089,10 +20106,6 @@ opList { name: "segmentedOutput" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20106,6 +20119,10 @@ opList { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_sqrt_n_bp" @@ -20113,10 +20130,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "data" argType: INPUT_TENSOR @@ -20135,6 +20148,10 @@ opList { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_sum" @@ -20142,10 +20159,6 @@ opList { name: "segmentedOutput" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20159,6 +20172,10 @@ opList { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unsorted_segment_sum_bp" @@ -20166,10 +20183,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "data" argType: INPUT_TENSOR @@ -20188,6 +20201,10 @@ opList { name: "numSegments" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unstack" @@ -20195,10 +20212,6 @@ opList { name: "outArrs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20212,6 +20225,10 @@ opList { argType: INT64 argIndex: 1 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "unstack_list" @@ -20227,17 +20244,13 @@ opList { } opList { name: "upsampling2d" - argDescriptor { - name: "nchw" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "nchw" + argType: BOOL } argDescriptor { name: "input" @@ -20257,20 +20270,20 @@ opList { argType: INT64 argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "upsampling2d_bp" - argDescriptor { - name: "nchw" - argType: BOOL - } argDescriptor { name: "gradI" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "nchw" + argType: BOOL } argDescriptor { name: "input" @@ -20285,20 +20298,20 @@ opList { name: "scaleW" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "upsampling3d" - argDescriptor { - name: "ncdhw" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "ncdhw" + argType: BOOL } argDescriptor { name: "input" @@ -20323,20 +20336,20 @@ opList { argType: INT64 argIndex: 3 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "upsampling3d_bp" - argDescriptor { - name: "ncdhw" - argType: BOOL - } argDescriptor { name: "gradI" argType: OUTPUT_TENSOR } argDescriptor { - name: "dtype" - argType: DATA_TYPE + name: "ncdhw" + argType: BOOL } argDescriptor { name: "input" @@ -20351,9 +20364,17 @@ opList { name: "isNCDHW" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "var" + argDescriptor { + name: "outputs" + argType: OUTPUT_TENSOR + } argDescriptor { name: "biasCorrected" argType: BOOL @@ -20363,10 +20384,6 @@ opList { argType: BOOL argIndex: 1 } - argDescriptor { - name: "outputs" - argType: OUTPUT_TENSOR - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20405,10 +20422,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "condition" argType: INPUT_TENSOR @@ -20423,6 +20436,10 @@ opList { argType: INPUT_TENSOR argIndex: 2 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "write_list" @@ -20455,10 +20472,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dataType" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20468,18 +20481,22 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: LEGACY_XYZ } opList { name: "xor_scalar" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20492,10 +20509,6 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20514,6 +20527,10 @@ opList { name: "bTranspose" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "xw_plus_b_bp" @@ -20531,10 +20548,6 @@ opList { argType: OUTPUT_TENSOR argIndex: 2 } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20558,6 +20571,10 @@ opList { name: "bTranspose" argType: INT64 } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "yiq_to_rgb" @@ -20597,14 +20614,14 @@ opList { name: "outputs" argType: OUTPUT_TENSOR } - argDescriptor { - name: "dtype" - argType: DATA_TYPE - } argDescriptor { name: "input" argType: INPUT_TENSOR } + argDescriptor { + name: "dtype" + argType: DATA_TYPE + } } opList { name: "zeros_as" @@ -20630,14 +20647,14 @@ opList { } opList { name: "zeroslike" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } + argDescriptor { + name: "inPlace" + argType: BOOL + } argDescriptor { name: "input" argType: INPUT_TENSOR @@ -20649,17 +20666,13 @@ opList { } opList { name: "zeta" - argDescriptor { - name: "inPlace" - argType: BOOL - } argDescriptor { name: "outputs" argType: OUTPUT_TENSOR } argDescriptor { - name: "dataType" - argType: DATA_TYPE + name: "inPlace" + argType: BOOL } argDescriptor { name: "input" @@ -20670,6 +20683,10 @@ opList { argType: INPUT_TENSOR argIndex: 1 } + argDescriptor { + name: "dataType" + argType: DATA_TYPE + } opDeclarationType: CONFIGURABLE_OP_IMPL } opList { diff --git a/nd4j/samediff-import/samediff-import-onnx/pom.xml b/nd4j/samediff-import/samediff-import-onnx/pom.xml index 347b91e38..68c80e38d 100644 --- a/nd4j/samediff-import/samediff-import-onnx/pom.xml +++ b/nd4j/samediff-import/samediff-import-onnx/pom.xml @@ -38,6 +38,15 @@ 5.10.0.202012080955-r + + + + org.jetbrains.kotlin + kotlin-maven-plugin + + + + diff --git a/nd4j/samediff-import/samediff-import-onnx/src/main/kotlin/org/nd4j/samediff/frameworkimport/onnx/OnnxRuleDeclarations.kt b/nd4j/samediff-import/samediff-import-onnx/src/main/kotlin/org/nd4j/samediff/frameworkimport/onnx/OnnxRuleDeclarations.kt index 7424e4982..75eef9df8 100644 --- a/nd4j/samediff-import/samediff-import-onnx/src/main/kotlin/org/nd4j/samediff/frameworkimport/onnx/OnnxRuleDeclarations.kt +++ b/nd4j/samediff-import/samediff-import-onnx/src/main/kotlin/org/nd4j/samediff/frameworkimport/onnx/OnnxRuleDeclarations.kt @@ -27,6 +27,7 @@ import org.nd4j.samediff.frameworkimport.onnx.process.OnnxMappingProcess import org.nd4j.samediff.frameworkimport.onnx.rule.attribute.* import org.nd4j.samediff.frameworkimport.onnx.rule.tensor.NDArrayMappingRule import org.nd4j.samediff.frameworkimport.onnx.rule.tensor.OnnxMultiInputIndexMappingRule +import org.nd4j.samediff.frameworkimport.onnx.rule.tensor.OnnxPassThroughMultiInputTensorMapping import org.nd4j.samediff.frameworkimport.rule.attribute.AttributeMappingRule fun mappingNDArrayInputs(inputs: MutableMap) : NDArrayMappingRule { @@ -40,6 +41,10 @@ fun mappingListNDArrays(inputs: MutableMap) : OnnxMultiInputIndex mappingNamesToPerform = inputs) } +fun passThroughNDArrayInputs() : OnnxPassThroughMultiInputTensorMapping { + return OnnxPassThroughMultiInputTensorMapping() +} + fun conditionalFieldValueIntIndexNDArrayRule(outputAttribute: String, inputFrameworkAttributeName: String, targetValue: String, diff --git a/nd4j/samediff-import/samediff-import-onnx/src/main/kotlin/org/nd4j/samediff/frameworkimport/onnx/context/OnnxMappingContext.kt b/nd4j/samediff-import/samediff-import-onnx/src/main/kotlin/org/nd4j/samediff/frameworkimport/onnx/context/OnnxMappingContext.kt index 69f1b8f6c..1265d15cb 100644 --- a/nd4j/samediff-import/samediff-import-onnx/src/main/kotlin/org/nd4j/samediff/frameworkimport/onnx/context/OnnxMappingContext.kt +++ b/nd4j/samediff-import/samediff-import-onnx/src/main/kotlin/org/nd4j/samediff/frameworkimport/onnx/context/OnnxMappingContext.kt @@ -136,4 +136,12 @@ IRGraph input.toString() }.indexOf(name) + if(foundIndex < 0) { + throw IllegalArgumentException("No name ${name} found on op def with name ${opDef.name}") + } + return node.getInput(foundIndex) + } + } \ No newline at end of file diff --git a/nd4j/samediff-import/samediff-import-onnx/src/main/kotlin/org/nd4j/samediff/frameworkimport/onnx/rule/tensor/OnnxPassThroughMultiInputTensorMapping.kt b/nd4j/samediff-import/samediff-import-onnx/src/main/kotlin/org/nd4j/samediff/frameworkimport/onnx/rule/tensor/OnnxPassThroughMultiInputTensorMapping.kt new file mode 100644 index 000000000..068313ee5 --- /dev/null +++ b/nd4j/samediff-import/samediff-import-onnx/src/main/kotlin/org/nd4j/samediff/frameworkimport/onnx/rule/tensor/OnnxPassThroughMultiInputTensorMapping.kt @@ -0,0 +1,54 @@ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ +package org.nd4j.samediff.frameworkimport.onnx.rule.tensor + +import onnx.Onnx +import org.nd4j.ir.OpNamespace +import org.nd4j.ir.TensorNamespace +import org.nd4j.samediff.frameworkimport.findOp +import org.nd4j.samediff.frameworkimport.onnx.ir.OnnxIRTensor +import org.nd4j.samediff.frameworkimport.opdefs.OpDescriptorLoaderHolder +import org.nd4j.samediff.frameworkimport.rule.MappingRule +import org.nd4j.samediff.frameworkimport.rule.tensor.MultiInputIndexMappingRule +import org.nd4j.samediff.frameworkimport.rule.tensor.PassThroughMultiTensorMapping + +@MappingRule("onnx","passthrough","tensor") +class OnnxPassThroughMultiInputTensorMapping(mappingNamesToPerform: MutableMap = mutableMapOf(), + transformerArgs: Map> = emptyMap()): + PassThroughMultiTensorMapping(mappingNamesToPerform = mappingNamesToPerform, transformerArgs = transformerArgs) { + + + + override fun createTensorProto(input: Onnx.TensorProto): TensorNamespace.TensorProto { + return OnnxIRTensor(input).toArgTensor() + } + + override fun isInputTensorName(inputName: String): Boolean { + val onnxOp = OpDescriptorLoaderHolder.listForFramework("onnx")[mappingProcess!!.inputFrameworkOpName()]!! + return onnxOp.inputList.contains(inputName) + } + + override fun isOutputTensorName(outputName: String): Boolean { + val nd4jOpDescriptor = OpDescriptorLoaderHolder.nd4jOpDescriptor.findOp(mappingProcess!!.opName()) + return nd4jOpDescriptor.argDescriptorList.filter { inputDescriptor -> inputDescriptor.argType == OpNamespace.ArgDescriptor.ArgType.INPUT_TENSOR } + .map {inputDescriptor -> inputDescriptor.name }.contains(outputName) + } +} \ No newline at end of file diff --git a/nd4j/samediff-import/samediff-import-tensorflow/pom.xml b/nd4j/samediff-import/samediff-import-tensorflow/pom.xml index 38c529629..334a75bac 100644 --- a/nd4j/samediff-import/samediff-import-tensorflow/pom.xml +++ b/nd4j/samediff-import/samediff-import-tensorflow/pom.xml @@ -21,7 +21,7 @@ --> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 samediff-import-tensorflow @@ -38,13 +38,26 @@ UTF-8 - - - org.nd4j - samediff-import-api - ${project.version} - - + + + + org.jetbrains.kotlin + kotlin-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + + + + + + + org.nd4j + samediff-import-api + ${project.version} + + diff --git a/nd4j/samediff-import/samediff-import-tensorflow/src/main/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/TensorflowProtobufExtensions.kt b/nd4j/samediff-import/samediff-import-tensorflow/src/main/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/TensorflowProtobufExtensions.kt index 862b75b94..dc6159b20 100644 --- a/nd4j/samediff-import/samediff-import-tensorflow/src/main/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/TensorflowProtobufExtensions.kt +++ b/nd4j/samediff-import/samediff-import-tensorflow/src/main/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/TensorflowProtobufExtensions.kt @@ -27,6 +27,7 @@ import org.nd4j.samediff.frameworkimport.tensorflow.process.TensorflowMappingPro import org.nd4j.samediff.frameworkimport.tensorflow.rule.attribute.TensorflowArgDescriptorConstant import org.nd4j.samediff.frameworkimport.tensorflow.rule.tensor.NDArrayMappingRule import org.nd4j.samediff.frameworkimport.tensorflow.rule.tensor.TensorflowMultiInputIndexMappingRule +import org.nd4j.samediff.frameworkimport.tensorflow.rule.tensor.TensorflowPassThroughMultiTensorMapping import org.nd4j.shade.protobuf.ByteString import org.tensorflow.framework.* import java.nio.charset.Charset @@ -201,6 +202,11 @@ fun mappingListNDArrays(inputs: MutableMap) : TensorflowMultiInp ) } + +fun passThroughNDArrayInputs() : TensorflowPassThroughMultiTensorMapping { + return TensorflowPassThroughMultiTensorMapping() +} + fun booleanConstant(inputName: String, constantValue: Boolean,argumentIndex: Int): List { return listOf(argDescriptorConstant(listOf( ArgDescriptor { @@ -334,7 +340,7 @@ fun defineSingularReduce(inputFrameworkOpName: String, valueMapping(mutableMapOf("keepDims" to "keep_dims")), ndarrayToIntList(mutableMapOf("dimensions" to "reduction_indices")) ), - tensorNames = mutableMapOf("input" to "input"), + tensorNames = mutableMapOf("input" to "input","dimensions" to "reduction_indices"), tensorflowOpRegistry = tensorflowOpRegistry ) } diff --git a/nd4j/samediff-import/samediff-import-tensorflow/src/main/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/context/TensorflowMappingContext.kt b/nd4j/samediff-import/samediff-import-tensorflow/src/main/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/context/TensorflowMappingContext.kt index ee9fe5d11..df7ce62d1 100644 --- a/nd4j/samediff-import/samediff-import-tensorflow/src/main/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/context/TensorflowMappingContext.kt +++ b/nd4j/samediff-import/samediff-import-tensorflow/src/main/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/context/TensorflowMappingContext.kt @@ -133,5 +133,13 @@ class TensorflowMappingContext(opDef: OpDef, node: NodeDef, graph: IRGraph input.name }.indexOf(name) + if(inputNameIdx < 0) { + throw java.lang.IllegalArgumentException("No name ${name} found on op def with name ${opDef.name}") + } + return node.getInput(inputNameIdx) + } + } \ No newline at end of file diff --git a/nd4j/samediff-import/samediff-import-tensorflow/src/main/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/definitions/TensorflowOpDeclarations.kt b/nd4j/samediff-import/samediff-import-tensorflow/src/main/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/definitions/TensorflowOpDeclarations.kt index 5b9692017..20d601b46 100644 --- a/nd4j/samediff-import/samediff-import-tensorflow/src/main/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/definitions/TensorflowOpDeclarations.kt +++ b/nd4j/samediff-import/samediff-import-tensorflow/src/main/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/definitions/TensorflowOpDeclarations.kt @@ -113,7 +113,7 @@ val pairwiseReduceOps = mapOf( val addN = TensorflowMappingProcess( inputFrameworkOpName = "AddN", opName = "mergesum", - tensorMappingRules = listOf(mappingNDArrayInputs(mutableMapOf("input" to "inputs"))), + tensorMappingRules = listOf(mappingListNDArrays(mutableMapOf("input" to "inputs"))), opMappingRegistry = tensorflowOpRegistry ) @@ -152,7 +152,7 @@ val argMaxRule = TensorflowMappingProcess( inputFrameworkOpName = "ArgMax", opName = "argmax", opMappingRegistry = tensorflowOpRegistry, - tensorMappingRules = listOf(mappingNDArrayInputs(mutableMapOf("input" to "input"))), + tensorMappingRules = listOf(mappingNDArrayInputs(mutableMapOf("input" to "input","dimensions" to "dimension"))), attributeMappingRules = listOf( booleanConstant(inputName = "keepDims",constantValue = false,argumentIndex = 0)[0]) @@ -162,7 +162,7 @@ val argMinRule = TensorflowMappingProcess( inputFrameworkOpName = "ArgMin", opName = "argmin", opMappingRegistry = tensorflowOpRegistry, - tensorMappingRules = listOf(mappingNDArrayInputs(mutableMapOf("input" to "input"))), + tensorMappingRules = listOf(mappingNDArrayInputs(mutableMapOf("input" to "input","dimensions" to "dimension"))), attributeMappingRules = listOf( booleanConstant(inputName = "keepDims",constantValue = false,argumentIndex = 0)[0]) @@ -338,7 +338,7 @@ val binCount = TensorflowMappingProcess( opMappingRegistry = tensorflowOpRegistry, opName = "bincount", inputFrameworkOpName = "Bincount", - tensorMappingRules = listOf(mappingNDArrayInputs(mutableMapOf("weights" to "weights","values" to "arr"))), + tensorMappingRules = listOf(mappingNDArrayInputs(mutableMapOf("weights" to "weights","values" to "arr","min" to "size","max" to "size"))), attributeMappingRules = listOf( argDescriptorConstant(listOf( ArgDescriptor { @@ -796,7 +796,8 @@ val deconv2d = TensorflowMappingProcess( falseIndex = 2,inputFrameworkStringNameToTest = "data_format",argumentIndex = 7), //NOTE: This is a dynamically resolved attribute at runtime. intConstant(inputName = "kH",constantValue = -1,argumentIndex = 0)[0], - intConstant(inputName = "kW",constantValue = -1,argumentIndex = 1)[0] + intConstant(inputName = "kW",constantValue = -1,argumentIndex = 1)[0], + valueMapping(mutableMapOf("dtype" to "T")) ),opMappingRegistry = tensorflowOpRegistry) @@ -847,7 +848,7 @@ val dynamicPartition = TensorflowMappingProcess( val dynamicStitch = TensorflowMappingProcess( opName = "dynamic_stitch", - tensorMappingRules = listOf(mappingNDArrayInputs(mutableMapOf("index" to "data","input" to "indices"))), + tensorMappingRules = listOf(passThroughNDArrayInputs()), attributeMappingRules = listOf(valueMapping(mutableMapOf("numPartitions" to "N"))), inputFrameworkOpName = "DynamicStitch", opMappingRegistry = tensorflowOpRegistry @@ -855,7 +856,7 @@ val dynamicStitch = TensorflowMappingProcess( //ParallelDynamicStitch val parallelDynamicStitch = TensorflowMappingProcess( opName = "dynamic_stitch", - tensorMappingRules = listOf(mappingNDArrayInputs(mutableMapOf("index" to "data","input" to "indices"))), + tensorMappingRules = listOf(passThroughNDArrayInputs()), attributeMappingRules = listOf(valueMapping(mutableMapOf("numPartitions" to "N"))), inputFrameworkOpName = "ParallelDynamicStitch", opMappingRegistry = tensorflowOpRegistry @@ -1070,7 +1071,7 @@ val fill = TensorflowMappingProcess( inputFrameworkOpName = "Fill", opMappingRegistry = tensorflowOpRegistry, attributeMappingRules = listOf(convertNDArrayInputToNumericalAttr(mutableMapOf("value" to "value")), - dataTypeToInt(mutableMapOf("outputDataType" to "T")), + dataTypeToInt(mutableMapOf("dtype" to "T")), valueMapping(mutableMapOf("dtype" to "T"))), tensorMappingRules = listOf(mappingNDArrayInputs(mutableMapOf("shapeArray" to "dims"))) ) @@ -1435,14 +1436,13 @@ val maxPool3d = TensorflowMappingProcess( ) -//TODO: Not likely correct. Need to figure out true mapping. Likely an implicit control flow op? -val loopCond = mapTensorNamesWithOp(inputFrameworkOpName = "LoopCond",opName = "loop_cond",tensorNames = mutableMapOf() - ,tensorflowOpRegistry = tensorflowOpRegistry) -val merge = mapTensorNamesWithOp(inputFrameworkOpName = "Merge",opName = "merge", - attributeMappingRules = listOf(), - - tensorNames = mutableMapOf("input" to "inputs") +val loopCond = mapTensorNamesWithOp(inputFrameworkOpName = "LoopCond",opName = "loop_cond", + tensorNames = mutableMapOf("input" to "input") ,tensorflowOpRegistry = tensorflowOpRegistry) +val merge = TensorflowMappingProcess(inputFrameworkOpName = "Merge", + opName = "merge", + tensorMappingRules = listOf(mappingListNDArrays(mutableMapOf("input" to "inputs"))), + opMappingRegistry = tensorflowOpRegistry) val mirrorPadding = mapTensorNamesWithOp(inputFrameworkOpName = "MirrorPad",opName = "mirror_pad", tensorNames = mutableMapOf("input" to "input","paddings" to "paddings"), @@ -1458,7 +1458,7 @@ val mirrorPadding = mapTensorNamesWithOp(inputFrameworkOpName = "MirrorPad",opNa val matrixBandPart = mapTensorNamesWithOp(inputFrameworkOpName = "MatrixBandPart",opName = "matrix_band_part", tensorNames = mutableMapOf("input" to "input","minLowerT" to "num_lower", - "maxUpperT" to "num_upper"), + "maxUpperT" to "num_upper"), attributeMappingRules = listOf() ,tensorflowOpRegistry = tensorflowOpRegistry) @@ -1580,7 +1580,7 @@ val rank = mapTensorNamesWithOp(inputFrameworkOpName = "Rank", opName = "rank",t val relu6 = multipleNameMapping(inputFrameworkOpNames = listOf("Relu6"),opName = "relu6", attributeMappingRules = listOf( valueMapping(mutableMapOf("dtype" to "T")), - argDescriptorConstant( + argDescriptorConstant( listOf(ArgDescriptor { name = "inPlace" boolValue = false @@ -1593,14 +1593,18 @@ val relu6 = multipleNameMapping(inputFrameworkOpNames = listOf("Relu6"),opName = argType = OpNamespace.ArgDescriptor.ArgType.DOUBLE argIndex = 0 }) - )), + )), tensorNames = mutableMapOf("input" to "features") ,tensorflowOpRegistry = tensorflowOpRegistry) -val stack = multipleNameMapping(inputFrameworkOpNames = listOf("Pack"),opName = "stack", - attributeMappingRules = listOf(valueMapping(mutableMapOf("dimensions" to "axis","dtype" to "T"))), - tensorNames = mutableMapOf("input" to "values") - ,tensorflowOpRegistry = tensorflowOpRegistry) + + +val stack = TensorflowMappingProcess(inputFrameworkOpName ="Pack", + opName = "stack", + attributeMappingRules = listOf(valueMapping(mutableMapOf("dimensions" to "axis", + "dtype" to "T"))), + tensorMappingRules = listOf(mappingListNDArrays(mutableMapOf("input" to "values"))), + opMappingRegistry = tensorflowOpRegistry) /** * // in case of REFLECT and SYMMETRIC modes paddings must obey additional shape requirements @@ -1832,8 +1836,8 @@ val reverseSequence = multipleNameMapping(inputFrameworkOpNames = listOf("Revers ,tensorflowOpRegistry = tensorflowOpRegistry) val roll = multipleNameMapping(inputFrameworkOpNames = listOf("Roll"),opName = "roll", - attributeMappingRules = listOf(ndarrayToIntList(mutableMapOf("shift" to "shift","dimensions" to "axis"))), - tensorNames = mutableMapOf("input" to "input") + attributeMappingRules = listOf(ndarrayToIntList(mutableMapOf("shift" to "shift"))), + tensorNames = mutableMapOf("input" to "input","dimensions" to "axis") ,tensorflowOpRegistry = tensorflowOpRegistry) //TODO: verify usingLocking property, it's not showing up in descriptors @@ -1996,7 +2000,7 @@ listOf(argDescriptorConstant( )),tensorflowOpRegistry = tensorflowOpRegistry) val logSoftmax = mapTensorNamesWithOp(inputFrameworkOpName = "LogSoftmax", opName = "log_softmax",tensorNames = mutableMapOf("input" to "logits") -,tensorflowOpRegistry = tensorflowOpRegistry) + ,tensorflowOpRegistry = tensorflowOpRegistry) //FakeQuantWithMinMaxVars //FakeQuantWithMinMaxVarsPerChannel @@ -2146,45 +2150,52 @@ val svd = TensorflowMappingProcess( -//TODO: revisit this, not sure why the ops are off -val tensorArrayConcat = multipleNameMapping(inputFrameworkOpNames = -listOf("TensorArrayConcat"), +val tensorArrayConcat = TensorflowMappingProcess(inputFrameworkOpName = "TensorArrayConcat", opName = "stack_list", - tensorNames = mutableMapOf("list" to "flow_in"),tensorflowOpRegistry = tensorflowOpRegistry) + attributeMappingRules = listOf(valueMapping(mutableMapOf("dtype" to "dtype"))), + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) -val tensorArrayConcatV2 = multipleNameMapping(inputFrameworkOpNames = -listOf("TensorArrayConcatV2"), +val tensorArrayConcatV2 = TensorflowMappingProcess(inputFrameworkOpName = "TensorArrayConcatV2", opName = "stack_list", - tensorNames = mutableMapOf("list" to "flow_in"),tensorflowOpRegistry = tensorflowOpRegistry) + attributeMappingRules = listOf(valueMapping(mutableMapOf("dtype" to "dtype"))), + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) -val tensorArrayConcatV3 = multipleNameMapping(inputFrameworkOpNames = -listOf("TensorArrayConcatV3"), + + +val tensorArrayConcatV3 = TensorflowMappingProcess(inputFrameworkOpName = "TensorArrayConcatV3", opName = "stack_list", - tensorNames = mutableMapOf("list" to "flow_in"),tensorflowOpRegistry = tensorflowOpRegistry) + attributeMappingRules = listOf(valueMapping(mutableMapOf("dtype" to "dtype"))), + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) -val tensorArrayWriteV3 = multipleNameMapping(inputFrameworkOpNames = -listOf("TensorArrayWriteV3"), + +val tensorArrayWriteV3 = TensorflowMappingProcess(inputFrameworkOpName = "TensorArrayWriteV3", opName = "tensorarraywritev3", - tensorNames = mutableMapOf("input" to "handle"),tensorflowOpRegistry = tensorflowOpRegistry) + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) -//TODO: revisit this, not sure why the ops are off -val tensorArrayGather = multipleNameMapping(inputFrameworkOpNames = listOf("TensorArrayGather"), + +val tensorArrayGather = TensorflowMappingProcess(inputFrameworkOpName = "TensorArrayGather", opName = "gather_list", attributeMappingRules = listOf(valueMapping(mutableMapOf("dtype" to "dtype"))), - tensorNames = mutableMapOf("indices" to "indices","list" to "flow_in"),tensorflowOpRegistry = tensorflowOpRegistry) + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) -val tensorArrayGatherv2 = multipleNameMapping(inputFrameworkOpNames = listOf("TensorArrayGatherV2"), +val tensorArrayGatherV2 = TensorflowMappingProcess(inputFrameworkOpName = "TensorArrayGatherV2", opName = "gather_list", attributeMappingRules = listOf(valueMapping(mutableMapOf("dtype" to "dtype"))), - tensorNames = mutableMapOf("indices" to "indices","list" to "flow_in"),tensorflowOpRegistry = tensorflowOpRegistry) + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) -val tensorArrayGatherv3 = multipleNameMapping(inputFrameworkOpNames = listOf( "TensorArrayGatherV3"), +val tensorArrayGatherV3 = TensorflowMappingProcess(inputFrameworkOpName = "TensorArrayGatherV3", opName = "gather_list", attributeMappingRules = listOf(valueMapping(mutableMapOf("dtype" to "dtype"))), - tensorNames = mutableMapOf("indices" to "indices","list" to "flow_in"),tensorflowOpRegistry = tensorflowOpRegistry) - + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) //TODO: revisit this, not sure why the ops are off /*val tensorArrayPack = multipleNameMapping(inputFrameworkOpNames = listOf("TensorArrayPack", "TensorArrayPackV2", "TensorArrayPackV3"), @@ -2192,80 +2203,96 @@ val tensorArrayGatherv3 = multipleNameMapping(inputFrameworkOpNames = listOf( "T tensorNames = mutableMapOf("indices" to "indices"))*/ //TODO: revisit this, not sure why the ops are off -val tensorArrayRead = multipleNameMapping(inputFrameworkOpNames = listOf("TensorArrayRead"), +val tensorArrayRead = TensorflowMappingProcess(inputFrameworkOpName = "TensorArrayRead", opName = "read_list", attributeMappingRules = listOf(valueMapping(mutableMapOf("importDataType" to "dtype"))), - tensorNames = mutableMapOf("list" to "handle"),tensorflowOpRegistry = tensorflowOpRegistry) + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) -val tensorArrayReadV2 = multipleNameMapping(inputFrameworkOpNames = listOf("TensorArrayReadV2"), - opName = "read_list", - attributeMappingRules = listOf(valueMapping(mutableMapOf("importDataType" to "dtype"))), - tensorNames = mutableMapOf("list" to "handle"),tensorflowOpRegistry = tensorflowOpRegistry) -val tensorArrayReadV3 = multipleNameMapping(inputFrameworkOpNames = listOf("TensorArrayReadV3"), +val tensorArrayReadV2 = TensorflowMappingProcess(inputFrameworkOpName = "TensorArrayReadV2", opName = "read_list", attributeMappingRules = listOf(valueMapping(mutableMapOf("importDataType" to "dtype"))), - tensorNames = mutableMapOf("list" to "handle"),tensorflowOpRegistry = tensorflowOpRegistry) -// + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) + + +val tensorArrayReadV3 = TensorflowMappingProcess(inputFrameworkOpName = "TensorArrayReadV3", + opName = "read_list", + attributeMappingRules = listOf(valueMapping(mutableMapOf("importDataType" to "dtype"))), + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) + + // // TODO: revisit this, not sure why the ops are off -val tensorArrayScatter = multipleNameMapping(inputFrameworkOpNames = listOf("TensorArrayScatter"), +val tensorArrayScatter = TensorflowMappingProcess(inputFrameworkOpName = "TensorArrayScatter", opName = "scatter_list", attributeMappingRules = listOf(valueMapping(mutableMapOf("dtype" to "T"))), - tensorNames = mutableMapOf("array" to "value","sizes" to "indices","list" to "flow_in") - ,tensorflowOpRegistry = tensorflowOpRegistry) + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) -val tensorArrayScatterV2 = multipleNameMapping(inputFrameworkOpNames = listOf("TensorArrayScatterV2"), +val tensorArrayScatterV2 = TensorflowMappingProcess(inputFrameworkOpName = "TensorArrayScatterV2", opName = "scatter_list", attributeMappingRules = listOf(valueMapping(mutableMapOf("dtype" to "T"))), - tensorNames = mutableMapOf("array" to "value","sizes" to "indices","list" to "flow_in") - ,tensorflowOpRegistry = tensorflowOpRegistry) + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) -val tensorArrayScatterV3 = multipleNameMapping(inputFrameworkOpNames = listOf("TensorArrayScatterV3"), + + +val tensorArrayScatterV3 = TensorflowMappingProcess(inputFrameworkOpName = "TensorArrayScatterV3", opName = "scatter_list", attributeMappingRules = listOf(valueMapping(mutableMapOf("dtype" to "T"))), - tensorNames = mutableMapOf("array" to "value","sizes" to "indices","list" to "flow_in") - ,tensorflowOpRegistry = tensorflowOpRegistry) + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) + //TODO: revisit this, not sure why the ops are off -val tensorArraySize = multipleNameMapping(inputFrameworkOpNames = listOf("TensorArraySize"), +val tensorArraySize = TensorflowMappingProcess(inputFrameworkOpName = "TensorArraySize", opName = "size_list", - tensorNames = mutableMapOf("list" to "handle","list" to "flow_in") - ,tensorflowOpRegistry = tensorflowOpRegistry) + attributeMappingRules = listOf(), + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) -val tensorArraySizeV2 = multipleNameMapping(inputFrameworkOpNames = listOf("TensorArraySizeV2"), + +val tensorArraySizeV2 = TensorflowMappingProcess(inputFrameworkOpName = "TensorArraySizeV2", opName = "size_list", - tensorNames = mutableMapOf("list" to "handle","list" to "flow_in") - ,tensorflowOpRegistry = tensorflowOpRegistry) + attributeMappingRules = listOf(), + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) -val tensorArraySizeV3 = multipleNameMapping(inputFrameworkOpNames = listOf("TensorArraySizeV3"), + +val tensorArraySizeV3 = TensorflowMappingProcess(inputFrameworkOpName = "TensorArraySizeV3", opName = "size_list", - tensorNames = mutableMapOf("list" to "handle","list" to "flow_in") - ,tensorflowOpRegistry = tensorflowOpRegistry) -//TODO: revisit this, not sure why the ops are off + attributeMappingRules = listOf(), + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) -val tensorArraySplit = multipleNameMapping(inputFrameworkOpNames = listOf("TensorArraySplit"), +val tensorArraySplit = TensorflowMappingProcess(inputFrameworkOpName = "TensorArraySplit", opName = "split_list", attributeMappingRules = listOf(valueMapping(mutableMapOf("dtype" to "T"))), - tensorNames = mutableMapOf("sizes" to "lengths","list" to "value","array" to "value") - ,tensorflowOpRegistry = tensorflowOpRegistry) + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) -val tensorArraySplitV2 = multipleNameMapping(inputFrameworkOpNames = listOf("TensorArraySplitV2"), +val tensorArraySplitV2 = TensorflowMappingProcess(inputFrameworkOpName = "TensorArraySplitV2", opName = "split_list", attributeMappingRules = listOf(valueMapping(mutableMapOf("dtype" to "T"))), - tensorNames = mutableMapOf("sizes" to "lengths","list" to "value","array" to "value") - ,tensorflowOpRegistry = tensorflowOpRegistry) + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) -val tensorArraySplitV3 = multipleNameMapping(inputFrameworkOpNames = listOf("TensorArraySplitV3"), + + +val tensorArraySplitV3 = TensorflowMappingProcess(inputFrameworkOpName = "TensorArraySplitV3", opName = "split_list", attributeMappingRules = listOf(valueMapping(mutableMapOf("dtype" to "T"))), - tensorNames = mutableMapOf("sizes" to "lengths","list" to "value","array" to "value") - ,tensorflowOpRegistry = tensorflowOpRegistry) + tensorMappingRules = listOf(passThroughNDArrayInputs()), + opMappingRegistry = tensorflowOpRegistry) + val tile = mapTensorNamesWithOp(inputFrameworkOpName = "Tile",opName = "tile", @@ -2286,8 +2313,8 @@ val topkV2 = multipleNameMapping(inputFrameworkOpNames = listOf("TopKV2"),opName val transpose = mapTensorNamesWithOp( inputFrameworkOpName = "Transpose", opName = "transpose", - tensorNames = mutableMapOf("input" to "x","permutationVector" to "perm"), - attributeMappingRules = listOf(valueMapping(mutableMapOf("dtype" to "T")), ndarrayToIntList(mutableMapOf("permuteDims" to "perm"))) + tensorNames = mutableMapOf("input" to "x","permuteDims" to "perm"), + attributeMappingRules = listOf(valueMapping(mutableMapOf("dtype" to "T"))) ,tensorflowOpRegistry = tensorflowOpRegistry) diff --git a/nd4j/samediff-import/samediff-import-tensorflow/src/main/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/rule/tensor/TensorflowPassThroughMultiTensorMapping.kt b/nd4j/samediff-import/samediff-import-tensorflow/src/main/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/rule/tensor/TensorflowPassThroughMultiTensorMapping.kt new file mode 100644 index 000000000..d6cfd6c3b --- /dev/null +++ b/nd4j/samediff-import/samediff-import-tensorflow/src/main/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/rule/tensor/TensorflowPassThroughMultiTensorMapping.kt @@ -0,0 +1,55 @@ +/* + * ****************************************************************************** + * * + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * 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. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + */ +package org.nd4j.samediff.frameworkimport.tensorflow.rule.tensor + +import org.nd4j.ir.OpNamespace +import org.nd4j.ir.TensorNamespace +import org.nd4j.samediff.frameworkimport.findOp +import org.nd4j.samediff.frameworkimport.opdefs.OpDescriptorLoaderHolder +import org.nd4j.samediff.frameworkimport.rule.MappingRule +import org.nd4j.samediff.frameworkimport.rule.tensor.MultiInputIndexMappingRule +import org.nd4j.samediff.frameworkimport.rule.tensor.PassThroughMultiTensorMapping +import org.nd4j.samediff.frameworkimport.tensorflow.ir.TensorflowIRTensor +import org.tensorflow.framework.* + +@MappingRule("tensorflow","passthrough","tensor") +class TensorflowPassThroughMultiTensorMapping(mappingNamesToPerform: MutableMap = mutableMapOf(), + transformerArgs: Map> = emptyMap()): + PassThroughMultiTensorMapping(mappingNamesToPerform = mappingNamesToPerform, transformerArgs = transformerArgs) { + + + + override fun createTensorProto(input: TensorProto): TensorNamespace.TensorProto { + return TensorflowIRTensor(input).toArgTensor() + } + + + override fun isInputTensorName(inputName: String): Boolean { + val tfOp = OpDescriptorLoaderHolder.listForFramework("tensorflow")[mappingProcess!!.inputFrameworkOpName()]!! + + return tfOp.inputArgList.map { input -> input.name }.contains(inputName) + } + + override fun isOutputTensorName(outputName: String): Boolean { + val nd4jOpDescriptor = OpDescriptorLoaderHolder.nd4jOpDescriptor.findOp(mappingProcess!!.opName()) + return nd4jOpDescriptor.argDescriptorList.filter { inputDescriptor -> inputDescriptor.argType == OpNamespace.ArgDescriptor.ArgType.INPUT_TENSOR } + .map {inputDescriptor -> inputDescriptor.name }.contains(outputName) + } +} \ No newline at end of file diff --git a/nd4j/samediff-import/samediff-import-tensorflow/src/main/resources/tensorflow-mapping-ruleset.pbtxt b/nd4j/samediff-import/samediff-import-tensorflow/src/main/resources/tensorflow-mapping-ruleset.pbtxt index 4089294ca..05d47dcf0 100644 --- a/nd4j/samediff-import/samediff-import-tensorflow/src/main/resources/tensorflow-mapping-ruleset.pbtxt +++ b/nd4j/samediff-import/samediff-import-tensorflow/src/main/resources/tensorflow-mapping-ruleset.pbtxt @@ -1748,8 +1748,8 @@ mappings { opName: "stack" inputFrameworkOpName: "Pack" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" + ruleName: "multiinputindex" + functionName: "multiinputindex" inputTensorName: "values" outputTensorName: "input" inputToOutput { @@ -2020,11 +2020,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "reduction_indices" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "reduction_indices" + } ruleType: "tensor" inputFrameworkOpName: "Sum" } @@ -2056,20 +2062,8 @@ mappings { opName: "dynamic_stitch" inputFrameworkOpName: "DynamicStitch" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "data" - inputTensorName: "indices" - outputTensorName: "index" - outputTensorName: "input" - inputToOutput { - key: "index" - value: "data" - } - inputToOutput { - key: "input" - value: "indices" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "DynamicStitch" } @@ -2094,11 +2088,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "dimension" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "dimension" + } ruleType: "tensor" inputFrameworkOpName: "ArgMax" } @@ -2153,11 +2153,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "reduction_indices" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "reduction_indices" + } ruleType: "tensor" inputFrameworkOpName: "Min" } @@ -2318,26 +2324,8 @@ mappings { opName: "scatter_list" inputFrameworkOpName: "TensorArrayScatterV3" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "value" - inputTensorName: "indices" - inputTensorName: "flow_in" - outputTensorName: "array" - outputTensorName: "sizes" - outputTensorName: "list" - inputToOutput { - key: "array" - value: "value" - } - inputToOutput { - key: "sizes" - value: "indices" - } - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayScatterV3" } @@ -2359,26 +2347,8 @@ mappings { opName: "scatter_list" inputFrameworkOpName: "TensorArrayScatterV2" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "value" - inputTensorName: "indices" - inputTensorName: "flow_in" - outputTensorName: "array" - outputTensorName: "sizes" - outputTensorName: "list" - inputToOutput { - key: "array" - value: "value" - } - inputToOutput { - key: "sizes" - value: "indices" - } - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayScatterV2" } @@ -4497,14 +4467,8 @@ mappings { opName: "tensorarraywritev3" inputFrameworkOpName: "TensorArrayWriteV3" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "handle" - outputTensorName: "input" - inputToOutput { - key: "input" - value: "handle" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayWriteV3" } @@ -4928,6 +4892,12 @@ mappings { rule { ruleName: "ndarraymapping" functionName: "ndarraymapping" + inputTensorName: "input" + outputTensorName: "input" + inputToOutput { + key: "input" + value: "input" + } ruleType: "tensor" inputFrameworkOpName: "LoopCond" } @@ -5183,8 +5153,8 @@ mappings { opName: "merge" inputFrameworkOpName: "Merge" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" + ruleName: "multiinputindex" + functionName: "multiinputindex" inputTensorName: "inputs" outputTensorName: "input" inputToOutput { @@ -5350,14 +5320,8 @@ mappings { opName: "size_list" inputFrameworkOpName: "TensorArraySize" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "flow_in" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArraySize" } @@ -6395,17 +6359,23 @@ mappings { opName: "stack_list" inputFrameworkOpName: "TensorArrayConcat" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "flow_in" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayConcat" } + rule { + ruleName: "valuemapping" + functionName: "valuemapping" + inputDataTypeName: "dtype" + outputDataTypeName: "dtype" + inputToOutput { + key: "dtype" + value: "dtype" + } + ruleType: "attribute" + inputFrameworkOpName: "TensorArrayConcat" + } } mappings { frameworkName: "tensorflow" @@ -6876,11 +6846,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "axis" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "axis" + } ruleType: "tensor" inputFrameworkOpName: "Roll" } @@ -6892,10 +6868,6 @@ mappings { key: "shift" value: "shift" } - inputToOutput { - key: "dimensions" - value: "axis" - } ruleType: "attribute" inputFrameworkOpName: "Roll" } @@ -7073,26 +7045,8 @@ mappings { opName: "split_list" inputFrameworkOpName: "TensorArraySplit" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "lengths" - inputTensorName: "value" - inputTensorName: "value" - outputTensorName: "sizes" - outputTensorName: "list" - outputTensorName: "array" - inputToOutput { - key: "sizes" - value: "lengths" - } - inputToOutput { - key: "list" - value: "value" - } - inputToOutput { - key: "array" - value: "value" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArraySplit" } @@ -7174,10 +7128,10 @@ mappings { rule { ruleName: "valuemapping" functionName: "valuemapping" + outputIntName: "outputType" inputBooleanName: "init" outputBooleanName: "init" inputDataTypeName: "dtype" - outputDataTypeName: "outputType" inputToOutput { key: "init" value: "init" @@ -7192,8 +7146,8 @@ mappings { rule { ruleName: "datatypetoint" functionName: "datatypetoint" + outputIntName: "outputType" inputDataTypeName: "dtype" - outputDataTypeName: "outputType" inputToOutput { key: "outputType" value: "dtype" @@ -8036,14 +7990,8 @@ mappings { opName: "read_list" inputFrameworkOpName: "TensorArrayRead" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "handle" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "handle" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayRead" } @@ -8200,26 +8148,8 @@ mappings { opName: "scatter_list" inputFrameworkOpName: "TensorArrayScatter" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "value" - inputTensorName: "indices" - inputTensorName: "flow_in" - outputTensorName: "array" - outputTensorName: "sizes" - outputTensorName: "list" - inputToOutput { - key: "array" - value: "value" - } - inputToOutput { - key: "sizes" - value: "indices" - } - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayScatter" } @@ -8241,14 +8171,8 @@ mappings { opName: "size_list" inputFrameworkOpName: "TensorArraySizeV2" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "flow_in" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArraySizeV2" } @@ -8258,14 +8182,8 @@ mappings { opName: "size_list" inputFrameworkOpName: "TensorArraySizeV3" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "flow_in" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArraySizeV3" } @@ -8563,14 +8481,8 @@ mappings { opName: "read_list" inputFrameworkOpName: "TensorArrayReadV3" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "handle" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "handle" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayReadV3" } @@ -8641,14 +8553,8 @@ mappings { opName: "read_list" inputFrameworkOpName: "TensorArrayReadV2" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "handle" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "handle" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayReadV2" } @@ -9324,13 +9230,13 @@ mappings { inputTensorName: "x" inputTensorName: "perm" outputTensorName: "input" - outputTensorName: "permutationVector" + outputTensorName: "permuteDims" inputToOutput { key: "input" value: "x" } inputToOutput { - key: "permutationVector" + key: "permuteDims" value: "perm" } ruleType: "tensor" @@ -9348,17 +9254,6 @@ mappings { ruleType: "attribute" inputFrameworkOpName: "Transpose" } - rule { - ruleName: "ndarraytointattributevalue" - functionName: "ndarraytointattributevalue" - outputIntName: "permuteDims" - inputToOutput { - key: "permuteDims" - value: "perm" - } - ruleType: "attribute" - inputFrameworkOpName: "Transpose" - } } mappings { frameworkName: "tensorflow" @@ -9601,26 +9496,8 @@ mappings { opName: "split_list" inputFrameworkOpName: "TensorArraySplitV2" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "lengths" - inputTensorName: "value" - inputTensorName: "value" - outputTensorName: "sizes" - outputTensorName: "list" - outputTensorName: "array" - inputToOutput { - key: "sizes" - value: "lengths" - } - inputToOutput { - key: "list" - value: "value" - } - inputToOutput { - key: "array" - value: "value" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArraySplitV2" } @@ -9685,26 +9562,8 @@ mappings { opName: "split_list" inputFrameworkOpName: "TensorArraySplitV3" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "lengths" - inputTensorName: "value" - inputTensorName: "value" - outputTensorName: "sizes" - outputTensorName: "list" - outputTensorName: "array" - inputToOutput { - key: "sizes" - value: "lengths" - } - inputToOutput { - key: "list" - value: "value" - } - inputToOutput { - key: "array" - value: "value" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArraySplitV3" } @@ -10179,11 +10038,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "reduction_indices" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "reduction_indices" + } ruleType: "tensor" inputFrameworkOpName: "Max" } @@ -10292,20 +10157,8 @@ mappings { opName: "gather_list" inputFrameworkOpName: "TensorArrayGather" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "indices" - inputTensorName: "flow_in" - outputTensorName: "indices" - outputTensorName: "list" - inputToOutput { - key: "indices" - value: "indices" - } - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayGather" } @@ -10331,8 +10184,12 @@ mappings { functionName: "ndarraymapping" inputTensorName: "weights" inputTensorName: "arr" + inputTensorName: "size" + inputTensorName: "size" outputTensorName: "weights" outputTensorName: "values" + outputTensorName: "min" + outputTensorName: "max" inputToOutput { key: "weights" value: "weights" @@ -10341,6 +10198,14 @@ mappings { key: "values" value: "arr" } + inputToOutput { + key: "min" + value: "size" + } + inputToOutput { + key: "max" + value: "size" + } ruleType: "tensor" inputFrameworkOpName: "Bincount" } @@ -10372,8 +10237,8 @@ mappings { rule { ruleName: "valuemapping" functionName: "valuemapping" + outputIntName: "outputType" inputDataTypeName: "T" - outputDataTypeName: "outputType" inputToOutput { key: "outputType" value: "T" @@ -10452,11 +10317,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "reduction_indices" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "reduction_indices" + } ruleType: "tensor" inputFrameworkOpName: "Prod" } @@ -10712,11 +10583,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "dimension" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "dimension" + } ruleType: "tensor" inputFrameworkOpName: "ArgMin" } @@ -11614,6 +11491,18 @@ mappings { } inputFrameworkOpName: "Conv2DBackpropInput" } + rule { + ruleName: "valuemapping" + functionName: "valuemapping" + inputDataTypeName: "T" + outputDataTypeName: "dtype" + inputToOutput { + key: "dtype" + value: "T" + } + ruleType: "attribute" + inputFrameworkOpName: "Conv2DBackpropInput" + } } mappings { frameworkName: "tensorflow" @@ -11669,34 +11558,46 @@ mappings { opName: "stack_list" inputFrameworkOpName: "TensorArrayConcatV3" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "flow_in" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayConcatV3" } + rule { + ruleName: "valuemapping" + functionName: "valuemapping" + inputDataTypeName: "dtype" + outputDataTypeName: "dtype" + inputToOutput { + key: "dtype" + value: "dtype" + } + ruleType: "attribute" + inputFrameworkOpName: "TensorArrayConcatV3" + } } mappings { frameworkName: "tensorflow" opName: "stack_list" inputFrameworkOpName: "TensorArrayConcatV2" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "flow_in" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayConcatV2" } + rule { + ruleName: "valuemapping" + functionName: "valuemapping" + inputDataTypeName: "dtype" + outputDataTypeName: "dtype" + inputToOutput { + key: "dtype" + value: "dtype" + } + ruleType: "attribute" + inputFrameworkOpName: "TensorArrayConcatV2" + } } mappings { frameworkName: "tensorflow" @@ -12022,11 +11923,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "reduction_indices" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "reduction_indices" + } ruleType: "tensor" inputFrameworkOpName: "All" } @@ -12045,7 +11952,6 @@ mappings { rule { ruleName: "ndarraytointattributevalue" functionName: "ndarraytointattributevalue" - outputIntName: "dimensions" inputToOutput { key: "dimensions" value: "reduction_indices" @@ -12127,10 +12033,10 @@ mappings { rule { ruleName: "datatypetoint" functionName: "datatypetoint" - outputIntName: "outputDataType" + outputIntName: "dtype" inputDataTypeName: "T" inputToOutput { - key: "outputDataType" + key: "dtype" value: "T" } ruleType: "attribute" @@ -12139,8 +12045,8 @@ mappings { rule { ruleName: "valuemapping" functionName: "valuemapping" + outputIntName: "dtype" inputDataTypeName: "T" - outputDataTypeName: "dtype" inputToOutput { key: "dtype" value: "T" @@ -12538,20 +12444,8 @@ mappings { opName: "gather_list" inputFrameworkOpName: "TensorArrayGatherV2" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "indices" - inputTensorName: "flow_in" - outputTensorName: "indices" - outputTensorName: "list" - inputToOutput { - key: "indices" - value: "indices" - } - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayGatherV2" } @@ -12584,20 +12478,8 @@ mappings { opName: "gather_list" inputFrameworkOpName: "TensorArrayGatherV3" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "indices" - inputTensorName: "flow_in" - outputTensorName: "indices" - outputTensorName: "list" - inputToOutput { - key: "indices" - value: "indices" - } - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayGatherV3" } @@ -14635,11 +14517,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "reduction_indices" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "reduction_indices" + } ruleType: "tensor" inputFrameworkOpName: "Mean" } @@ -14972,11 +14860,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "reduction_indices" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "reduction_indices" + } ruleType: "tensor" inputFrameworkOpName: "Any" } @@ -14995,7 +14889,6 @@ mappings { rule { ruleName: "ndarraytointattributevalue" functionName: "ndarraytointattributevalue" - outputIntName: "dimensions" inputToOutput { key: "dimensions" value: "reduction_indices" @@ -15354,20 +15247,8 @@ mappings { opName: "dynamic_stitch" inputFrameworkOpName: "ParallelDynamicStitch" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "data" - inputTensorName: "indices" - outputTensorName: "index" - outputTensorName: "input" - inputToOutput { - key: "index" - value: "data" - } - inputToOutput { - key: "input" - value: "indices" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "ParallelDynamicStitch" } @@ -15965,8 +15846,8 @@ mappings { opName: "mergesum" inputFrameworkOpName: "AddN" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" + ruleName: "multiinputindex" + functionName: "multiinputindex" inputTensorName: "inputs" outputTensorName: "input" inputToOutput { diff --git a/nd4j/samediff-import/samediff-import-tensorflow/src/test/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/TestTensorflowIR.kt b/nd4j/samediff-import/samediff-import-tensorflow/src/test/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/TestTensorflowIR.kt index 6931c20ca..4fc06280a 100644 --- a/nd4j/samediff-import/samediff-import-tensorflow/src/test/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/TestTensorflowIR.kt +++ b/nd4j/samediff-import/samediff-import-tensorflow/src/test/kotlin/org/nd4j/samediff/frameworkimport/tensorflow/TestTensorflowIR.kt @@ -88,17 +88,28 @@ class TestTensorflowIR { //TFGraphMapper.importGraph(textGraph) // val inputMap = mapOf("input_1" to Nd4j.zeros(10).castTo(org.nd4j.linalg.api.buffer.DataType.INT32),"input_2" to Nd4j.zeros(1,8).castTo(org.nd4j.linalg.api.buffer.DataType.DOUBLE)) //val inputMap = mapOf("image" to Nd4j.ones(1,128,128,4)) + /** + * TODO: fix emptyReduce. + * When we pass in 2 inputs where input 1 is the dimensions, the results + * work. In our model import, it appears that + * the empty dimensions aren't being passed down + * for int arguments properly. + * We need to figure out the difference between specifying 2 input arrays + * and ints, that or we need to make it so that arrays can be passed in + * for dimensions for each singular reduce op. + * + * Each op seems to be able to take in dimensions for indices. + * It *MIGHT* be better just to pass in dimensions directly. + */ val inputMap = emptyMap() val tensorflowIRGraph = TensorflowIRGraph(textGraph,tensorflowOps,tfImporter.registry) val outputList = tensorflowIRGraph.nodeList().map { input -> input.nodeName() }.toMutableSet() - outputList.add("FusedBatchNormV3:1") - outputList.add("FusedBatchNormV3:2") val tfGraphRunner = TensorflowIRGraphRunner(tensorflowIRGraph, inputMap.keys.toList(), outputList.toList()) val importedGraph = TFGraphMapper.importGraph(textGraph) val graph = tfImporter.importFromGraph(textGraph,inputMap) val tfOutput = tfGraphRunner.run(inputMap) - val output = graph.outputAll(inputMap) val output2 = importedGraph.outputAll(inputMap) + val output = graph.outputAll(inputMap) //assertEquals(tfOutput.keys,outputList) diff --git a/nd4j/samediff-import/samediff-import-tensorflow/tensorflow-processes.pbtxt b/nd4j/samediff-import/samediff-import-tensorflow/tensorflow-processes.pbtxt index 4089294ca..05d47dcf0 100644 --- a/nd4j/samediff-import/samediff-import-tensorflow/tensorflow-processes.pbtxt +++ b/nd4j/samediff-import/samediff-import-tensorflow/tensorflow-processes.pbtxt @@ -1748,8 +1748,8 @@ mappings { opName: "stack" inputFrameworkOpName: "Pack" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" + ruleName: "multiinputindex" + functionName: "multiinputindex" inputTensorName: "values" outputTensorName: "input" inputToOutput { @@ -2020,11 +2020,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "reduction_indices" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "reduction_indices" + } ruleType: "tensor" inputFrameworkOpName: "Sum" } @@ -2056,20 +2062,8 @@ mappings { opName: "dynamic_stitch" inputFrameworkOpName: "DynamicStitch" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "data" - inputTensorName: "indices" - outputTensorName: "index" - outputTensorName: "input" - inputToOutput { - key: "index" - value: "data" - } - inputToOutput { - key: "input" - value: "indices" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "DynamicStitch" } @@ -2094,11 +2088,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "dimension" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "dimension" + } ruleType: "tensor" inputFrameworkOpName: "ArgMax" } @@ -2153,11 +2153,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "reduction_indices" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "reduction_indices" + } ruleType: "tensor" inputFrameworkOpName: "Min" } @@ -2318,26 +2324,8 @@ mappings { opName: "scatter_list" inputFrameworkOpName: "TensorArrayScatterV3" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "value" - inputTensorName: "indices" - inputTensorName: "flow_in" - outputTensorName: "array" - outputTensorName: "sizes" - outputTensorName: "list" - inputToOutput { - key: "array" - value: "value" - } - inputToOutput { - key: "sizes" - value: "indices" - } - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayScatterV3" } @@ -2359,26 +2347,8 @@ mappings { opName: "scatter_list" inputFrameworkOpName: "TensorArrayScatterV2" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "value" - inputTensorName: "indices" - inputTensorName: "flow_in" - outputTensorName: "array" - outputTensorName: "sizes" - outputTensorName: "list" - inputToOutput { - key: "array" - value: "value" - } - inputToOutput { - key: "sizes" - value: "indices" - } - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayScatterV2" } @@ -4497,14 +4467,8 @@ mappings { opName: "tensorarraywritev3" inputFrameworkOpName: "TensorArrayWriteV3" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "handle" - outputTensorName: "input" - inputToOutput { - key: "input" - value: "handle" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayWriteV3" } @@ -4928,6 +4892,12 @@ mappings { rule { ruleName: "ndarraymapping" functionName: "ndarraymapping" + inputTensorName: "input" + outputTensorName: "input" + inputToOutput { + key: "input" + value: "input" + } ruleType: "tensor" inputFrameworkOpName: "LoopCond" } @@ -5183,8 +5153,8 @@ mappings { opName: "merge" inputFrameworkOpName: "Merge" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" + ruleName: "multiinputindex" + functionName: "multiinputindex" inputTensorName: "inputs" outputTensorName: "input" inputToOutput { @@ -5350,14 +5320,8 @@ mappings { opName: "size_list" inputFrameworkOpName: "TensorArraySize" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "flow_in" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArraySize" } @@ -6395,17 +6359,23 @@ mappings { opName: "stack_list" inputFrameworkOpName: "TensorArrayConcat" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "flow_in" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayConcat" } + rule { + ruleName: "valuemapping" + functionName: "valuemapping" + inputDataTypeName: "dtype" + outputDataTypeName: "dtype" + inputToOutput { + key: "dtype" + value: "dtype" + } + ruleType: "attribute" + inputFrameworkOpName: "TensorArrayConcat" + } } mappings { frameworkName: "tensorflow" @@ -6876,11 +6846,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "axis" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "axis" + } ruleType: "tensor" inputFrameworkOpName: "Roll" } @@ -6892,10 +6868,6 @@ mappings { key: "shift" value: "shift" } - inputToOutput { - key: "dimensions" - value: "axis" - } ruleType: "attribute" inputFrameworkOpName: "Roll" } @@ -7073,26 +7045,8 @@ mappings { opName: "split_list" inputFrameworkOpName: "TensorArraySplit" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "lengths" - inputTensorName: "value" - inputTensorName: "value" - outputTensorName: "sizes" - outputTensorName: "list" - outputTensorName: "array" - inputToOutput { - key: "sizes" - value: "lengths" - } - inputToOutput { - key: "list" - value: "value" - } - inputToOutput { - key: "array" - value: "value" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArraySplit" } @@ -7174,10 +7128,10 @@ mappings { rule { ruleName: "valuemapping" functionName: "valuemapping" + outputIntName: "outputType" inputBooleanName: "init" outputBooleanName: "init" inputDataTypeName: "dtype" - outputDataTypeName: "outputType" inputToOutput { key: "init" value: "init" @@ -7192,8 +7146,8 @@ mappings { rule { ruleName: "datatypetoint" functionName: "datatypetoint" + outputIntName: "outputType" inputDataTypeName: "dtype" - outputDataTypeName: "outputType" inputToOutput { key: "outputType" value: "dtype" @@ -8036,14 +7990,8 @@ mappings { opName: "read_list" inputFrameworkOpName: "TensorArrayRead" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "handle" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "handle" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayRead" } @@ -8200,26 +8148,8 @@ mappings { opName: "scatter_list" inputFrameworkOpName: "TensorArrayScatter" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "value" - inputTensorName: "indices" - inputTensorName: "flow_in" - outputTensorName: "array" - outputTensorName: "sizes" - outputTensorName: "list" - inputToOutput { - key: "array" - value: "value" - } - inputToOutput { - key: "sizes" - value: "indices" - } - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayScatter" } @@ -8241,14 +8171,8 @@ mappings { opName: "size_list" inputFrameworkOpName: "TensorArraySizeV2" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "flow_in" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArraySizeV2" } @@ -8258,14 +8182,8 @@ mappings { opName: "size_list" inputFrameworkOpName: "TensorArraySizeV3" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "flow_in" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArraySizeV3" } @@ -8563,14 +8481,8 @@ mappings { opName: "read_list" inputFrameworkOpName: "TensorArrayReadV3" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "handle" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "handle" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayReadV3" } @@ -8641,14 +8553,8 @@ mappings { opName: "read_list" inputFrameworkOpName: "TensorArrayReadV2" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "handle" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "handle" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayReadV2" } @@ -9324,13 +9230,13 @@ mappings { inputTensorName: "x" inputTensorName: "perm" outputTensorName: "input" - outputTensorName: "permutationVector" + outputTensorName: "permuteDims" inputToOutput { key: "input" value: "x" } inputToOutput { - key: "permutationVector" + key: "permuteDims" value: "perm" } ruleType: "tensor" @@ -9348,17 +9254,6 @@ mappings { ruleType: "attribute" inputFrameworkOpName: "Transpose" } - rule { - ruleName: "ndarraytointattributevalue" - functionName: "ndarraytointattributevalue" - outputIntName: "permuteDims" - inputToOutput { - key: "permuteDims" - value: "perm" - } - ruleType: "attribute" - inputFrameworkOpName: "Transpose" - } } mappings { frameworkName: "tensorflow" @@ -9601,26 +9496,8 @@ mappings { opName: "split_list" inputFrameworkOpName: "TensorArraySplitV2" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "lengths" - inputTensorName: "value" - inputTensorName: "value" - outputTensorName: "sizes" - outputTensorName: "list" - outputTensorName: "array" - inputToOutput { - key: "sizes" - value: "lengths" - } - inputToOutput { - key: "list" - value: "value" - } - inputToOutput { - key: "array" - value: "value" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArraySplitV2" } @@ -9685,26 +9562,8 @@ mappings { opName: "split_list" inputFrameworkOpName: "TensorArraySplitV3" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "lengths" - inputTensorName: "value" - inputTensorName: "value" - outputTensorName: "sizes" - outputTensorName: "list" - outputTensorName: "array" - inputToOutput { - key: "sizes" - value: "lengths" - } - inputToOutput { - key: "list" - value: "value" - } - inputToOutput { - key: "array" - value: "value" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArraySplitV3" } @@ -10179,11 +10038,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "reduction_indices" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "reduction_indices" + } ruleType: "tensor" inputFrameworkOpName: "Max" } @@ -10292,20 +10157,8 @@ mappings { opName: "gather_list" inputFrameworkOpName: "TensorArrayGather" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "indices" - inputTensorName: "flow_in" - outputTensorName: "indices" - outputTensorName: "list" - inputToOutput { - key: "indices" - value: "indices" - } - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayGather" } @@ -10331,8 +10184,12 @@ mappings { functionName: "ndarraymapping" inputTensorName: "weights" inputTensorName: "arr" + inputTensorName: "size" + inputTensorName: "size" outputTensorName: "weights" outputTensorName: "values" + outputTensorName: "min" + outputTensorName: "max" inputToOutput { key: "weights" value: "weights" @@ -10341,6 +10198,14 @@ mappings { key: "values" value: "arr" } + inputToOutput { + key: "min" + value: "size" + } + inputToOutput { + key: "max" + value: "size" + } ruleType: "tensor" inputFrameworkOpName: "Bincount" } @@ -10372,8 +10237,8 @@ mappings { rule { ruleName: "valuemapping" functionName: "valuemapping" + outputIntName: "outputType" inputDataTypeName: "T" - outputDataTypeName: "outputType" inputToOutput { key: "outputType" value: "T" @@ -10452,11 +10317,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "reduction_indices" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "reduction_indices" + } ruleType: "tensor" inputFrameworkOpName: "Prod" } @@ -10712,11 +10583,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "dimension" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "dimension" + } ruleType: "tensor" inputFrameworkOpName: "ArgMin" } @@ -11614,6 +11491,18 @@ mappings { } inputFrameworkOpName: "Conv2DBackpropInput" } + rule { + ruleName: "valuemapping" + functionName: "valuemapping" + inputDataTypeName: "T" + outputDataTypeName: "dtype" + inputToOutput { + key: "dtype" + value: "T" + } + ruleType: "attribute" + inputFrameworkOpName: "Conv2DBackpropInput" + } } mappings { frameworkName: "tensorflow" @@ -11669,34 +11558,46 @@ mappings { opName: "stack_list" inputFrameworkOpName: "TensorArrayConcatV3" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "flow_in" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayConcatV3" } + rule { + ruleName: "valuemapping" + functionName: "valuemapping" + inputDataTypeName: "dtype" + outputDataTypeName: "dtype" + inputToOutput { + key: "dtype" + value: "dtype" + } + ruleType: "attribute" + inputFrameworkOpName: "TensorArrayConcatV3" + } } mappings { frameworkName: "tensorflow" opName: "stack_list" inputFrameworkOpName: "TensorArrayConcatV2" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "flow_in" - outputTensorName: "list" - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayConcatV2" } + rule { + ruleName: "valuemapping" + functionName: "valuemapping" + inputDataTypeName: "dtype" + outputDataTypeName: "dtype" + inputToOutput { + key: "dtype" + value: "dtype" + } + ruleType: "attribute" + inputFrameworkOpName: "TensorArrayConcatV2" + } } mappings { frameworkName: "tensorflow" @@ -12022,11 +11923,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "reduction_indices" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "reduction_indices" + } ruleType: "tensor" inputFrameworkOpName: "All" } @@ -12045,7 +11952,6 @@ mappings { rule { ruleName: "ndarraytointattributevalue" functionName: "ndarraytointattributevalue" - outputIntName: "dimensions" inputToOutput { key: "dimensions" value: "reduction_indices" @@ -12127,10 +12033,10 @@ mappings { rule { ruleName: "datatypetoint" functionName: "datatypetoint" - outputIntName: "outputDataType" + outputIntName: "dtype" inputDataTypeName: "T" inputToOutput { - key: "outputDataType" + key: "dtype" value: "T" } ruleType: "attribute" @@ -12139,8 +12045,8 @@ mappings { rule { ruleName: "valuemapping" functionName: "valuemapping" + outputIntName: "dtype" inputDataTypeName: "T" - outputDataTypeName: "dtype" inputToOutput { key: "dtype" value: "T" @@ -12538,20 +12444,8 @@ mappings { opName: "gather_list" inputFrameworkOpName: "TensorArrayGatherV2" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "indices" - inputTensorName: "flow_in" - outputTensorName: "indices" - outputTensorName: "list" - inputToOutput { - key: "indices" - value: "indices" - } - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayGatherV2" } @@ -12584,20 +12478,8 @@ mappings { opName: "gather_list" inputFrameworkOpName: "TensorArrayGatherV3" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "indices" - inputTensorName: "flow_in" - outputTensorName: "indices" - outputTensorName: "list" - inputToOutput { - key: "indices" - value: "indices" - } - inputToOutput { - key: "list" - value: "flow_in" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "TensorArrayGatherV3" } @@ -14635,11 +14517,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "reduction_indices" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "reduction_indices" + } ruleType: "tensor" inputFrameworkOpName: "Mean" } @@ -14972,11 +14860,17 @@ mappings { ruleName: "ndarraymapping" functionName: "ndarraymapping" inputTensorName: "input" + inputTensorName: "reduction_indices" outputTensorName: "input" + outputTensorName: "dimensions" inputToOutput { key: "input" value: "input" } + inputToOutput { + key: "dimensions" + value: "reduction_indices" + } ruleType: "tensor" inputFrameworkOpName: "Any" } @@ -14995,7 +14889,6 @@ mappings { rule { ruleName: "ndarraytointattributevalue" functionName: "ndarraytointattributevalue" - outputIntName: "dimensions" inputToOutput { key: "dimensions" value: "reduction_indices" @@ -15354,20 +15247,8 @@ mappings { opName: "dynamic_stitch" inputFrameworkOpName: "ParallelDynamicStitch" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" - inputTensorName: "data" - inputTensorName: "indices" - outputTensorName: "index" - outputTensorName: "input" - inputToOutput { - key: "index" - value: "data" - } - inputToOutput { - key: "input" - value: "indices" - } + ruleName: "passthrough" + functionName: "passthrough" ruleType: "tensor" inputFrameworkOpName: "ParallelDynamicStitch" } @@ -15965,8 +15846,8 @@ mappings { opName: "mergesum" inputFrameworkOpName: "AddN" rule { - ruleName: "ndarraymapping" - functionName: "ndarraymapping" + ruleName: "multiinputindex" + functionName: "multiinputindex" inputTensorName: "inputs" outputTensorName: "input" inputToOutput { diff --git a/pom.xml b/pom.xml index df4047219..b15d4b56a 100644 --- a/pom.xml +++ b/pom.xml @@ -340,7 +340,7 @@ - contrib + @@ -639,7 +639,7 @@ org.apache.maven.plugins maven-dependency-plugin - 2.10 + 3.1.2 install