From 2e08b2112c0ad3af2ff8a54593e58f9628527d50 Mon Sep 17 00:00:00 2001 From: chentong319 Date: Thu, 25 Jun 2020 16:34:37 -0400 Subject: [PATCH] String type (Ready for Review) (#182) * string type from tensorflow * simplify type * parser and print * gen StringType for tablegen * onnx to onnx-mlir type * add namespace * allow all integer type * dialect document * add test case * format * more precise type for ONNXOp * format * enable the failed test * update comment * update onnx.md Co-authored-by: Gheorghe-Teodor Bercea --- docs/Dialects/onnx.md | 966 +++++++++---------- src/Dialect/ONNX/CMakeLists.txt | 1 + src/Dialect/ONNX/ONNXOps.cpp | 27 +- src/Dialect/ONNX/ONNXOps.hpp | 40 + src/Dialect/ONNX/ONNXOps.td | 2 + src/Dialect/ONNX/ONNXOps.td.inc | 966 +++++++++---------- src/Dialect/ONNX/ONNXOpsHelper.cpp | 18 +- test/mlir/krnl/reshape.mlir | 4 +- test/mlir/onnx/onnx_lowering.mlir | 56 +- test/mlir/onnx/onnx_shape_inference.mlir | 61 +- test/mlir/onnx/onnx_structure.mlir | 17 +- test/mlir/transform/attribute_promotion.mlir | 30 +- utils/gen_onnx_mlir.py | 86 +- 13 files changed, 1210 insertions(+), 1064 deletions(-) diff --git a/docs/Dialects/onnx.md b/docs/Dialects/onnx.md index 3191d3f..6f7ddf5 100644 --- a/docs/Dialects/onnx.md +++ b/docs/Dialects/onnx.md @@ -11,13 +11,13 @@ ONNX Abs operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Acos` (ONNXAcosOp) @@ -29,13 +29,13 @@ ONNX Acos operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Acosh` (ONNXAcoshOp) @@ -47,13 +47,13 @@ ONNX Acosh operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Add` (ONNXAddOp) @@ -67,14 +67,14 @@ ONNX Add operation | Operand | Description | | :-----: | ----------- | -`A` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values -`B` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`A` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`B` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`C` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`C` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.And` (ONNXAndOp) @@ -89,14 +89,14 @@ ONNX And operation | Operand | Description | | :-----: | ----------- | -`A` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values -`B` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values +`A` | tensor of 1-bit signless integer values +`B` | tensor of 1-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`C` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values +`C` | tensor of 1-bit signless integer values ### `onnx.ArgMax` (ONNXArgMaxOp) @@ -118,13 +118,13 @@ ONNX ArgMax operation | Operand | Description | | :-----: | ----------- | -`data` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`data` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`reduced` | memref of any type values or tensor of any type values +`reduced` | tensor of 64-bit signless integer values ### `onnx.ArgMin` (ONNXArgMinOp) @@ -146,13 +146,13 @@ ONNX ArgMin operation | Operand | Description | | :-----: | ----------- | -`data` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`data` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`reduced` | memref of any type values or tensor of any type values +`reduced` | tensor of 64-bit signless integer values ### `onnx.ArrayFeatureExtractor` (ONNXArrayFeatureExtractorOp) @@ -165,14 +165,14 @@ ONNX ArrayFeatureExtractor operation | Operand | Description | | :-----: | ----------- | -`X` | memref of any type values or tensor of any type values -`Y` | memref of any type values or tensor of any type values +`X` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 64-bit signless integer values or tensor of 32-bit signless integer values or tensor of stirng type values +`Y` | tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Z` | memref of any type values or tensor of any type values +`Z` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 64-bit signless integer values or tensor of 32-bit signless integer values or tensor of stirng type values ### `onnx.Asin` (ONNXAsinOp) @@ -184,13 +184,13 @@ ONNX Asin operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Asinh` (ONNXAsinhOp) @@ -202,13 +202,13 @@ ONNX Asinh operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Atan` (ONNXAtanOp) @@ -220,13 +220,13 @@ ONNX Atan operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Atanh` (ONNXAtanhOp) @@ -238,13 +238,13 @@ ONNX Atanh operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.AveragePool` (ONNXAveragePoolOp) @@ -295,13 +295,13 @@ ONNX AveragePool operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.BatchNormalization` (ONNXBatchNormalizationOp) @@ -329,21 +329,21 @@ ONNX BatchNormalization operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`scale` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`B` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`mean` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`var` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`scale` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`B` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`mean` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`var` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`out_mean` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type -`out_var` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type -`saved_mean` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type -`saved_var` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`out_mean` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type +`out_var` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type +`saved_mean` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type or none type +`saved_var` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type or none type or none type ### `onnx.BatchNormalizationTestMode` (ONNXBatchNormalizationTestModeOp) @@ -399,13 +399,13 @@ ONNX Binarizer operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values or memref of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values +`X` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 64-bit signless integer values or tensor of 32-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values or memref of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values +`Y` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 64-bit signless integer values or tensor of 32-bit signless integer values ### `onnx.BitShift` (ONNXBitShiftOp) @@ -434,14 +434,14 @@ ONNX BitShift operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer values -`Y` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer values +`X` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values +`Y` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values #### Results: | Result | Description | | :----: | ----------- | -`Z` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer values +`Z` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values ### `onnx.CastMap` (ONNXCastMapOp) @@ -463,13 +463,13 @@ ONNX CastMap operation | Operand | Description | | :-----: | ----------- | -`X` | tuple with any combination of tensor of 64-bit signless integer values values or memref of 64-bit signless integer values +`X` | tuple with any combination of 64-bit signless integer or stirng type values or tuple with any combination of 64-bit signless integer or 32-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values +`Y` | tensor of stirng type values or tensor of 32-bit float values or tensor of 64-bit signless integer values ### `onnx.Cast` (ONNXCastOp) @@ -505,13 +505,13 @@ ONNX Cast operation | Operand | Description | | :-----: | ----------- | -`input` | memref of any type values or tensor of any type values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 1-bit signless integer values or tensor of stirng type values #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 1-bit signless integer values or tensor of stirng type values ### `onnx.CategoryMapper` (ONNXCategoryMapperOp) @@ -539,13 +539,13 @@ ONNX CategoryMapper operation | Operand | Description | | :-----: | ----------- | -`X` | memref of any type values or tensor of any type values +`X` | tensor of stirng type values or tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values +`Y` | tensor of stirng type values or tensor of 64-bit signless integer values ### `onnx.Ceil` (ONNXCeilOp) @@ -559,13 +559,13 @@ ONNX Ceil operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Clip` (ONNXClipOp) @@ -579,15 +579,15 @@ ONNX Clip operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`min` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type -`max` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`min` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type +`max` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type ### `onnx.Compress` (ONNXCompressOp) @@ -608,14 +608,14 @@ ONNX Compress operation | Operand | Description | | :-----: | ----------- | -`input` | memref of any type values or tensor of any type values -`condition` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values +`input` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`condition` | tensor of 1-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.ConcatFromSequence` (ONNXConcatFromSequenceOp) @@ -637,13 +637,13 @@ ONNX ConcatFromSequence operation | Operand | Description | | :-----: | ----------- | -`input_sequence` | memref of any type values or tensor of tensor of any type values values +`input_sequence` | tensor of tensor of 8-bit unsigned integer values values or tensor of tensor of 16-bit unsigned integer values values or tensor of tensor of 32-bit unsigned integer values values or tensor of tensor of 64-bit unsigned integer values values or tensor of tensor of 8-bit signless integer values values or tensor of tensor of 16-bit signless integer values values or tensor of tensor of 32-bit signless integer values values or tensor of tensor of 64-bit signless integer values values or tensor of tensor of 16-bit float values values or tensor of tensor of 32-bit float values values or tensor of tensor of 64-bit float values values or tensor of tensor of stirng type values values or tensor of tensor of 1-bit signless integer values values or tensor of tensor of complex type with 32-bit float elements values values or tensor of tensor of complex type with 64-bit float elements values values #### Results: | Result | Description | | :----: | ----------- | -`concat_result` | memref of any type values or tensor of any type values +`concat_result` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.Concat` (ONNXConcatOp) @@ -661,13 +661,13 @@ ONNX Concat operation | Operand | Description | | :-----: | ----------- | -`inputs` | memref of any type values or tensor of any type values +`inputs` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`concat_result` | memref of any type values or tensor of any type values +`concat_result` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.ConstantOfShape` (ONNXConstantOfShapeOp) @@ -685,13 +685,13 @@ ONNX ConstantOfShape operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 64-bit signless integer values or memref of 64-bit signless integer values +`input` | tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 1-bit signless integer values or memref of 16-bit float or 32-bit float or 64-bit float or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 1-bit signless integer values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 1-bit signless integer values ### `onnx.Constant` (ONNXConstantOp) @@ -711,7 +711,7 @@ ONNX Constant operation | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.ConvInteger` (ONNXConvIntegerOp) @@ -735,16 +735,16 @@ ONNX ConvInteger operation | Operand | Description | | :-----: | ----------- | -`x` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values -`w` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values -`x_zero_point` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values or none type -`w_zero_point` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values or none type +`x` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values +`w` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values +`x_zero_point` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values or none type +`w_zero_point` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values or none type #### Results: | Result | Description | | :----: | ----------- | -`y` | tensor of 32-bit signless integer values or memref of 32-bit signless integer values +`y` | tensor of 32-bit signless integer values ### `onnx.Conv` (ONNXConvOp) @@ -768,15 +768,15 @@ ONNX Conv operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`W` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`B` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`W` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`B` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type ### `onnx.ConvTranspose` (ONNXConvTransposeOp) @@ -814,15 +814,15 @@ ONNX ConvTranspose operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`W` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`B` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`W` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`B` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type ### `onnx.Cos` (ONNXCosOp) @@ -834,13 +834,13 @@ ONNX Cos operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Cosh` (ONNXCoshOp) @@ -852,13 +852,13 @@ ONNX Cosh operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.CumSum` (ONNXCumSumOp) @@ -896,14 +896,14 @@ ONNX CumSum operation | Operand | Description | | :-----: | ----------- | -`x` | tensor of 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float values -`axis` | tensor of 32-bit signless integer or 64-bit signless integer values or memref of 32-bit signless integer or 64-bit signless integer values +`x` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 32-bit float values or tensor of 64-bit float values +`axis` | tensor of 32-bit signless integer values or tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`y` | tensor of 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float values +`y` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.DepthToSpace` (ONNXDepthToSpaceOp) @@ -948,13 +948,13 @@ ONNX DepthToSpace operation | Operand | Description | | :-----: | ----------- | -`input` | memref of any type values or tensor of any type values +`input` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.DequantizeLinear` (ONNXDequantizeLinearOp) @@ -969,15 +969,15 @@ ONNX DequantizeLinear operation | Operand | Description | | :-----: | ----------- | -`x` | tensor of 8-bit signless integer or 32-bit signless integer values or memref of 8-bit signless integer or 32-bit signless integer values -`x_scale` | memref of any type values or tensor of any type values -`x_zero_point` | tensor of 8-bit signless integer or 32-bit signless integer values or memref of 8-bit signless integer or 32-bit signless integer values or none type +`x` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values or tensor of 32-bit signless integer values +`x_scale` | tensor of 32-bit float values +`x_zero_point` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values or tensor of 32-bit signless integer values or none type #### Results: | Result | Description | | :----: | ----------- | -`y` | memref of any type values or tensor of any type values +`y` | tensor of 32-bit float values ### `onnx.Det` (ONNXDetOp) @@ -993,13 +993,13 @@ ONNX Det operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.DictVectorizer` (ONNXDictVectorizerOp) @@ -1029,13 +1029,13 @@ ONNX DictVectorizer operation | Operand | Description | | :-----: | ----------- | -`X` | tuple with any combination of tensor of 64-bit signless integer or 32-bit float or 64-bit float values values or memref of 64-bit signless integer or 32-bit float or 64-bit float values +`X` | tuple with any combination of stirng type or 64-bit signless integer values or tuple with any combination of 64-bit signless integer or stirng type values or tuple with any combination of 64-bit signless integer or 32-bit float values or tuple with any combination of 64-bit signless integer or 64-bit float values or tuple with any combination of stirng type or 32-bit float values or tuple with any combination of stirng type or 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values +`Y` | tensor of 64-bit signless integer values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values ### `onnx.Div` (ONNXDivOp) @@ -1049,14 +1049,14 @@ ONNX Div operation | Operand | Description | | :-----: | ----------- | -`A` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values -`B` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`A` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`B` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`C` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`C` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Dropout` (ONNXDropoutOp) @@ -1079,14 +1079,14 @@ ONNX Dropout operation | Operand | Description | | :-----: | ----------- | -`data` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`data` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`mask` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values or none type +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`mask` | tensor of 1-bit signless integer values or none type ### `onnx.DynamicQuantizeLinear` (ONNXDynamicQuantizeLinearOp) @@ -1119,15 +1119,15 @@ ONNX DynamicQuantizeLinear operation | Operand | Description | | :-----: | ----------- | -`x` | tensor of 32-bit float values or memref of 32-bit float values +`x` | tensor of 32-bit float values #### Results: | Result | Description | | :----: | ----------- | -`y` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values -`y_scale` | memref of any type values or tensor of any type values -`y_zero_point` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values +`y` | tensor of 8-bit unsigned integer values +`y_scale` | tensor of 32-bit float values +`y_zero_point` | tensor of 8-bit unsigned integer values ### `onnx.Elu` (ONNXEluOp) @@ -1148,13 +1148,13 @@ ONNX Elu operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.EntryPoint` (ONNXEntryPointOp) @@ -1175,14 +1175,14 @@ ONNX Equal operation | Operand | Description | | :-----: | ----------- | -`A` | tensor of 1-bit signless integer or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 1-bit signless integer or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values -`B` | tensor of 1-bit signless integer or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 1-bit signless integer or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`A` | tensor of 1-bit signless integer values or tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`B` | tensor of 1-bit signless integer values or tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`C` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values +`C` | tensor of 1-bit signless integer values ### `onnx.Erf` (ONNXErfOp) @@ -1194,13 +1194,13 @@ ONNX Erf operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Exp` (ONNXExpOp) @@ -1212,13 +1212,13 @@ ONNX Exp operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Expand` (ONNXExpandOp) @@ -1237,14 +1237,14 @@ ONNX Expand operation | Operand | Description | | :-----: | ----------- | -`input` | memref of any type values or tensor of any type values -`shape` | memref of any type values or tensor of any type values +`input` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`shape` | tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.EyeLike` (ONNXEyeLikeOp) @@ -1269,13 +1269,13 @@ ONNX EyeLike operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 1-bit signless integer values or memref of 16-bit float or 32-bit float or 64-bit float or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 1-bit signless integer values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 1-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 1-bit signless integer values or memref of 16-bit float or 32-bit float or 64-bit float or 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 1-bit signless integer values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 1-bit signless integer values ### `onnx.FeatureVectorizer` (ONNXFeatureVectorizerOp) @@ -1296,13 +1296,13 @@ ONNX FeatureVectorizer operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 32-bit float or 64-bit float values +`X` | tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values +`Y` | tensor of 32-bit float values ### `onnx.Flatten` (ONNXFlattenOp) @@ -1322,13 +1322,13 @@ ONNX Flatten operation | Operand | Description | | :-----: | ----------- | -`input` | memref of any type values or tensor of any type values +`input` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.Floor` (ONNXFloorOp) @@ -1342,13 +1342,13 @@ ONNX Floor operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.GRU` (ONNXGRUOp) @@ -1444,19 +1444,19 @@ ONNX GRU operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`W` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`R` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`B` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type -`sequence_lens` | tensor of 32-bit signless integer values or memref of 32-bit signless integer values or none type -`initial_h` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`W` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`R` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`B` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type +`sequence_lens` | tensor of 32-bit signless integer values or none type +`initial_h` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type -`Y_h` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type or none type +`Y_h` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type or none type or none type ### `onnx.GatherElements` (ONNXGatherElementsOp) @@ -1528,14 +1528,14 @@ ONNX GatherElements operation | Operand | Description | | :-----: | ----------- | -`data` | memref of any type values or tensor of any type values -`indices` | tensor of 32-bit signless integer or 64-bit signless integer values or memref of 32-bit signless integer or 64-bit signless integer values +`data` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`indices` | tensor of 32-bit signless integer values or tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.GatherND` (ONNXGatherNDOp) @@ -1611,14 +1611,14 @@ ONNX GatherND operation | Operand | Description | | :-----: | ----------- | -`data` | memref of any type values or tensor of any type values -`indices` | memref of any type values or tensor of any type values +`data` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`indices` | tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.Gather` (ONNXGatherOp) @@ -1692,14 +1692,14 @@ ONNX Gather operation | Operand | Description | | :-----: | ----------- | -`data` | memref of any type values or tensor of any type values -`indices` | tensor of 32-bit signless integer or 64-bit signless integer values or memref of 32-bit signless integer or 64-bit signless integer values +`data` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`indices` | tensor of 32-bit signless integer values or tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.Gemm` (ONNXGemmOp) @@ -1732,15 +1732,15 @@ ONNX Gemm operation | Operand | Description | | :-----: | ----------- | -`A` | tensor of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values or memref of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values -`B` | tensor of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values or memref of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values -`C` | tensor of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values or memref of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values or none type +`A` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values +`B` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values +`C` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or none type #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values or memref of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or none type ### `onnx.GlobalAveragePool` (ONNXGlobalAveragePoolOp) @@ -1754,13 +1754,13 @@ ONNX GlobalAveragePool operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.GlobalLpPool` (ONNXGlobalLpPoolOp) @@ -1780,13 +1780,13 @@ ONNX GlobalLpPool operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.GlobalMaxPool` (ONNXGlobalMaxPoolOp) @@ -1800,13 +1800,13 @@ ONNX GlobalMaxPool operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Greater` (ONNXGreaterOp) @@ -1821,14 +1821,14 @@ ONNX Greater operation | Operand | Description | | :-----: | ----------- | -`A` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values -`B` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`A` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`B` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`C` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values +`C` | tensor of 1-bit signless integer values ### `onnx.HardSigmoid` (ONNXHardSigmoidOp) @@ -1849,13 +1849,13 @@ ONNX HardSigmoid operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Hardmax` (ONNXHardmaxOp) @@ -1886,13 +1886,13 @@ ONNX Hardmax operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Identity` (ONNXIdentityOp) @@ -1904,13 +1904,13 @@ ONNX Identity operation | Operand | Description | | :-----: | ----------- | -`input` | memref of any type values or tensor of any type values +`input` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.If` (ONNXIfOp) @@ -1929,13 +1929,13 @@ ONNX If operation | Operand | Description | | :-----: | ----------- | -`cond` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values +`cond` | tensor of 1-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`outputs` | memref of any type values or tensor of any type values +`outputs` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.Imputer` (ONNXImputerOp) @@ -1963,13 +1963,13 @@ ONNX Imputer operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values or memref of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values +`X` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 64-bit signless integer values or tensor of 32-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values or memref of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values +`Y` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 64-bit signless integer values or tensor of 32-bit signless integer values ### `onnx.InstanceNormalization` (ONNXInstanceNormalizationOp) @@ -1992,15 +1992,15 @@ ONNX InstanceNormalization operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`scale` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`B` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`scale` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`B` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.IsInf` (ONNXIsInfOp) @@ -2019,13 +2019,13 @@ ONNX IsInf operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 32-bit float or 64-bit float values or memref of 32-bit float or 64-bit float values +`X` | tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values +`Y` | tensor of 1-bit signless integer values ### `onnx.IsNaN` (ONNXIsNaNOp) @@ -2037,13 +2037,13 @@ ONNX IsNaN operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values +`Y` | tensor of 1-bit signless integer values ### `onnx.LRN` (ONNXLRNOp) @@ -2073,13 +2073,13 @@ ONNX LRN operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.LSTM` (ONNXLSTMOp) @@ -2183,22 +2183,22 @@ ONNX LSTM operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`W` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`R` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`B` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type -`sequence_lens` | tensor of 32-bit signless integer values or memref of 32-bit signless integer values or none type -`initial_h` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type -`initial_c` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type -`P` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`W` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`R` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`B` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type +`sequence_lens` | tensor of 32-bit signless integer values or none type +`initial_h` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type +`initial_c` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type or none type +`P` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type or none type or none type #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type -`Y_h` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type -`Y_c` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type or none type or none type or none type +`Y_h` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type or none type or none type or none type or none type +`Y_c` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type or none type or none type or none type or none type or none type ### `onnx.LabelEncoder` (ONNXLabelEncoderOp) @@ -2240,13 +2240,13 @@ ONNX LabelEncoder operation | Operand | Description | | :-----: | ----------- | -`X` | memref of any type values or tensor of any type values +`X` | tensor of stirng type values or tensor of 64-bit signless integer values or tensor of 32-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values +`Y` | tensor of stirng type values or tensor of 64-bit signless integer values or tensor of 32-bit float values ### `onnx.LeakyRelu` (ONNXLeakyReluOp) @@ -2266,13 +2266,13 @@ ONNX LeakyRelu operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Less` (ONNXLessOp) @@ -2287,14 +2287,14 @@ ONNX Less operation | Operand | Description | | :-----: | ----------- | -`A` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values -`B` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`A` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`B` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`C` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values +`C` | tensor of 1-bit signless integer values ### `onnx.LinearClassifier` (ONNXLinearClassifierOp) @@ -2317,14 +2317,14 @@ ONNX LinearClassifier operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values or memref of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values +`X` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 64-bit signless integer values or tensor of 32-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values -`Z` | memref of any type values or tensor of any type values +`Y` | tensor of stirng type values or tensor of 64-bit signless integer values +`Z` | tensor of 32-bit float values ### `onnx.LinearRegressor` (ONNXLinearRegressorOp) @@ -2350,13 +2350,13 @@ ONNX LinearRegressor operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values or memref of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values +`X` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 64-bit signless integer values or tensor of 32-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values +`Y` | tensor of 32-bit float values ### `onnx.Log` (ONNXLogOp) @@ -2368,13 +2368,13 @@ ONNX Log operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.LogSoftmax` (ONNXLogSoftmaxOp) @@ -2405,13 +2405,13 @@ ONNX LogSoftmax operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Loop` (ONNXLoopOp) @@ -2541,15 +2541,15 @@ ONNX Loop operation | Operand | Description | | :-----: | ----------- | -`M` | tensor of 64-bit signless integer values or memref of 64-bit signless integer values or none type -`cond` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values or none type -`v_initial` | memref of any type values or tensor of any type values +`M` | tensor of 64-bit signless integer values or none type +`cond` | tensor of 1-bit signless integer values or none type +`v_initial` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`v_final_and_scan_outputs` | memref of any type values or tensor of any type values +`v_final_and_scan_outputs` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.LpNormalization` (ONNXLpNormalizationOp) @@ -2568,13 +2568,13 @@ ONNX LpNormalization operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.LpPool` (ONNXLpPoolOp) @@ -2600,13 +2600,13 @@ ONNX LpPool operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.MatMulInteger` (ONNXMatMulIntegerOp) @@ -2619,16 +2619,16 @@ ONNX MatMulInteger operation | Operand | Description | | :-----: | ----------- | -`A` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values -`B` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values -`a_zero_point` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values or none type -`b_zero_point` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values or none type +`A` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values +`B` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values +`a_zero_point` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values or none type +`b_zero_point` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values or none type #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 32-bit signless integer values or memref of 32-bit signless integer values +`Y` | tensor of 32-bit signless integer values ### `onnx.MatMul` (ONNXMatMulOp) @@ -2640,14 +2640,14 @@ ONNX MatMul operation | Operand | Description | | :-----: | ----------- | -`A` | tensor of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values or memref of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values -`B` | tensor of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values or memref of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values +`A` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values +`B` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values or memref of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values ### `onnx.Max` (ONNXMaxOp) @@ -2661,13 +2661,13 @@ ONNX Max operation | Operand | Description | | :-----: | ----------- | -`data_0` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`data_0` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`max` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`max` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.MaxPool` (ONNXMaxPoolOp) @@ -2719,14 +2719,14 @@ ONNX MaxPool operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`Indices` | tensor of 64-bit signless integer values or memref of 64-bit signless integer values or none type +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`Indices` | tensor of 64-bit signless integer values or none type ### `onnx.MaxPoolSingleOut` (ONNXMaxPoolSingleOutOp) @@ -2778,14 +2778,14 @@ ONNX MaxRoiPool operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`rois` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`rois` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.MaxUnpool` (ONNXMaxUnpoolOp) @@ -2822,15 +2822,15 @@ ONNX MaxUnpool operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`I` | tensor of 64-bit signless integer values or memref of 64-bit signless integer values -`output_shape` | tensor of 64-bit signless integer values or memref of 64-bit signless integer values or none type +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`I` | tensor of 64-bit signless integer values +`output_shape` | tensor of 64-bit signless integer values or none type #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Mean` (ONNXMeanOp) @@ -2844,13 +2844,13 @@ ONNX Mean operation | Operand | Description | | :-----: | ----------- | -`data_0` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`data_0` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`mean` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`mean` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.MeanVarianceNormalization` (ONNXMeanVarianceNormalizationOp) @@ -2869,13 +2869,13 @@ ONNX MeanVarianceNormalization operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Min` (ONNXMinOp) @@ -2889,13 +2889,13 @@ ONNX Min operation | Operand | Description | | :-----: | ----------- | -`data_0` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`data_0` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`min` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`min` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Mod` (ONNXModOp) @@ -2925,14 +2925,14 @@ ONNX Mod operation | Operand | Description | | :-----: | ----------- | -`A` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values -`B` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`A` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`B` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`C` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`C` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Mul` (ONNXMulOp) @@ -2946,14 +2946,14 @@ ONNX Mul operation | Operand | Description | | :-----: | ----------- | -`A` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values -`B` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`A` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`B` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`C` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`C` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Multinomial` (ONNXMultinomialOp) @@ -2974,13 +2974,13 @@ ONNX Multinomial operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 32-bit signless integer or 64-bit signless integer values or memref of 32-bit signless integer or 64-bit signless integer values +`output` | tensor of 32-bit signless integer values or tensor of 64-bit signless integer values ### `onnx.Neg` (ONNXNegOp) @@ -2994,13 +2994,13 @@ ONNX Neg operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 32-bit float or 32-bit signless integer or 8-bit signless integer or 16-bit signless integer or 64-bit signless integer or 16-bit float or 64-bit float values or memref of 32-bit float or 32-bit signless integer or 8-bit signless integer or 16-bit signless integer or 64-bit signless integer or 16-bit float or 64-bit float values +`X` | tensor of 32-bit float values or tensor of 32-bit signless integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 32-bit float or 32-bit signless integer or 8-bit signless integer or 16-bit signless integer or 64-bit signless integer or 16-bit float or 64-bit float values or memref of 32-bit float or 32-bit signless integer or 8-bit signless integer or 16-bit signless integer or 64-bit signless integer or 16-bit float or 64-bit float values +`Y` | tensor of 32-bit float values or tensor of 32-bit signless integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 64-bit float values ### `onnx.NonMaxSuppression` (ONNXNonMaxSuppressionOp) @@ -3024,17 +3024,17 @@ ONNX NonMaxSuppression operation | Operand | Description | | :-----: | ----------- | -`boxes` | memref of any type values or tensor of any type values -`scores` | memref of any type values or tensor of any type values -`max_output_boxes_per_class` | memref of any type values or tensor of any type values or none type -`iou_threshold` | memref of any type values or tensor of any type values or none type -`score_threshold` | memref of any type values or tensor of any type values or none type +`boxes` | tensor of 32-bit float values +`scores` | tensor of 32-bit float values +`max_output_boxes_per_class` | tensor of 64-bit signless integer values or none type +`iou_threshold` | tensor of 32-bit float values or none type +`score_threshold` | tensor of 32-bit float values or none type #### Results: | Result | Description | | :----: | ----------- | -`selected_indices` | memref of any type values or tensor of any type values +`selected_indices` | tensor of 64-bit signless integer values ### `onnx.NonZero` (ONNXNonZeroOp) @@ -3049,13 +3049,13 @@ ONNX NonZero operation | Operand | Description | | :-----: | ----------- | -`X` | memref of any type values or tensor of any type values +`X` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values +`Y` | tensor of 64-bit signless integer values ### `onnx.Normalizer` (ONNXNormalizerOp) @@ -3082,13 +3082,13 @@ ONNX Normalizer operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values or memref of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values +`X` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 64-bit signless integer values or tensor of 32-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values +`Y` | tensor of 32-bit float values ### `onnx.Not` (ONNXNotOp) @@ -3100,13 +3100,13 @@ ONNX Not operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values +`X` | tensor of 1-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values +`Y` | tensor of 1-bit signless integer values ### `onnx.OneHotEncoder` (ONNXOneHotEncoderOp) @@ -3133,13 +3133,13 @@ ONNX OneHotEncoder operation | Operand | Description | | :-----: | ----------- | -`X` | memref of any type values or tensor of any type values +`X` | tensor of stirng type values or tensor of 64-bit signless integer values or tensor of 32-bit signless integer values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values +`Y` | tensor of 32-bit float values ### `onnx.OneHot` (ONNXOneHotOp) @@ -3175,15 +3175,15 @@ ONNX OneHot operation | Operand | Description | | :-----: | ----------- | -`indices` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values -`depth` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values -`values` | memref of any type values or tensor of any type values +`indices` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`depth` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`values` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.Or` (ONNXOrOp) @@ -3198,14 +3198,14 @@ ONNX Or operation | Operand | Description | | :-----: | ----------- | -`A` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values -`B` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values +`A` | tensor of 1-bit signless integer values +`B` | tensor of 1-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`C` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values +`C` | tensor of 1-bit signless integer values ### `onnx.PRelu` (ONNXPReluOp) @@ -3220,14 +3220,14 @@ ONNX PRelu operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values or memref of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values -`slope` | tensor of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values or memref of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values +`slope` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values or memref of 16-bit float or 32-bit float or 64-bit float or 32-bit signless integer or 64-bit signless integer values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values ### `onnx.PadConstantPad` (ONNXPadConstantPadOp) @@ -3411,15 +3411,15 @@ ONNX Pad operation | Operand | Description | | :-----: | ----------- | -`data` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values -`pads` | memref of any type values or tensor of any type values or none type -`constant_value` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or none type +`data` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`pads` | tensor of 64-bit signless integer values or none type +`constant_value` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type ### `onnx.Pow` (ONNXPowOp) @@ -3434,14 +3434,14 @@ ONNX Pow operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Z` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Z` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.QLinearConv` (ONNXQLinearConvOp) @@ -3468,21 +3468,21 @@ ONNX QLinearConv operation | Operand | Description | | :-----: | ----------- | -`x` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values -`x_scale` | memref of any type values or tensor of any type values -`x_zero_point` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values -`w` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values -`w_scale` | memref of any type values or tensor of any type values -`w_zero_point` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values -`y_scale` | memref of any type values or tensor of any type values -`y_zero_point` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values -`B` | tensor of 32-bit signless integer values or memref of 32-bit signless integer values or none type +`x` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values +`x_scale` | tensor of 32-bit float values +`x_zero_point` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values +`w` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values +`w_scale` | tensor of 32-bit float values +`w_zero_point` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values +`y_scale` | tensor of 32-bit float values +`y_zero_point` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values +`B` | tensor of 32-bit signless integer values or none type #### Results: | Result | Description | | :----: | ----------- | -`y` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values +`y` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values ### `onnx.QLinearMatMul` (ONNXQLinearMatMulOp) @@ -3501,20 +3501,20 @@ ONNX QLinearMatMul operation | Operand | Description | | :-----: | ----------- | -`a` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values -`a_scale` | memref of any type values or tensor of any type values -`a_zero_point` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values -`b` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values -`b_scale` | memref of any type values or tensor of any type values -`b_zero_point` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values -`y_scale` | memref of any type values or tensor of any type values -`y_zero_point` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values +`a` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values +`a_scale` | tensor of 32-bit float values +`a_zero_point` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values +`b` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values +`b_scale` | tensor of 32-bit float values +`b_zero_point` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values +`y_scale` | tensor of 32-bit float values +`y_zero_point` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values #### Results: | Result | Description | | :----: | ----------- | -`y` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values +`y` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values ### `onnx.QuantizeLinear` (ONNXQuantizeLinearOp) @@ -3528,15 +3528,15 @@ ONNX QuantizeLinear operation | Operand | Description | | :-----: | ----------- | -`x` | tensor of 32-bit float or 32-bit signless integer values or memref of 32-bit float or 32-bit signless integer values -`y_scale` | memref of any type values or tensor of any type values -`y_zero_point` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values or none type +`x` | tensor of 32-bit float values or tensor of 32-bit signless integer values +`y_scale` | tensor of 32-bit float values +`y_zero_point` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values or none type #### Results: | Result | Description | | :----: | ----------- | -`y` | tensor of 8-bit signless integer values or memref of 8-bit signless integer values +`y` | tensor of 8-bit signless integer values or tensor of 8-bit unsigned integer values or none type ### `onnx.RNN` (ONNXRNNOp) @@ -3619,19 +3619,19 @@ ONNX RNN operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`W` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`R` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`B` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type -`sequence_lens` | tensor of 32-bit signless integer values or memref of 32-bit signless integer values or none type -`initial_h` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`W` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`R` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`B` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type +`sequence_lens` | tensor of 32-bit signless integer values or none type +`initial_h` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type -`Y_h` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values or none type +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type or none type +`Y_h` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or none type or none type or none type or none type ### `onnx.RandomNormalLike` (ONNXRandomNormalLikeOp) @@ -3658,13 +3658,13 @@ ONNX RandomNormalLike operation | Operand | Description | | :-----: | ----------- | -`input` | memref of any type values or tensor of any type values +`input` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.RandomNormal` (ONNXRandomNormalOp) @@ -3692,7 +3692,7 @@ ONNX RandomNormal operation | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.RandomUniformLike` (ONNXRandomUniformLikeOp) @@ -3719,13 +3719,13 @@ ONNX RandomUniformLike operation | Operand | Description | | :-----: | ----------- | -`input` | memref of any type values or tensor of any type values +`input` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.RandomUniform` (ONNXRandomUniformOp) @@ -3752,7 +3752,7 @@ ONNX RandomUniform operation | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Range` (ONNXRangeOp) @@ -3788,15 +3788,15 @@ ONNX Range operation | Operand | Description | | :-----: | ----------- | -`start` | tensor of 32-bit float or 64-bit float or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer values or memref of 32-bit float or 64-bit float or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer values -`limit` | tensor of 32-bit float or 64-bit float or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer values or memref of 32-bit float or 64-bit float or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer values -`delta` | tensor of 32-bit float or 64-bit float or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer values or memref of 32-bit float or 64-bit float or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer values +`start` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values +`limit` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values +`delta` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 32-bit float or 64-bit float or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer values or memref of 32-bit float or 64-bit float or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer values +`output` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values ### `onnx.Reciprocal` (ONNXReciprocalOp) @@ -3810,13 +3810,13 @@ ONNX Reciprocal operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.ReduceL1` (ONNXReduceL1Op) @@ -3840,13 +3840,13 @@ ONNX ReduceL1 operation | Operand | Description | | :-----: | ----------- | -`data` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`data` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`reduced` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`reduced` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.ReduceL2` (ONNXReduceL2Op) @@ -3870,13 +3870,13 @@ ONNX ReduceL2 operation | Operand | Description | | :-----: | ----------- | -`data` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`data` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`reduced` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`reduced` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.ReduceLogSumExp` (ONNXReduceLogSumExpOp) @@ -3900,13 +3900,13 @@ ONNX ReduceLogSumExp operation | Operand | Description | | :-----: | ----------- | -`data` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`data` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`reduced` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`reduced` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.ReduceLogSum` (ONNXReduceLogSumOp) @@ -3930,13 +3930,13 @@ ONNX ReduceLogSum operation | Operand | Description | | :-----: | ----------- | -`data` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`data` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`reduced` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`reduced` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.ReduceMax` (ONNXReduceMaxOp) @@ -3960,13 +3960,13 @@ ONNX ReduceMax operation | Operand | Description | | :-----: | ----------- | -`data` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`data` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`reduced` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`reduced` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.ReduceMean` (ONNXReduceMeanOp) @@ -3990,13 +3990,13 @@ ONNX ReduceMean operation | Operand | Description | | :-----: | ----------- | -`data` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`data` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`reduced` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`reduced` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.ReduceMin` (ONNXReduceMinOp) @@ -4020,13 +4020,13 @@ ONNX ReduceMin operation | Operand | Description | | :-----: | ----------- | -`data` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`data` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`reduced` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`reduced` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.ReduceProd` (ONNXReduceProdOp) @@ -4050,13 +4050,13 @@ ONNX ReduceProd operation | Operand | Description | | :-----: | ----------- | -`data` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`data` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`reduced` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`reduced` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.ReduceSum` (ONNXReduceSumOp) @@ -4080,13 +4080,13 @@ ONNX ReduceSum operation | Operand | Description | | :-----: | ----------- | -`data` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`data` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`reduced` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`reduced` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.ReduceSumSquare` (ONNXReduceSumSquareOp) @@ -4110,13 +4110,13 @@ ONNX ReduceSumSquare operation | Operand | Description | | :-----: | ----------- | -`data` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`data` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`reduced` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`reduced` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Relu` (ONNXReluOp) @@ -4130,13 +4130,13 @@ ONNX Relu operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Reshape` (ONNXReshapeOp) @@ -4153,14 +4153,14 @@ ONNX Reshape operation | Operand | Description | | :-----: | ----------- | -`data` | memref of any type values or tensor of any type values -`shape` | memref of any type values or tensor of any type values or none type +`data` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`shape` | tensor of 64-bit signless integer values or none type #### Results: | Result | Description | | :----: | ----------- | -`reshaped` | memref of any type values or tensor of any type values +`reshaped` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.Resize` (ONNXResizeOp) @@ -4185,16 +4185,16 @@ ONNX Resize operation | Operand | Description | | :-----: | ----------- | -`X` | memref of any type values or tensor of any type values -`roi` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`scales` | memref of any type values or tensor of any type values -`sizes` | memref of any type values or tensor of any type values or none type +`X` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`roi` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`scales` | tensor of 32-bit float values +`sizes` | tensor of 64-bit signless integer values or none type #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values +`Y` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.ReverseSequence` (ONNXReverseSequenceOp) @@ -4245,14 +4245,14 @@ ONNX ReverseSequence operation | Operand | Description | | :-----: | ----------- | -`input` | memref of any type values or tensor of any type values -`sequence_lens` | memref of any type values or tensor of any type values +`input` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`sequence_lens` | tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values +`Y` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.RoiAlign` (ONNXRoiAlignOp) @@ -4284,15 +4284,15 @@ ONNX RoiAlign operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`rois` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values -`batch_indices` | tensor of 64-bit signless integer values or memref of 64-bit signless integer values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`rois` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`batch_indices` | tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Round` (ONNXRoundOp) @@ -4316,13 +4316,13 @@ ONNX Round operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.SVMClassifier` (ONNXSVMClassifierOp) @@ -4350,14 +4350,14 @@ ONNX SVMClassifier operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values or memref of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values +`X` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 64-bit signless integer values or tensor of 32-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values -`Z` | memref of any type values or tensor of any type values +`Y` | tensor of stirng type values or tensor of 64-bit signless integer values +`Z` | tensor of 32-bit float values ### `onnx.SVMRegressor` (ONNXSVMRegressorOp) @@ -4382,13 +4382,13 @@ ONNX SVMRegressor operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values or memref of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values +`X` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 64-bit signless integer values or tensor of 32-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values +`Y` | tensor of 32-bit float values ### `onnx.Scaler` (ONNXScalerOp) @@ -4407,13 +4407,13 @@ ONNX Scaler operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values or memref of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values +`X` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 64-bit signless integer values or tensor of 32-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values +`Y` | tensor of 32-bit float values ### `onnx.Scan` (ONNXScanOp) @@ -4556,13 +4556,13 @@ ONNX Scan operation | Operand | Description | | :-----: | ----------- | -`initial_state_and_scan_inputs` | memref of any type values or tensor of any type values +`initial_state_and_scan_inputs` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`final_state_and_scan_outputs` | memref of any type values or tensor of any type values +`final_state_and_scan_outputs` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.ScatterElements` (ONNXScatterElementsOp) @@ -4630,15 +4630,15 @@ ONNX ScatterElements operation | Operand | Description | | :-----: | ----------- | -`data` | memref of any type values or tensor of any type values -`indices` | tensor of 32-bit signless integer or 64-bit signless integer values or memref of 32-bit signless integer or 64-bit signless integer values -`updates` | memref of any type values or tensor of any type values +`data` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`indices` | tensor of 32-bit signless integer values or tensor of 64-bit signless integer values +`updates` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.ScatterND` (ONNXScatterNDOp) @@ -4705,15 +4705,15 @@ ONNX ScatterND operation | Operand | Description | | :-----: | ----------- | -`data` | memref of any type values or tensor of any type values -`indices` | memref of any type values or tensor of any type values -`updates` | memref of any type values or tensor of any type values +`data` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`indices` | tensor of 64-bit signless integer values +`updates` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.Scatter` (ONNXScatterOp) @@ -4783,15 +4783,15 @@ ONNX Scatter operation | Operand | Description | | :-----: | ----------- | -`data` | memref of any type values or tensor of any type values -`indices` | tensor of 32-bit signless integer or 64-bit signless integer values or memref of 32-bit signless integer or 64-bit signless integer values -`updates` | memref of any type values or tensor of any type values +`data` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`indices` | tensor of 32-bit signless integer values or tensor of 64-bit signless integer values +`updates` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.Selu` (ONNXSeluOp) @@ -4813,13 +4813,13 @@ ONNX Selu operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.SequenceAt` (ONNXSequenceAtOp) @@ -4833,14 +4833,14 @@ ONNX SequenceAt operation | Operand | Description | | :-----: | ----------- | -`input_sequence` | memref of any type values or tensor of tensor of any type values values -`position` | tensor of 32-bit signless integer or 64-bit signless integer values or memref of 32-bit signless integer or 64-bit signless integer values +`input_sequence` | tensor of tensor of 8-bit unsigned integer values values or tensor of tensor of 16-bit unsigned integer values values or tensor of tensor of 32-bit unsigned integer values values or tensor of tensor of 64-bit unsigned integer values values or tensor of tensor of 8-bit signless integer values values or tensor of tensor of 16-bit signless integer values values or tensor of tensor of 32-bit signless integer values values or tensor of tensor of 64-bit signless integer values values or tensor of tensor of 16-bit float values values or tensor of tensor of 32-bit float values values or tensor of tensor of 64-bit float values values or tensor of tensor of stirng type values values or tensor of tensor of 1-bit signless integer values values or tensor of tensor of complex type with 32-bit float elements values values or tensor of tensor of complex type with 64-bit float elements values values +`position` | tensor of 32-bit signless integer values or tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`tensor` | memref of any type values or tensor of any type values +`tensor` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.SequenceConstruct` (ONNXSequenceConstructOp) @@ -4853,13 +4853,13 @@ ONNX SequenceConstruct operation | Operand | Description | | :-----: | ----------- | -`inputs` | memref of any type values or tensor of any type values +`inputs` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`output_sequence` | memref of any type values or tensor of tensor of any type values values +`output_sequence` | tensor of tensor of 8-bit unsigned integer values values or tensor of tensor of 16-bit unsigned integer values values or tensor of tensor of 32-bit unsigned integer values values or tensor of tensor of 64-bit unsigned integer values values or tensor of tensor of 8-bit signless integer values values or tensor of tensor of 16-bit signless integer values values or tensor of tensor of 32-bit signless integer values values or tensor of tensor of 64-bit signless integer values values or tensor of tensor of 16-bit float values values or tensor of tensor of 32-bit float values values or tensor of tensor of 64-bit float values values or tensor of tensor of stirng type values values or tensor of tensor of 1-bit signless integer values values or tensor of tensor of complex type with 32-bit float elements values values or tensor of tensor of complex type with 64-bit float elements values values ### `onnx.SequenceEmpty` (ONNXSequenceEmptyOp) @@ -4877,7 +4877,7 @@ ONNX SequenceEmpty operation | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of tensor of any type values values +`output` | tensor of tensor of 8-bit unsigned integer values values or tensor of tensor of 16-bit unsigned integer values values or tensor of tensor of 32-bit unsigned integer values values or tensor of tensor of 64-bit unsigned integer values values or tensor of tensor of 8-bit signless integer values values or tensor of tensor of 16-bit signless integer values values or tensor of tensor of 32-bit signless integer values values or tensor of tensor of 64-bit signless integer values values or tensor of tensor of 16-bit float values values or tensor of tensor of 32-bit float values values or tensor of tensor of 64-bit float values values or tensor of tensor of stirng type values values or tensor of tensor of 1-bit signless integer values values or tensor of tensor of complex type with 32-bit float elements values values or tensor of tensor of complex type with 64-bit float elements values values ### `onnx.SequenceErase` (ONNXSequenceEraseOp) @@ -4892,14 +4892,14 @@ ONNX SequenceErase operation | Operand | Description | | :-----: | ----------- | -`input_sequence` | memref of any type values or tensor of tensor of any type values values -`position` | tensor of 32-bit signless integer or 64-bit signless integer values or memref of 32-bit signless integer or 64-bit signless integer values or none type +`input_sequence` | tensor of tensor of 8-bit unsigned integer values values or tensor of tensor of 16-bit unsigned integer values values or tensor of tensor of 32-bit unsigned integer values values or tensor of tensor of 64-bit unsigned integer values values or tensor of tensor of 8-bit signless integer values values or tensor of tensor of 16-bit signless integer values values or tensor of tensor of 32-bit signless integer values values or tensor of tensor of 64-bit signless integer values values or tensor of tensor of 16-bit float values values or tensor of tensor of 32-bit float values values or tensor of tensor of 64-bit float values values or tensor of tensor of stirng type values values or tensor of tensor of 1-bit signless integer values values or tensor of tensor of complex type with 32-bit float elements values values or tensor of tensor of complex type with 64-bit float elements values values +`position` | tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or none type #### Results: | Result | Description | | :----: | ----------- | -`output_sequence` | memref of any type values or tensor of tensor of any type values values +`output_sequence` | tensor of tensor of 8-bit unsigned integer values values or tensor of tensor of 16-bit unsigned integer values values or tensor of tensor of 32-bit unsigned integer values values or tensor of tensor of 64-bit unsigned integer values values or tensor of tensor of 8-bit signless integer values values or tensor of tensor of 16-bit signless integer values values or tensor of tensor of 32-bit signless integer values values or tensor of tensor of 64-bit signless integer values values or tensor of tensor of 16-bit float values values or tensor of tensor of 32-bit float values values or tensor of tensor of 64-bit float values values or tensor of tensor of stirng type values values or tensor of tensor of 1-bit signless integer values values or tensor of tensor of complex type with 32-bit float elements values values or tensor of tensor of complex type with 64-bit float elements values values ### `onnx.SequenceInsert` (ONNXSequenceInsertOp) @@ -4915,15 +4915,15 @@ ONNX SequenceInsert operation | Operand | Description | | :-----: | ----------- | -`input_sequence` | memref of any type values or tensor of tensor of any type values values -`tensor` | memref of any type values or tensor of any type values -`position` | tensor of 32-bit signless integer or 64-bit signless integer values or memref of 32-bit signless integer or 64-bit signless integer values or none type +`input_sequence` | tensor of tensor of 8-bit unsigned integer values values or tensor of tensor of 16-bit unsigned integer values values or tensor of tensor of 32-bit unsigned integer values values or tensor of tensor of 64-bit unsigned integer values values or tensor of tensor of 8-bit signless integer values values or tensor of tensor of 16-bit signless integer values values or tensor of tensor of 32-bit signless integer values values or tensor of tensor of 64-bit signless integer values values or tensor of tensor of 16-bit float values values or tensor of tensor of 32-bit float values values or tensor of tensor of 64-bit float values values or tensor of tensor of stirng type values values or tensor of tensor of 1-bit signless integer values values or tensor of tensor of complex type with 32-bit float elements values values or tensor of tensor of complex type with 64-bit float elements values values +`tensor` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`position` | tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or none type #### Results: | Result | Description | | :----: | ----------- | -`output_sequence` | memref of any type values or tensor of tensor of any type values values +`output_sequence` | tensor of tensor of 8-bit unsigned integer values values or tensor of tensor of 16-bit unsigned integer values values or tensor of tensor of 32-bit unsigned integer values values or tensor of tensor of 64-bit unsigned integer values values or tensor of tensor of 8-bit signless integer values values or tensor of tensor of 16-bit signless integer values values or tensor of tensor of 32-bit signless integer values values or tensor of tensor of 64-bit signless integer values values or tensor of tensor of 16-bit float values values or tensor of tensor of 32-bit float values values or tensor of tensor of 64-bit float values values or tensor of tensor of stirng type values values or tensor of tensor of 1-bit signless integer values values or tensor of tensor of complex type with 32-bit float elements values values or tensor of tensor of complex type with 64-bit float elements values values ### `onnx.SequenceLength` (ONNXSequenceLengthOp) @@ -4935,13 +4935,13 @@ ONNX SequenceLength operation | Operand | Description | | :-----: | ----------- | -`input_sequence` | memref of any type values or tensor of tensor of any type values values +`input_sequence` | tensor of tensor of 8-bit unsigned integer values values or tensor of tensor of 16-bit unsigned integer values values or tensor of tensor of 32-bit unsigned integer values values or tensor of tensor of 64-bit unsigned integer values values or tensor of tensor of 8-bit signless integer values values or tensor of tensor of 16-bit signless integer values values or tensor of tensor of 32-bit signless integer values values or tensor of tensor of 64-bit signless integer values values or tensor of tensor of 16-bit float values values or tensor of tensor of 32-bit float values values or tensor of tensor of 64-bit float values values or tensor of tensor of stirng type values values or tensor of tensor of 1-bit signless integer values values or tensor of tensor of complex type with 32-bit float elements values values or tensor of tensor of complex type with 64-bit float elements values values #### Results: | Result | Description | | :----: | ----------- | -`length` | tensor of 64-bit signless integer values or memref of 64-bit signless integer values +`length` | tensor of 64-bit signless integer values ### `onnx.Shape` (ONNXShapeOp) @@ -4953,13 +4953,13 @@ ONNX Shape operation | Operand | Description | | :-----: | ----------- | -`data` | memref of any type values or tensor of any type values +`data` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`shape` | tensor of 64-bit signless integer values or memref of 64-bit signless integer values +`shape` | tensor of 64-bit signless integer values ### `onnx.Shrink` (ONNXShrinkOp) @@ -4981,13 +4981,13 @@ ONNX Shrink operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Sigmoid` (ONNXSigmoidOp) @@ -5001,13 +5001,13 @@ ONNX Sigmoid operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Sign` (ONNXSignOp) @@ -5020,13 +5020,13 @@ ONNX Sign operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Sin` (ONNXSinOp) @@ -5038,13 +5038,13 @@ ONNX Sin operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Sinh` (ONNXSinhOp) @@ -5056,13 +5056,13 @@ ONNX Sinh operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Size` (ONNXSizeOp) @@ -5074,13 +5074,13 @@ ONNX Size operation | Operand | Description | | :-----: | ----------- | -`data` | memref of any type values or tensor of any type values +`data` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`size` | tensor of 64-bit signless integer values or memref of 64-bit signless integer values +`size` | tensor of 64-bit signless integer values ### `onnx.Slice` (ONNXSliceOp) @@ -5125,17 +5125,17 @@ ONNX Slice operation | Operand | Description | | :-----: | ----------- | -`data` | memref of any type values or tensor of any type values -`starts` | tensor of 32-bit signless integer or 64-bit signless integer values or memref of 32-bit signless integer or 64-bit signless integer values -`ends` | tensor of 32-bit signless integer or 64-bit signless integer values or memref of 32-bit signless integer or 64-bit signless integer values -`axes` | tensor of 32-bit signless integer or 64-bit signless integer values or memref of 32-bit signless integer or 64-bit signless integer values or none type -`steps` | tensor of 32-bit signless integer or 64-bit signless integer values or memref of 32-bit signless integer or 64-bit signless integer values or none type +`data` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`starts` | tensor of 32-bit signless integer values or tensor of 64-bit signless integer values +`ends` | tensor of 32-bit signless integer values or tensor of 64-bit signless integer values +`axes` | tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or none type +`steps` | tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or none type or none type #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.Softmax` (ONNXSoftmaxOp) @@ -5166,13 +5166,13 @@ ONNX Softmax operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Softplus` (ONNXSoftplusOp) @@ -5186,13 +5186,13 @@ ONNX Softplus operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Softsign` (ONNXSoftsignOp) @@ -5204,13 +5204,13 @@ ONNX Softsign operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.SpaceToDepth` (ONNXSpaceToDepthOp) @@ -5230,13 +5230,13 @@ ONNX SpaceToDepth operation | Operand | Description | | :-----: | ----------- | -`input` | memref of any type values or tensor of any type values +`input` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.Split` (ONNXSplitOp) @@ -5257,13 +5257,13 @@ ONNX Split operation | Operand | Description | | :-----: | ----------- | -`input` | memref of any type values or tensor of any type values +`input` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`outputs` | memref of any type values or tensor of any type values +`outputs` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.SplitToSequence` (ONNXSplitToSequenceOp) @@ -5291,14 +5291,14 @@ ONNX SplitToSequence operation | Operand | Description | | :-----: | ----------- | -`input` | memref of any type values or tensor of any type values -`split` | tensor of 32-bit signless integer or 64-bit signless integer values or memref of 32-bit signless integer or 64-bit signless integer values or none type +`input` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`split` | tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or none type #### Results: | Result | Description | | :----: | ----------- | -`output_sequence` | memref of any type values or tensor of tensor of any type values values +`output_sequence` | tensor of tensor of 8-bit unsigned integer values values or tensor of tensor of 16-bit unsigned integer values values or tensor of tensor of 32-bit unsigned integer values values or tensor of tensor of 64-bit unsigned integer values values or tensor of tensor of 8-bit signless integer values values or tensor of tensor of 16-bit signless integer values values or tensor of tensor of 32-bit signless integer values values or tensor of tensor of 64-bit signless integer values values or tensor of tensor of 16-bit float values values or tensor of tensor of 32-bit float values values or tensor of tensor of 64-bit float values values or tensor of tensor of stirng type values values or tensor of tensor of 1-bit signless integer values values or tensor of tensor of complex type with 32-bit float elements values values or tensor of tensor of complex type with 64-bit float elements values values ### `onnx.Sqrt` (ONNXSqrtOp) @@ -5312,13 +5312,13 @@ ONNX Sqrt operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Squeeze` (ONNXSqueezeOp) @@ -5339,13 +5339,13 @@ ONNX Squeeze operation | Operand | Description | | :-----: | ----------- | -`data` | memref of any type values or tensor of any type values +`data` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`squeezed` | memref of any type values or tensor of any type values +`squeezed` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.StringNormalizer` (ONNXStringNormalizerOp) @@ -5374,13 +5374,13 @@ ONNX StringNormalizer operation | Operand | Description | | :-----: | ----------- | -`X` | memref of any type values or tensor of any type values +`X` | tensor of stirng type values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values +`Y` | tensor of stirng type values ### `onnx.Sub` (ONNXSubOp) @@ -5394,14 +5394,14 @@ ONNX Sub operation | Operand | Description | | :-----: | ----------- | -`A` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values -`B` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`A` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`B` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`C` | tensor of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values +`C` | tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Sum` (ONNXSumOp) @@ -5415,13 +5415,13 @@ ONNX Sum operation | Operand | Description | | :-----: | ----------- | -`data_0` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`data_0` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`sum` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`sum` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Tan` (ONNXTanOp) @@ -5433,13 +5433,13 @@ ONNX Tan operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Tanh` (ONNXTanhOp) @@ -5451,13 +5451,13 @@ ONNX Tanh operation | Operand | Description | | :-----: | ----------- | -`input` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`input` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`output` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`output` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.TfIdfVectorizer` (ONNXTfIdfVectorizerOp) @@ -5509,13 +5509,13 @@ ONNX TfIdfVectorizer operation | Operand | Description | | :-----: | ----------- | -`X` | memref of any type values or tensor of any type values +`X` | tensor of stirng type values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 32-bit float values or memref of 32-bit float values +`Y` | tensor of 32-bit float values ### `onnx.ThresholdedRelu` (ONNXThresholdedReluOp) @@ -5535,13 +5535,13 @@ ONNX ThresholdedRelu operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`X` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | tensor of 16-bit float or 32-bit float or 64-bit float values or memref of 16-bit float or 32-bit float or 64-bit float values +`Y` | tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values ### `onnx.Tile` (ONNXTileOp) @@ -5555,14 +5555,14 @@ ONNX Tile operation | Operand | Description | | :-----: | ----------- | -`input` | memref of any type values or tensor of any type values -`repeats` | tensor of 64-bit signless integer values or memref of 64-bit signless integer values +`input` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`repeats` | tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.TopK` (ONNXTopKOp) @@ -5595,15 +5595,15 @@ ONNX TopK operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values -`K` | memref of any type values or tensor of any type values +`X` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`K` | tensor of 64-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Values` | tensor of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values or memref of 8-bit signless integer or 16-bit signless integer or 32-bit signless integer or 64-bit signless integer or 16-bit float or 32-bit float or 64-bit float values -`Indices` | tensor of 64-bit signless integer values or memref of 64-bit signless integer values +`Values` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values +`Indices` | tensor of 64-bit signless integer values ### `onnx.Transpose` (ONNXTransposeOp) @@ -5623,13 +5623,13 @@ ONNX Transpose operation | Operand | Description | | :-----: | ----------- | -`data` | memref of any type values or tensor of any type values +`data` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`transposed` | memref of any type values or tensor of any type values +`transposed` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.TreeEnsembleClassifier` (ONNXTreeEnsembleClassifierOp) @@ -5671,14 +5671,14 @@ ONNX TreeEnsembleClassifier operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values or memref of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values +`X` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 64-bit signless integer values or tensor of 32-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values -`Z` | memref of any type values or tensor of any type values +`Y` | tensor of stirng type values or tensor of 64-bit signless integer values +`Z` | tensor of 32-bit float values ### `onnx.TreeEnsembleRegressor` (ONNXTreeEnsembleRegressorOp) @@ -5721,13 +5721,13 @@ ONNX TreeEnsembleRegressor operation | Operand | Description | | :-----: | ----------- | -`X` | tensor of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values or memref of 32-bit float or 64-bit float or 64-bit signless integer or 32-bit signless integer values +`X` | tensor of 32-bit float values or tensor of 64-bit float values or tensor of 64-bit signless integer values or tensor of 32-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values +`Y` | tensor of 32-bit float values ### `onnx.Unique` (ONNXUniqueOp) @@ -5820,16 +5820,16 @@ ONNX Unique operation | Operand | Description | | :-----: | ----------- | -`X` | memref of any type values or tensor of any type values +`X` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values -`indices` | memref of any type values or tensor of any type values or none type -`inverse_indices` | memref of any type values or tensor of any type values or none type -`counts` | memref of any type values or tensor of any type values or none type +`Y` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`indices` | tensor of 64-bit signless integer values or none type +`inverse_indices` | tensor of 64-bit signless integer values or none type +`counts` | tensor of 64-bit signless integer values or none type ### `onnx.Unsqueeze` (ONNXUnsqueezeOp) @@ -5858,13 +5858,13 @@ ONNX Unsqueeze operation | Operand | Description | | :-----: | ----------- | -`data` | memref of any type values or tensor of any type values +`data` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`expanded` | memref of any type values or tensor of any type values +`expanded` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.Upsample` (ONNXUpsampleOp) @@ -5884,14 +5884,14 @@ ONNX Upsample operation | Operand | Description | | :-----: | ----------- | -`X` | memref of any type values or tensor of any type values -`scales` | memref of any type values or tensor of any type values +`X` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`scales` | tensor of 32-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Y` | memref of any type values or tensor of any type values +`Y` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.Where` (ONNXWhereOp) @@ -5906,15 +5906,15 @@ ONNX Where operation | Operand | Description | | :-----: | ----------- | -`condition` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values -`X` | memref of any type values or tensor of any type values -`Y` | memref of any type values or tensor of any type values +`condition` | tensor of 1-bit signless integer values +`X` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values +`Y` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values #### Results: | Result | Description | | :----: | ----------- | -`output` | memref of any type values or tensor of any type values +`output` | tensor of 8-bit unsigned integer values or tensor of 16-bit unsigned integer values or tensor of 32-bit unsigned integer values or tensor of 64-bit unsigned integer values or tensor of 8-bit signless integer values or tensor of 16-bit signless integer values or tensor of 32-bit signless integer values or tensor of 64-bit signless integer values or tensor of 16-bit float values or tensor of 32-bit float values or tensor of 64-bit float values or tensor of stirng type values or tensor of 1-bit signless integer values or tensor of complex type with 32-bit float elements values or tensor of complex type with 64-bit float elements values ### `onnx.Xor` (ONNXXorOp) @@ -5929,14 +5929,14 @@ ONNX Xor operation | Operand | Description | | :-----: | ----------- | -`A` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values -`B` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values +`A` | tensor of 1-bit signless integer values +`B` | tensor of 1-bit signless integer values #### Results: | Result | Description | | :----: | ----------- | -`C` | tensor of 1-bit signless integer values or memref of 1-bit signless integer values +`C` | tensor of 1-bit signless integer values ### `onnx.ZipMap` (ONNXZipMapOp) @@ -5958,11 +5958,11 @@ ONNX ZipMap operation | Operand | Description | | :-----: | ----------- | -`X` | memref of any type values or tensor of any type values +`X` | tensor of 32-bit float values #### Results: | Result | Description | | :----: | ----------- | -`Z` | tensor of tensor of 32-bit float or 64-bit signless integer values values or memref of 32-bit float or 64-bit signless integer values +`Z` | tensor of tuple with any combination of stirng type or 32-bit float values values or tensor of tuple with any combination of 64-bit signless integer or 32-bit float values values diff --git a/src/Dialect/ONNX/CMakeLists.txt b/src/Dialect/ONNX/CMakeLists.txt index f22ded0..cc6f125 100644 --- a/src/Dialect/ONNX/CMakeLists.txt +++ b/src/Dialect/ONNX/CMakeLists.txt @@ -16,6 +16,7 @@ add_library(OMONNXOps ONNXOps.hpp ONNXOpsHelper.cpp ONNXOpsHelper.hpp) + target_include_directories(OMONNXOps PRIVATE ${ONNX_MLIR_SRC_ROOT} diff --git a/src/Dialect/ONNX/ONNXOps.cpp b/src/Dialect/ONNX/ONNXOps.cpp index b1126d6..fb33cd6 100644 --- a/src/Dialect/ONNX/ONNXOps.cpp +++ b/src/Dialect/ONNX/ONNXOps.cpp @@ -11,6 +11,7 @@ #include "mlir/Dialect/Traits.h" #include "mlir/IR/Block.h" #include "mlir/IR/Builders.h" +#include "mlir/IR/DialectImplementation.h" #include "mlir/IR/Function.h" #include "mlir/IR/IntegerSet.h" #include "mlir/IR/Matchers.h" @@ -25,6 +26,7 @@ using namespace mlir; using namespace mlir::OpTrait::util; +using namespace mlir::onnxmlir; //===----------------------------------------------------------------------===// // ONNX Helper functions @@ -481,6 +483,19 @@ ONNXOpsDialect::ONNXOpsDialect(mlir::MLIRContext *ctx) #define GET_OP_LIST #include "src/Dialect/ONNX/ONNXOps.cpp.inc" >(); + addTypes(); +} + +mlir::Type ONNXOpsDialect::parseType(mlir::DialectAsmParser &parser) const { + if (parser.parseKeyword("String")) + return Type(); + + return StringType::get(getContext()); +} + +void ONNXOpsDialect::printType( + mlir::Type type, mlir::DialectAsmPrinter &printer) const { + printer << "String"; } void ONNXEntryPointOp::build(mlir::OpBuilder &builder, @@ -2025,8 +2040,12 @@ LogicalResult ONNXDynamicQuantizeLinearOp::inferShapes() { auto yScaleTy = y_scale().getType().cast(); auto yZPTy = y_zero_point().getType().cast(); - IntegerType i8Type = IntegerType::get(8, getContext()); - RankedTensorType scalarType = RankedTensorType::get({}, i8Type); + IntegerType ui8Type = + IntegerType::get(8, IntegerType::Unsigned, getContext()); + FloatType f32Type = FloatType::getF32(getContext()); + + RankedTensorType scalarType = RankedTensorType::get({}, f32Type); + RankedTensorType y_zero_point_type = RankedTensorType::get({}, ui8Type); // Set the types for the scalars if (!yScaleTy.hasStaticShape()) { @@ -2034,11 +2053,11 @@ LogicalResult ONNXDynamicQuantizeLinearOp::inferShapes() { } if (!yZPTy.hasStaticShape()) { - y_zero_point().setType(scalarType); + y_zero_point().setType(y_zero_point_type); } if (!yTy.hasStaticShape()) { - RankedTensorType outType = RankedTensorType::get(inTy.getShape(), i8Type); + RankedTensorType outType = RankedTensorType::get(inTy.getShape(), ui8Type); y().setType(outType); } diff --git a/src/Dialect/ONNX/ONNXOps.hpp b/src/Dialect/ONNX/ONNXOps.hpp index 5c4200d..43c5cf8 100644 --- a/src/Dialect/ONNX/ONNXOps.hpp +++ b/src/Dialect/ONNX/ONNXOps.hpp @@ -31,6 +31,13 @@ class ONNXOpsDialect : public Dialect { public: ONNXOpsDialect(MLIRContext *context); + /// Parse an instance of a type registered to the onnx dialect. + mlir::Type parseType(mlir::DialectAsmParser &parser) const override; + + /// Print an instance of a type registered to the onnx dialect. + void printType( + mlir::Type type, mlir::DialectAsmPrinter &printer) const override; + /// Provide a utility accessor to the dialect namespace. This is used by /// several utilities for casting between dialects. static StringRef getDialectNamespace() { return "onnx"; } @@ -41,6 +48,39 @@ public: #define GET_OP_CLASSES #include "src/Dialect/ONNX/ONNXOps.hpp.inc" +// The namespace onnxmlir is experimental. +// onnx_mlir has been used in KRNL. Other candidates are onnxops, onnxdialect. +// Should this namesapce for onnx mlir project or ONNXOp dialect? +// Or we need two namespace? +// Will put all the ONNXOps into this namespace +namespace onnxmlir { + +namespace ONNXTypes { + +enum Kind { + FIRST_USED_ONNX_TYPE = Type::FIRST_PRIVATE_EXPERIMENTAL_1_TYPE, + //#define HANDLE_TF_TYPE(tftype, enumerant, name) enumerant, + //#include "src/Dialect/ONNX/ONXTypes.def" + STRING, + SEQ, + LAST_USED_ONNX_TYPE, +}; +} // namespace ONNXTypes + +class StringType : public mlir::Type::TypeBase { +public: + using Base::Base; + static bool kindof(unsigned kind) { return kind == ONNXTypes::STRING; } + + static unsigned getTypeKind() { return ONNXTypes::STRING; } + + static StringType get(MLIRContext *ctx) { + return Base::get(ctx, ONNXTypes::STRING); + } +}; + +} // end namespace onnxmlir + } // end namespace mlir namespace onnx_mlir {} diff --git a/src/Dialect/ONNX/ONNXOps.td b/src/Dialect/ONNX/ONNXOps.td index 9dff9e9..da3c625 100644 --- a/src/Dialect/ONNX/ONNXOps.td +++ b/src/Dialect/ONNX/ONNXOps.td @@ -17,6 +17,8 @@ include "mlir/IR/OpBase.td" #endif // OP_BASE +def StringType : Type()">, "stirng type">; + #ifdef SHAPE_INFERENCE_INTERFACE #else include "src/Interface/ShapeInferenceInterface.td" diff --git a/src/Dialect/ONNX/ONNXOps.td.inc b/src/Dialect/ONNX/ONNXOps.td.inc index 5bf9a39..1cbd6c4 100644 --- a/src/Dialect/ONNX/ONNXOps.td.inc +++ b/src/Dialect/ONNX/ONNXOps.td.inc @@ -12,8 +12,8 @@ def ONNXAbsOp:ONNX_Op<"Abs", "(Tensor) where the absolute is, y = abs(x), is applied to" "the tensor elementwise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$X); - let results = (outs AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let builders = [ OpBuilder<"OpBuilder &builder, OperationState &state, Value X", [{ auto elementType = X.getType().cast().getElementType(); @@ -45,8 +45,8 @@ def ONNXAcosOp:ONNX_Op<"Acos", let description = [{ "Calculates the arccosine (inverse of cosine) of the given input tensor, element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -66,8 +66,8 @@ def ONNXAcoshOp:ONNX_Op<"Acosh", let description = [{ "Calculates the hyperbolic arccosine of the given input tensor element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -90,9 +90,9 @@ def ONNXAddOp:ONNX_Op<"Add", "" "This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$A, - AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$B); - let results = (outs AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$C); + let arguments = (ins AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$A, + AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$B); + let results = (outs AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$C); let builders = [ OpBuilder<"OpBuilder &builder, OperationState &state, Value A, Value B", [{ auto lhsTy = A.getType().cast(); @@ -141,9 +141,9 @@ def ONNXAndOp:ONNX_Op<"And", "" "This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$A, - AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$B); - let results = (outs AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$C); + let arguments = (ins TensorOf<[I1]>:$A, + TensorOf<[I1]>:$B); + let results = (outs TensorOf<[I1]>:$C); let builders = [ OpBuilder<"OpBuilder &builder, OperationState &state, Value A, Value B", [{ auto lhsTy = A.getType().cast(); @@ -192,10 +192,10 @@ def ONNXArgMaxOp:ONNX_Op<"ArgMax", "If keepdims equal 0, then the resulted tensor have the reduced dimension pruned. " "The type of the output tensor is integer." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$data, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$data, DefaultValuedAttr:$axis, DefaultValuedAttr:$keepdims); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$reduced); + let results = (outs TensorOf<[I64]>:$reduced); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -218,10 +218,10 @@ def ONNXArgMinOp:ONNX_Op<"ArgMin", "If keepdims equal 0, then the resulted tensor have the reduced dimension pruned. " "The type of the output tensor is integer." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$data, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$data, DefaultValuedAttr:$axis, DefaultValuedAttr:$keepdims); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$reduced); + let results = (outs TensorOf<[I64]>:$reduced); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -241,8 +241,8 @@ def ONNXAsinOp:ONNX_Op<"Asin", let description = [{ "Calculates the arcsine (inverse of sine) of the given input tensor, element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -262,8 +262,8 @@ def ONNXAsinhOp:ONNX_Op<"Asinh", let description = [{ "Calculates the hyperbolic arcsine of the given input tensor element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -283,8 +283,8 @@ def ONNXAtanOp:ONNX_Op<"Atan", let description = [{ "Calculates the arctangent (inverse of tangent) of the given input tensor, element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -304,8 +304,8 @@ def ONNXAtanhOp:ONNX_Op<"Atanh", let description = [{ "Calculates the hyperbolic arctangent of the given input tensor element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -353,14 +353,14 @@ def ONNXAveragePoolOp:ONNX_Op<"AveragePool", " The output of each pooling window is divided by the number of elements (exclude pad when attribute count_include_pad is zero)." " " }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, DefaultValuedAttr:$auto_pad, DefaultValuedAttr:$ceil_mode, DefaultValuedAttr:$count_include_pad, I64ArrayAttr:$kernel_shape, OptionalAttr:$pads, OptionalAttr:$strides); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -389,18 +389,18 @@ def ONNXBatchNormalizationOp:ONNX_Op<"BatchNormalization", "to flatten the input shape to (N x C*D1*D2 ..*Dn) before a BatchNormalization Op." "This operator has **optional** inputs/outputs. See [the doc](IR.md) for more details about the representation of optional arguments. An empty string may be used in the place of an actual argument's name to indicate a missing argument. Trailing optional arguments (those not followed by an argument that is present) may also be simply omitted." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$scale, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$B, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$mean, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$var, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$scale, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$B, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$mean, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$var, DefaultValuedAttr:$epsilon, DefaultValuedAttr:$momentum); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$out_mean, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$out_var, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$saved_mean, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$saved_var); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType]>:$out_mean, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType]>:$out_var, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType, NoneType]>:$saved_mean, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType, NoneType, NoneType]>:$saved_var); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 5; @@ -431,10 +431,10 @@ def ONNXBitShiftOp:ONNX_Op<"BitShift", " not necessarily identical." "This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8,I16,I32,I64]>, MemRefOf<[I8,I16,I32,I64]>]>:$X, - AnyTypeOf<[TensorOf<[I8,I16,I32,I64]>, MemRefOf<[I8,I16,I32,I64]>]>:$Y, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>]>:$X, + AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>]>:$Y, StrAttr:$direction); - let results = (outs AnyTypeOf<[TensorOf<[I8,I16,I32,I64]>, MemRefOf<[I8,I16,I32,I64]>]>:$Z); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>]>:$Z); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -472,9 +472,9 @@ def ONNXCastOp:ONNX_Op<"Cast", "For example, a 64-bit float 3.1415926459 may be round to a 32-bit float 3.141592. Similarly, converting" "an integer 36 to Boolean may produce 1 because we truncate bits which can't be stored in the targeted type." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$input, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I1]>, TensorOf<[StringType]>]>:$input, I64Attr:$to); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I1]>, TensorOf<[StringType]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -504,8 +504,8 @@ def ONNXCeilOp:ONNX_Op<"Ceil", "(Tensor) where the ceil is, y = ceil(x), is applied to" "the tensor elementwise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -527,10 +527,10 @@ def ONNXClipOp:ONNX_Op<"Clip", "specified by the inputs 'min' and 'max'. They default to" "numeric_limits::lowest() and numeric_limits::max(), respectively." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$min, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$max); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType]>:$min, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType]>:$max); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 3; @@ -553,10 +553,10 @@ def ONNXCompressOp:ONNX_Op<"Compress", " Compress behaves like numpy.compress: https://docs.scipy.org/doc/numpy/reference/generated/numpy.compress.html" " " }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$input, - AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$condition, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$input, + TensorOf<[I1]>:$condition, OptionalAttr:$axis); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -576,9 +576,9 @@ def ONNXConcatOp:ONNX_Op<"Concat", let description = [{ "Concatenate a list of tensors into a single tensor. All input tensors must have the same shape, except for the dimension size of the axis to concatenate on." }]; - let arguments = (ins Variadic>:$inputs, + let arguments = (ins Variadic, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>>:$inputs, I64Attr:$axis); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$concat_result); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$concat_result); let extraClassDeclaration = [{ static int getNumberOfOperands() { return -1; @@ -601,10 +601,10 @@ def ONNXConcatFromSequenceOp:ONNX_Op<"ConcatFromSequence", "By default 'new_axis' is 0, the behavior is similar to numpy.concatenate." "When 'new_axis' is 1, the behavior is similar to numpy.stack." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, TensorOf<[AnyTensor]>]>:$input_sequence, + let arguments = (ins AnyTypeOf<[TensorOf<[TensorOf<[UI8]>]>, TensorOf<[TensorOf<[UI16]>]>, TensorOf<[TensorOf<[UI32]>]>, TensorOf<[TensorOf<[UI64]>]>, TensorOf<[TensorOf<[I8]>]>, TensorOf<[TensorOf<[I16]>]>, TensorOf<[TensorOf<[I32]>]>, TensorOf<[TensorOf<[I64]>]>, TensorOf<[TensorOf<[F16]>]>, TensorOf<[TensorOf<[F32]>]>, TensorOf<[TensorOf<[F64]>]>, TensorOf<[TensorOf<[StringType]>]>, TensorOf<[TensorOf<[I1]>]>, TensorOf<[TensorOf<[Complex]>]>, TensorOf<[TensorOf<[Complex]>]>]>:$input_sequence, I64Attr:$axis, DefaultValuedAttr:$new_axis); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$concat_result); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$concat_result); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -627,7 +627,7 @@ def ONNXConstantOp:ONNX_Op<"Constant", }]; let arguments = (ins OptionalAttr:$sparse_value, OptionalAttr:$value); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 0; @@ -667,9 +667,9 @@ def ONNXConstantOfShapeOp:ONNX_Op<"ConstantOfShape", let description = [{ "Generate a tensor with given value and shape." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I64]>, MemRefOf<[I64]>]>:$input, + let arguments = (ins TensorOf<[I64]>:$input, OptionalAttr:$value); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64,I8,I16,I32,I64,I1]>, MemRefOf<[F16,F32,F64,I8,I16,I32,I64,I1]>]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I1]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -691,16 +691,16 @@ def ONNXConvOp:ONNX_Op<"Conv", "The convolution operator consumes an input tensor and a filter, and" "computes the output." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$W, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$B, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$W, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType]>:$B, DefaultValuedAttr:$auto_pad, OptionalAttr:$dilations, DefaultValuedAttr:$group, OptionalAttr:$kernel_shape, OptionalAttr:$pads, OptionalAttr:$strides); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 3; @@ -721,17 +721,17 @@ def ONNXConvIntegerOp:ONNX_Op<"ConvInteger", "The integer convolution operator consumes an input tensor, its zero-point, a filter, and its zero-point," "and computes the output. The production MUST never overflow. The accumulation may overflow if and only if in 32 bits." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$x, - AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$w, - AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>, NoneType]>:$x_zero_point, - AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>, NoneType]>:$w_zero_point, + let arguments = (ins AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>]>:$x, + AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>]>:$w, + AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>, NoneType]>:$x_zero_point, + AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>, NoneType]>:$w_zero_point, DefaultValuedAttr:$auto_pad, OptionalAttr:$dilations, DefaultValuedAttr:$group, OptionalAttr:$kernel_shape, OptionalAttr:$pads, OptionalAttr:$strides); - let results = (outs AnyTypeOf<[TensorOf<[I32]>, MemRefOf<[I32]>]>:$y); + let results = (outs TensorOf<[I32]>:$y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 4; @@ -764,9 +764,9 @@ def ONNXConvTransposeOp:ONNX_Op<"ConvTranspose", "" " " }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$W, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$B, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$W, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType]>:$B, DefaultValuedAttr:$auto_pad, OptionalAttr:$dilations, DefaultValuedAttr:$group, @@ -775,7 +775,7 @@ def ONNXConvTransposeOp:ONNX_Op<"ConvTranspose", OptionalAttr:$output_shape, OptionalAttr:$pads, OptionalAttr:$strides); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 3; @@ -795,8 +795,8 @@ def ONNXCosOp:ONNX_Op<"Cos", let description = [{ "Calculates the cosine of the given input tensor, element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -816,8 +816,8 @@ def ONNXCoshOp:ONNX_Op<"Cosh", let description = [{ "Calculates the hyperbolic cosine of the given input tensor element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -856,11 +856,11 @@ def ONNXCumSumOp:ONNX_Op<"CumSum", "```" " " }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I32,I64,F32,F64]>, MemRefOf<[I32,I64,F32,F64]>]>:$x, - AnyTypeOf<[TensorOf<[I32,I64]>, MemRefOf<[I32,I64]>]>:$axis, + let arguments = (ins AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$x, + AnyTypeOf<[TensorOf<[I32]>, TensorOf<[I64]>]>:$axis, DefaultValuedAttr:$exclusive, DefaultValuedAttr:$reverse); - let results = (outs AnyTypeOf<[TensorOf<[I32,I64,F32,F64]>, MemRefOf<[I32,I64,F32,F64]>]>:$y); + let results = (outs AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -906,10 +906,10 @@ def ONNXDepthToSpaceOp:ONNX_Op<"DepthToSpace", "y = np.reshape(tmp, [b, c // (blocksize ** 2), h * blocksize, w * blocksize])" "" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$input, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$input, I64Attr:$blocksize, DefaultValuedAttr:$mode); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -932,10 +932,10 @@ def ONNXDequantizeLinearOp:ONNX_Op<"DequantizeLinear", "'x_zero_point' and 'x' must have same type. 'x' and 'y' must have same shape. In the case of dequantizing int32," "there's no zero point (zero point is supposed to be 0)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8,I32]>, MemRefOf<[I8,I32]>]>:$x, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$x_scale, - AnyTypeOf<[TensorOf<[I8,I32]>, MemRefOf<[I8,I32]>, NoneType]>:$x_zero_point); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$y); + let arguments = (ins AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>, TensorOf<[I32]>]>:$x, + TensorOf<[F32]>:$x_scale, + AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>, TensorOf<[I32]>, NoneType]>:$x_zero_point); + let results = (outs TensorOf<[F32]>:$y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 3; @@ -959,8 +959,8 @@ def ONNXDetOp:ONNX_Op<"Det", "The output is a tensor of shape `[*]`, containing the determinants of all input submatrices." "e.g., When the input is 2-D, the output is a scalar(shape is empty: `[]`)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -982,9 +982,9 @@ def ONNXDivOp:ONNX_Op<"Div", "" "This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$A, - AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$B); - let results = (outs AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$C); + let arguments = (ins AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$A, + AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$B); + let results = (outs AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$C); let builders = [ OpBuilder<"OpBuilder &builder, OperationState &state, Value A, Value B", [{ auto lhsTy = A.getType().cast(); @@ -1035,10 +1035,10 @@ def ONNXDropoutOp:ONNX_Op<"Dropout", "the training phase, so during testing nothing needs to be done." "This operator has **optional** inputs/outputs. See [the doc](IR.md) for more details about the representation of optional arguments. An empty string may be used in the place of an actual argument's name to indicate a missing argument. Trailing optional arguments (those not followed by an argument that is present) may also be simply omitted." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$data, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$data, DefaultValuedAttr:$ratio); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output, - AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>, NoneType]>:$mask); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output, + AnyTypeOf<[TensorOf<[I1]>, NoneType]>:$mask); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -1079,10 +1079,10 @@ def ONNXDynamicQuantizeLinearOp:ONNX_Op<"DynamicQuantizeLinear", "* rounding to nearest ties to even." "```" }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F32]>, MemRefOf<[F32]>]>:$x); - let results = (outs AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$y, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$y_scale, - AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$y_zero_point); + let arguments = (ins TensorOf<[F32]>:$x); + let results = (outs TensorOf<[UI8]>:$y, + TensorOf<[F32]>:$y_scale, + TensorOf<[UI8]>:$y_zero_point); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -1105,9 +1105,9 @@ def ONNXEluOp:ONNX_Op<"Elu", "0`, `f(x) = x for x >= 0`., is applied to the tensor elementwise." "" }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, DefaultValuedAttr:$alpha); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -1130,9 +1130,9 @@ def ONNXEqualOp:ONNX_Op<"Equal", "" "This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I1,I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I1,I8,I16,I32,I64,F16,F32,F64]>]>:$A, - AnyTypeOf<[TensorOf<[I1,I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I1,I8,I16,I32,I64,F16,F32,F64]>]>:$B); - let results = (outs AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$C); + let arguments = (ins AnyTypeOf<[TensorOf<[I1]>, TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$A, + AnyTypeOf<[TensorOf<[I1]>, TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$B); + let results = (outs TensorOf<[I1]>:$C); let builders = [ OpBuilder<"OpBuilder &builder, OperationState &state, Value A, Value B", [{ auto lhsTy = A.getType().cast(); @@ -1178,8 +1178,8 @@ def ONNXErfOp:ONNX_Op<"Erf", let description = [{ "Computes the error function of the given input tensor element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -1199,8 +1199,8 @@ def ONNXExpOp:ONNX_Op<"Exp", let description = [{ "Calculates the exponential of the given input tensor, element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let builders = [ OpBuilder<"OpBuilder &builder, OperationState &state, Value input", [{ auto elementType = input.getType().cast().getElementType(); @@ -1239,9 +1239,9 @@ def ONNXExpandOp:ONNX_Op<"Expand", "It is possible that the output.shape is not equal to shape, when some dimensions in shape is equal to 1," "or the shape.ndim < input.shape.ndim." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$input, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$shape); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$input, + TensorOf<[I64]>:$shape); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -1267,10 +1267,10 @@ def ONNXEyeLikeOp:ONNX_Op<"EyeLike", "The 'dtype' argument must be one of the data types specified in the 'DataType' enum field in the" "TensorProto message and be valid as an output type." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64,I8,I16,I32,I64,I1]>, MemRefOf<[F16,F32,F64,I8,I16,I32,I64,I1]>]>:$input, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I1]>]>:$input, OptionalAttr:$dtype, DefaultValuedAttr:$k); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64,I8,I16,I32,I64,I1]>, MemRefOf<[F16,F32,F64,I8,I16,I32,I64,I1]>]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I1]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -1292,9 +1292,9 @@ def ONNXFlattenOp:ONNX_Op<"Flatten", "(d_0, d_1, ... d_n) then the output will have shape" "(d_0 X d_1 ... d_(axis-1), d_axis X d_(axis+1) ... X dn)." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$input, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$input, DefaultValuedAttr:$axis); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -1316,8 +1316,8 @@ def ONNXFloorOp:ONNX_Op<"Floor", "(Tensor) where the floor is, y = floor(x), is applied to" "the tensor elementwise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -1409,12 +1409,12 @@ def ONNXGRUOp:ONNX_Op<"GRU", " - Ht = (1 - zt) (.) ht + zt (.) Ht-1" "This operator has **optional** inputs/outputs. See [the doc](IR.md) for more details about the representation of optional arguments. An empty string may be used in the place of an actual argument's name to indicate a missing argument. Trailing optional arguments (those not followed by an argument that is present) may also be simply omitted." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$W, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$R, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$B, - AnyTypeOf<[TensorOf<[I32]>, MemRefOf<[I32]>, NoneType]>:$sequence_lens, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$initial_h, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$W, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$R, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType]>:$B, + AnyTypeOf<[TensorOf<[I32]>, NoneType]>:$sequence_lens, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType]>:$initial_h, OptionalAttr:$activation_alpha, OptionalAttr:$activation_beta, OptionalAttr:$activations, @@ -1422,8 +1422,8 @@ def ONNXGRUOp:ONNX_Op<"GRU", DefaultValuedAttr:$direction, OptionalAttr:$hidden_size, DefaultValuedAttr:$linear_before_reset); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$Y, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$Y_h); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType, NoneType]>:$Y, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType, NoneType, NoneType]>:$Y_h); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 6; @@ -1499,10 +1499,10 @@ def ONNXGatherOp:ONNX_Op<"Gather", " ]" "```" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$data, - AnyTypeOf<[TensorOf<[I32,I64]>, MemRefOf<[I32,I64]>]>:$indices, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$data, + AnyTypeOf<[TensorOf<[I32]>, TensorOf<[I64]>]>:$indices, DefaultValuedAttr:$axis); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -1576,10 +1576,10 @@ def ONNXGatherElementsOp:ONNX_Op<"GatherElements", " ]" "```" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$data, - AnyTypeOf<[TensorOf<[I32,I64]>, MemRefOf<[I32,I64]>]>:$indices, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$data, + AnyTypeOf<[TensorOf<[I32]>, TensorOf<[I64]>]>:$indices, DefaultValuedAttr:$axis); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -1663,9 +1663,9 @@ def ONNXGatherNDOp:ONNX_Op<"GatherND", " output = [[[2,3]],[[4,5]]] # output_shape = [2, 1, 2] " "" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$data, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$indices); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$data, + TensorOf<[I64]>:$indices); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -1698,14 +1698,14 @@ def ONNXGemmOp:ONNX_Op<"Gemm", "This operator supports **unidirectional broadcasting** (tensor C should be unidirectional broadcastable to tensor A * B); for more details please check [the doc](Broadcasting.md)." "This operator has **optional** inputs/outputs. See [the doc](IR.md) for more details about the representation of optional arguments. An empty string may be used in the place of an actual argument's name to indicate a missing argument. Trailing optional arguments (those not followed by an argument that is present) may also be simply omitted." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64,I32,I64]>, MemRefOf<[F16,F32,F64,I32,I64]>]>:$A, - AnyTypeOf<[TensorOf<[F16,F32,F64,I32,I64]>, MemRefOf<[F16,F32,F64,I32,I64]>]>:$B, - AnyTypeOf<[TensorOf<[F16,F32,F64,I32,I64]>, MemRefOf<[F16,F32,F64,I32,I64]>, NoneType]>:$C, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>]>:$A, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>]>:$B, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, NoneType]>:$C, DefaultValuedAttr:$alpha, DefaultValuedAttr:$beta, DefaultValuedAttr:$transA, DefaultValuedAttr:$transB); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64,I32,I64]>, MemRefOf<[F16,F32,F64,I32,I64]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, NoneType]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 3; @@ -1727,8 +1727,8 @@ def ONNXGlobalAveragePoolOp:ONNX_Op<"GlobalAveragePool", " the values in the same channel. This is equivalent to AveragePool with kernel size" " equal to the spatial dimension of input tensor." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -1750,9 +1750,9 @@ def ONNXGlobalLpPoolOp:ONNX_Op<"GlobalLpPool", " the values in the same channel. This is equivalent to LpPool with kernel size" " equal to the spatial dimension of input tensor." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, DefaultValuedAttr:$p); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -1774,8 +1774,8 @@ def ONNXGlobalMaxPoolOp:ONNX_Op<"GlobalMaxPool", " the values in the same channel. This is equivalent to MaxPool with kernel size" " equal to the spatial dimension of input tensor." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -1798,9 +1798,9 @@ def ONNXGreaterOp:ONNX_Op<"Greater", "" "This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$A, - AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$B); - let results = (outs AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$C); + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$A, + AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$B); + let results = (outs TensorOf<[I1]>:$C); let builders = [ OpBuilder<"OpBuilder &builder, OperationState &state, Value A, Value B", [{ auto lhsTy = A.getType().cast(); @@ -1848,10 +1848,10 @@ def ONNXHardSigmoidOp:ONNX_Op<"HardSigmoid", "(Tensor) where the HardSigmoid function, y = max(0, min(1, alpha * x + beta))," "is applied to the tensor elementwise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, DefaultValuedAttr:$alpha, DefaultValuedAttr:$beta); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -1884,9 +1884,9 @@ def ONNXHardmaxOp:ONNX_Op<"Hardmax", "will throw errors. The output tensor has the same shape" "and contains the hardmax values of the corresponding input." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input, DefaultValuedAttr:$axis); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -1907,8 +1907,8 @@ def ONNXIdentityOp:ONNX_Op<"Identity", let description = [{ "Identity operator" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$input); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -1928,10 +1928,10 @@ def ONNXIfOp:ONNX_Op<"If", let description = [{ "If conditional" }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$cond, + let arguments = (ins TensorOf<[I1]>:$cond, AnyAttr:$else_branch, AnyAttr:$then_branch); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$outputs); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$outputs); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -1956,11 +1956,11 @@ def ONNXInstanceNormalizationOp:ONNX_Op<"InstanceNormalization", "where mean and variance are computed per instance per channel." "" }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$scale, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$B, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$scale, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$B, DefaultValuedAttr:$epsilon); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 3; @@ -1980,10 +1980,10 @@ def ONNXIsInfOp:ONNX_Op<"IsInf", let description = [{ "Map infinity to true and other values to false." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F32,F64]>, MemRefOf<[F32,F64]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>]>:$X, DefaultValuedAttr:$detect_negative, DefaultValuedAttr:$detect_positive); - let results = (outs AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$Y); + let results = (outs TensorOf<[I1]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -2003,8 +2003,8 @@ def ONNXIsNaNOp:ONNX_Op<"IsNaN", let description = [{ "Returns which elements of the input are NaN." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X); - let results = (outs AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X); + let results = (outs TensorOf<[I1]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -2033,12 +2033,12 @@ def ONNXLRNOp:ONNX_Op<"LRN", "" "Y[n, c, d1, ..., dk] = X[n, c, d1, ..., dk] / (bias + alpha / size * square_sum[n, c, d1, ..., dk] ) ^ beta" }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, DefaultValuedAttr:$alpha, DefaultValuedAttr:$beta, DefaultValuedAttr:$bias, I64Attr:$size); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -2138,14 +2138,14 @@ def ONNXLSTMOp:ONNX_Op<"LSTM", " - Ht = ot (.) h(Ct)" "This operator has **optional** inputs/outputs. See [the doc](IR.md) for more details about the representation of optional arguments. An empty string may be used in the place of an actual argument's name to indicate a missing argument. Trailing optional arguments (those not followed by an argument that is present) may also be simply omitted." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$W, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$R, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$B, - AnyTypeOf<[TensorOf<[I32]>, MemRefOf<[I32]>, NoneType]>:$sequence_lens, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$initial_h, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$initial_c, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$P, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$W, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$R, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType]>:$B, + AnyTypeOf<[TensorOf<[I32]>, NoneType]>:$sequence_lens, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType]>:$initial_h, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType, NoneType]>:$initial_c, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType, NoneType, NoneType]>:$P, OptionalAttr:$activation_alpha, OptionalAttr:$activation_beta, OptionalAttr:$activations, @@ -2153,9 +2153,9 @@ def ONNXLSTMOp:ONNX_Op<"LSTM", DefaultValuedAttr:$direction, OptionalAttr:$hidden_size, DefaultValuedAttr:$input_forget); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$Y, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$Y_h, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$Y_c); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType, NoneType, NoneType, NoneType]>:$Y, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType, NoneType, NoneType, NoneType, NoneType]>:$Y_h, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType, NoneType, NoneType, NoneType, NoneType, NoneType]>:$Y_c); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 8; @@ -2177,9 +2177,9 @@ def ONNXLeakyReluOp:ONNX_Op<"LeakyRelu", "output data (Tensor) where the function `f(x) = alpha * x for x < 0`," "`f(x) = x for x >= 0`, is applied to the data tensor elementwise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, DefaultValuedAttr:$alpha); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -2202,9 +2202,9 @@ def ONNXLessOp:ONNX_Op<"Less", "" "This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$A, - AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$B); - let results = (outs AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$C); + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$A, + AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$B); + let results = (outs TensorOf<[I1]>:$C); let builders = [ OpBuilder<"OpBuilder &builder, OperationState &state, Value A, Value B", [{ auto lhsTy = A.getType().cast(); @@ -2250,8 +2250,8 @@ def ONNXLogOp:ONNX_Op<"Log", let description = [{ "Calculates the natural log of the given input tensor, element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -2284,9 +2284,9 @@ def ONNXLogSoftmaxOp:ONNX_Op<"LogSoftmax", "will throw errors. The output tensor has the same shape" "and contains the logsoftmax values of the corresponding input." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input, DefaultValuedAttr:$axis); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -2418,11 +2418,11 @@ def ONNXLoopOp:ONNX_Op<"Loop", "the scan_outputs from the previous layer, possibly going through several" "point-wise operators (e.g. dropout, residual connections, linear layer)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I64]>, MemRefOf<[I64]>, NoneType]>:$M, - AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>, NoneType]>:$cond, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$v_initial, + let arguments = (ins AnyTypeOf<[TensorOf<[I64]>, NoneType]>:$M, + AnyTypeOf<[TensorOf<[I1]>, NoneType]>:$cond, + AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$v_initial, AnyAttr:$body); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$v_final_and_scan_outputs); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$v_final_and_scan_outputs); let extraClassDeclaration = [{ static int getNumberOfOperands() { return -1; @@ -2442,10 +2442,10 @@ def ONNXLpNormalizationOp:ONNX_Op<"LpNormalization", let description = [{ "Given a matrix, apply Lp-normalization along the provided axis." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input, DefaultValuedAttr:$axis, DefaultValuedAttr:$p); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -2469,13 +2469,13 @@ def ONNXLpPoolOp:ONNX_Op<"LpPool", " of the input tensor according to the kernel size and downsampling the" " data into the output tensor Y for further processing." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, DefaultValuedAttr:$auto_pad, I64ArrayAttr:$kernel_shape, DefaultValuedAttr:$p, OptionalAttr:$pads, OptionalAttr:$strides); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -2495,9 +2495,9 @@ def ONNXMatMulOp:ONNX_Op<"MatMul", let description = [{ "Matrix product that behaves like numpy.matmul: https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.matmul.html" }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64,I32,I64]>, MemRefOf<[F16,F32,F64,I32,I64]>]>:$A, - AnyTypeOf<[TensorOf<[F16,F32,F64,I32,I64]>, MemRefOf<[F16,F32,F64,I32,I64]>]>:$B); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64,I32,I64]>, MemRefOf<[F16,F32,F64,I32,I64]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>]>:$A, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>]>:$B); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -2518,11 +2518,11 @@ def ONNXMatMulIntegerOp:ONNX_Op<"MatMulInteger", "Matrix product that behaves like numpy.matmul: https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.matmul.html." "The production MUST never overflow. The accumulation may overflow if and only if in 32 bits." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$A, - AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$B, - AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>, NoneType]>:$a_zero_point, - AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>, NoneType]>:$b_zero_point); - let results = (outs AnyTypeOf<[TensorOf<[I32]>, MemRefOf<[I32]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>]>:$A, + AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>]>:$B, + AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>, NoneType]>:$a_zero_point, + AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>, NoneType]>:$b_zero_point); + let results = (outs TensorOf<[I32]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 4; @@ -2544,8 +2544,8 @@ def ONNXMaxOp:ONNX_Op<"Max", "All inputs and outputs must have the same data type." "This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins Variadic, MemRefOf<[F16,F32,F64]>]>>:$data_0); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$max); + let arguments = (ins Variadic, TensorOf<[F32]>, TensorOf<[F64]>]>>:$data_0); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$max); let extraClassDeclaration = [{ static int getNumberOfOperands() { return -1; @@ -2593,7 +2593,7 @@ def ONNXMaxPoolOp:ONNX_Op<"MaxPool", " The output of each pooling window is maximum number of elements exclude pad." " " }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, DefaultValuedAttr:$auto_pad, DefaultValuedAttr:$ceil_mode, OptionalAttr:$dilations, @@ -2601,8 +2601,8 @@ def ONNXMaxPoolOp:ONNX_Op<"MaxPool", OptionalAttr:$pads, DefaultValuedAttr:$storage_order, OptionalAttr:$strides); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y, - AnyTypeOf<[TensorOf<[I64]>, MemRefOf<[I64]>, NoneType]>:$Indices); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y, + AnyTypeOf<[TensorOf<[I64]>, NoneType]>:$Indices); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -2624,11 +2624,11 @@ def ONNXMaxRoiPoolOp:ONNX_Op<"MaxRoiPool", " apply max pooling across each RoI, to produce output 4-D tensor of shape" " (num_rois, channels, pooled_shape[0], pooled_shape[1])." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$rois, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$rois, I64ArrayAttr:$pooled_shape, DefaultValuedAttr:$spatial_scale); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -2665,13 +2665,13 @@ def ONNXMaxUnpoolOp:ONNX_Op<"MaxUnpool", " which define the exact unpooling op. The attributes typically have the same values as the corrsponding" " pooling op that the unpooling op is trying to invert." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, - AnyTypeOf<[TensorOf<[I64]>, MemRefOf<[I64]>]>:$I, - AnyTypeOf<[TensorOf<[I64]>, MemRefOf<[I64]>, NoneType]>:$output_shape, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, + TensorOf<[I64]>:$I, + AnyTypeOf<[TensorOf<[I64]>, NoneType]>:$output_shape, I64ArrayAttr:$kernel_shape, OptionalAttr:$pads, OptionalAttr:$strides); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 3; @@ -2693,8 +2693,8 @@ def ONNXMeanOp:ONNX_Op<"Mean", "All inputs and outputs must have the same data type." "This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins Variadic, MemRefOf<[F16,F32,F64]>]>>:$data_0); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$mean); + let arguments = (ins Variadic, TensorOf<[F32]>, TensorOf<[F64]>]>>:$data_0); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$mean); let extraClassDeclaration = [{ static int getNumberOfOperands() { return -1; @@ -2715,9 +2715,9 @@ def ONNXMeanVarianceNormalizationOp:ONNX_Op<"MeanVarianceNormalization", "A MeanVarianceNormalization Function: Perform mean variance normalization" " on the input tensor X using formula:
``` (X-EX)/sqrt(E(X-EX)^2) ```" }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, DefaultValuedAttr:$axes); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -2739,8 +2739,8 @@ def ONNXMinOp:ONNX_Op<"Min", "All inputs and outputs must have the same data type." "This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins Variadic, MemRefOf<[F16,F32,F64]>]>>:$data_0); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$min); + let arguments = (ins Variadic, TensorOf<[F32]>, TensorOf<[F64]>]>>:$data_0); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$min); let extraClassDeclaration = [{ static int getNumberOfOperands() { return -1; @@ -2772,10 +2772,10 @@ def ONNXModOp:ONNX_Op<"Mod", "" " This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$A, - AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$B, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$A, + AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$B, DefaultValuedAttr:$fmod); - let results = (outs AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$C); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$C); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -2797,9 +2797,9 @@ def ONNXMulOp:ONNX_Op<"Mul", "" "This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$A, - AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$B); - let results = (outs AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$C); + let arguments = (ins AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$A, + AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$B); + let results = (outs AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$C); let builders = [ OpBuilder<"OpBuilder &builder, OperationState &state, Value A, Value B", [{ auto lhsTy = A.getType().cast(); @@ -2846,11 +2846,11 @@ def ONNXMultinomialOp:ONNX_Op<"Multinomial", "Generate a tensor of samples from a multinomial distribution according to the probabilities" "of each of the possible outcomes." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input, DefaultValuedAttr:$dtype, DefaultValuedAttr:$sample_size, OptionalAttr:$seed); - let results = (outs AnyTypeOf<[TensorOf<[I32,I64]>, MemRefOf<[I32,I64]>]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[I32]>, TensorOf<[I64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -2872,8 +2872,8 @@ def ONNXNegOp:ONNX_Op<"Neg", "(Tensor) where each element flipped sign, y = -x, is applied to" "the tensor elementwise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F32,I32,I8,I16,I64,F16,F64]>, MemRefOf<[F32,I32,I8,I16,I64,F16,F64]>]>:$X); - let results = (outs AnyTypeOf<[TensorOf<[F32,I32,I8,I16,I64,F16,F64]>, MemRefOf<[F32,I32,I8,I16,I64,F16,F64]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[F32]>, TensorOf<[I32]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F64]>]>:$X); + let results = (outs AnyTypeOf<[TensorOf<[F32]>, TensorOf<[I32]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -2899,13 +2899,13 @@ def ONNXNonMaxSuppressionOp:ONNX_Op<"NonMaxSuppression", "The selected_indices output is a set of integers indexing into the input collection of bounding boxes representing the selected boxes." "The bounding box coordinates corresponding to the selected indices can then be obtained using the Gather or GatherND operation." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$boxes, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$scores, - AnyTypeOf<[AnyMemRef, AnyTensor, NoneType]>:$max_output_boxes_per_class, - AnyTypeOf<[AnyMemRef, AnyTensor, NoneType]>:$iou_threshold, - AnyTypeOf<[AnyMemRef, AnyTensor, NoneType]>:$score_threshold, + let arguments = (ins TensorOf<[F32]>:$boxes, + TensorOf<[F32]>:$scores, + AnyTypeOf<[TensorOf<[I64]>, NoneType]>:$max_output_boxes_per_class, + AnyTypeOf<[TensorOf<[F32]>, NoneType]>:$iou_threshold, + AnyTypeOf<[TensorOf<[F32]>, NoneType]>:$score_threshold, DefaultValuedAttr:$center_point_box); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$selected_indices); + let results = (outs TensorOf<[I64]>:$selected_indices); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 5; @@ -2928,8 +2928,8 @@ def ONNXNonZeroOp:ONNX_Op<"NonZero", " NonZero behaves similar to numpy.nonzero:" " https://docs.scipy.org/doc/numpy/reference/generated/numpy.nonzero.html" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$X); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$X); + let results = (outs TensorOf<[I64]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -2949,8 +2949,8 @@ def ONNXNotOp:ONNX_Op<"Not", let description = [{ "Returns the negation of the input tensor element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$X); - let results = (outs AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$Y); + let arguments = (ins TensorOf<[I1]>:$X); + let results = (outs TensorOf<[I1]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -2988,11 +2988,11 @@ def ONNXOneHotOp:ONNX_Op<"OneHot", " output[i, j, k, input[i, j, k]] = 1 for all i, j, k and 0 otherwise." "" }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$indices, - AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$depth, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$values, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$indices, + AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$depth, + AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$values, DefaultValuedAttr:$axis); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 3; @@ -3015,9 +3015,9 @@ def ONNXOrOp:ONNX_Op<"Or", "" "This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$A, - AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$B); - let results = (outs AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$C); + let arguments = (ins TensorOf<[I1]>:$A, + TensorOf<[I1]>:$B); + let results = (outs TensorOf<[I1]>:$C); let builders = [ OpBuilder<"OpBuilder &builder, OperationState &state, Value A, Value B", [{ auto lhsTy = A.getType().cast(); @@ -3066,9 +3066,9 @@ def ONNXPReluOp:ONNX_Op<"PRelu", "`f(x) = x for x >= 0`., is applied to the data tensor elementwise." "This operator supports **unidirectional broadcasting** (tensor slope should be unidirectional broadcastable to input tensor X); for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64,I32,I64]>, MemRefOf<[F16,F32,F64,I32,I64]>]>:$X, - AnyTypeOf<[TensorOf<[F16,F32,F64,I32,I64]>, MemRefOf<[F16,F32,F64,I32,I64]>]>:$slope); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64,I32,I64]>, MemRefOf<[F16,F32,F64,I32,I64]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>]>:$X, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>]>:$slope); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -3168,11 +3168,11 @@ def ONNXPadOp:ONNX_Op<"Pad", " ]" "" }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$data, - AnyTypeOf<[AnyMemRef, AnyTensor, NoneType]>:$pads, - AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>, NoneType]>:$constant_value, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$data, + AnyTypeOf<[TensorOf<[I64]>, NoneType]>:$pads, + AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType]>:$constant_value, DefaultValuedAttr:$mode); - let results = (outs AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType]>:$output); let builders = [ OpBuilder<"OpBuilder &builder, OperationState &state, Value data, Value pads, Value constant_value, StringAttr mode", [{ auto elementType = data.getType().cast().getElementType(); @@ -3210,9 +3210,9 @@ def ONNXPowOp:ONNX_Op<"Pow", "is applied to the data tensor elementwise." "This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Z); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Z); let builders = [ OpBuilder<"OpBuilder &builder, OperationState &state, Value X, Value Y", [{ auto lhsTy = X.getType().cast(); @@ -3262,22 +3262,22 @@ def ONNXQLinearConvOp:ONNX_Op<"QLinearConv", "It means they must be either scalars (per tensor) or 1-D tensors (per output channel)." "Each input or output and its related zero point must have same type." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$x, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$x_scale, - AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$x_zero_point, - AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$w, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$w_scale, - AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$w_zero_point, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$y_scale, - AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$y_zero_point, - AnyTypeOf<[TensorOf<[I32]>, MemRefOf<[I32]>, NoneType]>:$B, + let arguments = (ins AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>]>:$x, + TensorOf<[F32]>:$x_scale, + AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>]>:$x_zero_point, + AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>]>:$w, + TensorOf<[F32]>:$w_scale, + AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>]>:$w_zero_point, + TensorOf<[F32]>:$y_scale, + AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>]>:$y_zero_point, + AnyTypeOf<[TensorOf<[I32]>, NoneType]>:$B, DefaultValuedAttr:$auto_pad, OptionalAttr:$dilations, DefaultValuedAttr:$group, OptionalAttr:$kernel_shape, OptionalAttr:$pads, OptionalAttr:$strides); - let results = (outs AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$y); + let results = (outs AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>]>:$y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 9; @@ -3304,15 +3304,15 @@ def ONNXQLinearMatMulOp:ONNX_Op<"QLinearMatMul", "and the number of elements of scale and zero point tensor of input 'b' should be equal to the number of columns of input 'b'." "Production must never overflow, and accumulation may overflow if and only if in 32 bits." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$a, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$a_scale, - AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$a_zero_point, - AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$b, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$b_scale, - AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$b_zero_point, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$y_scale, - AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$y_zero_point); - let results = (outs AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$y); + let arguments = (ins AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>]>:$a, + TensorOf<[F32]>:$a_scale, + AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>]>:$a_zero_point, + AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>]>:$b, + TensorOf<[F32]>:$b_scale, + AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>]>:$b_zero_point, + TensorOf<[F32]>:$y_scale, + AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>]>:$y_zero_point); + let results = (outs AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>]>:$y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 8; @@ -3334,10 +3334,10 @@ def ONNXQuantizeLinearOp:ONNX_Op<"QuantizeLinear", "The quantization formula is y = saturate ((x / y_scale) + y_zero_point). For saturation, it saturates to [0, 255] if it's uint8, or [-128, 127] if it's int8." "For (x / y_scale), it's rounding to nearest ties to even. Refer to https://en.wikipedia.org/wiki/Rounding for details. 'y_zero_point' and 'y' must have same type." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F32,I32]>, MemRefOf<[F32,I32]>]>:$x, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$y_scale, - AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>, NoneType]>:$y_zero_point); - let results = (outs AnyTypeOf<[TensorOf<[I8]>, MemRefOf<[I8]>]>:$y); + let arguments = (ins AnyTypeOf<[TensorOf<[F32]>, TensorOf<[I32]>]>:$x, + TensorOf<[F32]>:$y_scale, + AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>, NoneType]>:$y_zero_point); + let results = (outs AnyTypeOf<[TensorOf<[I8]>, TensorOf<[UI8]>, NoneType]>:$y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 3; @@ -3417,20 +3417,20 @@ def ONNXRNNOp:ONNX_Op<"RNN", " - Ht = f(Xt*(Wi^T) + Ht-1*(Ri^T) + Wbi + Rbi)" "This operator has **optional** inputs/outputs. See [the doc](IR.md) for more details about the representation of optional arguments. An empty string may be used in the place of an actual argument's name to indicate a missing argument. Trailing optional arguments (those not followed by an argument that is present) may also be simply omitted." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$W, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$R, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$B, - AnyTypeOf<[TensorOf<[I32]>, MemRefOf<[I32]>, NoneType]>:$sequence_lens, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$initial_h, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$W, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$R, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType]>:$B, + AnyTypeOf<[TensorOf<[I32]>, NoneType]>:$sequence_lens, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType]>:$initial_h, OptionalAttr:$activation_alpha, OptionalAttr:$activation_beta, DefaultValuedAttr:$activations, OptionalAttr:$clip, DefaultValuedAttr:$direction, OptionalAttr:$hidden_size); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$Y, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>, NoneType]>:$Y_h); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType, NoneType]>:$Y, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, NoneType, NoneType, NoneType, NoneType]>:$Y_h); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 6; @@ -3461,7 +3461,7 @@ def ONNXRandomNormalOp:ONNX_Op<"RandomNormal", DefaultValuedAttr:$scale, OptionalAttr:$seed, I64ArrayAttr:$shape); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 0; @@ -3487,12 +3487,12 @@ def ONNXRandomNormalLikeOp:ONNX_Op<"RandomNormalLike", "The 'dtype' argument must be one of the data types specified in the 'DataType' enum field in the" "TensorProto message, and be valid as an output type." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$input, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$input, OptionalAttr:$dtype, DefaultValuedAttr:$mean, DefaultValuedAttr:$scale, OptionalAttr:$seed); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -3522,7 +3522,7 @@ def ONNXRandomUniformOp:ONNX_Op<"RandomUniform", DefaultValuedAttr:$low, OptionalAttr:$seed, I64ArrayAttr:$shape); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 0; @@ -3548,12 +3548,12 @@ def ONNXRandomUniformLikeOp:ONNX_Op<"RandomUniformLike", "The 'dtype' argument must be one of the data types specified in the 'DataType' enum field in the" "TensorProto message and be valid as an output type." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$input, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$input, OptionalAttr:$dtype, DefaultValuedAttr:$high, DefaultValuedAttr:$low, OptionalAttr:$seed); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -3597,10 +3597,10 @@ def ONNXRangeOp:ONNX_Op<"Range", "Output: [10, 8, 6]" "" }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F32,F64,I16,I32,I64]>, MemRefOf<[F32,F64,I16,I32,I64]>]>:$start, - AnyTypeOf<[TensorOf<[F32,F64,I16,I32,I64]>, MemRefOf<[F32,F64,I16,I32,I64]>]>:$limit, - AnyTypeOf<[TensorOf<[F32,F64,I16,I32,I64]>, MemRefOf<[F32,F64,I16,I32,I64]>]>:$delta); - let results = (outs AnyTypeOf<[TensorOf<[F32,F64,I16,I32,I64]>, MemRefOf<[F32,F64,I16,I32,I64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>]>:$start, + AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>]>:$limit, + AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>]>:$delta); + let results = (outs AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 3; @@ -3622,8 +3622,8 @@ def ONNXReciprocalOp:ONNX_Op<"Reciprocal", "(Tensor) where the reciprocal is, y = 1/x, is applied to" "the tensor elementwise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -3648,10 +3648,10 @@ def ONNXReduceL1Op:ONNX_Op<"ReduceL1", "The above behavior is similar to numpy, with the exception that numpy default keepdims to" "False instead of True." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$data, + let arguments = (ins AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$data, OptionalAttr:$axes, DefaultValuedAttr:$keepdims); - let results = (outs AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$reduced); + let results = (outs AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$reduced); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -3676,10 +3676,10 @@ def ONNXReduceL2Op:ONNX_Op<"ReduceL2", "The above behavior is similar to numpy, with the exception that numpy default keepdims to" "False instead of True." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$data, + let arguments = (ins AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$data, OptionalAttr:$axes, DefaultValuedAttr:$keepdims); - let results = (outs AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$reduced); + let results = (outs AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$reduced); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -3704,10 +3704,10 @@ def ONNXReduceLogSumOp:ONNX_Op<"ReduceLogSum", "The above behavior is similar to numpy, with the exception that numpy default keepdims to" "False instead of True." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$data, + let arguments = (ins AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$data, OptionalAttr:$axes, DefaultValuedAttr:$keepdims); - let results = (outs AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$reduced); + let results = (outs AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$reduced); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -3732,10 +3732,10 @@ def ONNXReduceLogSumExpOp:ONNX_Op<"ReduceLogSumExp", "The above behavior is similar to numpy, with the exception that numpy default keepdims to" "False instead of True." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$data, + let arguments = (ins AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$data, OptionalAttr:$axes, DefaultValuedAttr:$keepdims); - let results = (outs AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$reduced); + let results = (outs AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$reduced); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -3760,10 +3760,10 @@ def ONNXReduceMaxOp:ONNX_Op<"ReduceMax", "The above behavior is similar to numpy, with the exception that numpy default keepdims to" "False instead of True." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$data, + let arguments = (ins AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$data, OptionalAttr:$axes, DefaultValuedAttr:$keepdims); - let results = (outs AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$reduced); + let results = (outs AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$reduced); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -3788,10 +3788,10 @@ def ONNXReduceMeanOp:ONNX_Op<"ReduceMean", "The above behavior is similar to numpy, with the exception that numpy default keepdims to" "False instead of True." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$data, + let arguments = (ins AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$data, OptionalAttr:$axes, DefaultValuedAttr:$keepdims); - let results = (outs AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$reduced); + let results = (outs AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$reduced); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -3816,10 +3816,10 @@ def ONNXReduceMinOp:ONNX_Op<"ReduceMin", "The above behavior is similar to numpy, with the exception that numpy default keepdims to" "False instead of True." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$data, + let arguments = (ins AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$data, OptionalAttr:$axes, DefaultValuedAttr:$keepdims); - let results = (outs AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$reduced); + let results = (outs AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$reduced); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -3844,10 +3844,10 @@ def ONNXReduceProdOp:ONNX_Op<"ReduceProd", "The above behavior is similar to numpy, with the exception that numpy default keepdims to" "False instead of True." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$data, + let arguments = (ins AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$data, OptionalAttr:$axes, DefaultValuedAttr:$keepdims); - let results = (outs AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$reduced); + let results = (outs AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$reduced); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -3872,10 +3872,10 @@ def ONNXReduceSumOp:ONNX_Op<"ReduceSum", "The above behavior is similar to numpy, with the exception that numpy default keepdims to" "False instead of True." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$data, + let arguments = (ins AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$data, OptionalAttr:$axes, DefaultValuedAttr:$keepdims); - let results = (outs AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$reduced); + let results = (outs AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$reduced); let builders = [ OpBuilder<"OpBuilder &builder, OperationState &state, Value data, ArrayAttr axes, IntegerAttr keepdims", [{ auto elementType = data.getType().cast().getElementType(); @@ -3912,10 +3912,10 @@ def ONNXReduceSumSquareOp:ONNX_Op<"ReduceSumSquare", "The above behavior is similar to numpy, with the exception that numpy default keepdims to" "False instead of True." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$data, + let arguments = (ins AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$data, OptionalAttr:$axes, DefaultValuedAttr:$keepdims); - let results = (outs AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$reduced); + let results = (outs AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$reduced); let builders = [ OpBuilder<"OpBuilder &builder, OperationState &state, Value data, ArrayAttr axes, IntegerAttr keepdims", [{ auto elementType = data.getType().cast().getElementType(); @@ -3949,8 +3949,8 @@ def ONNXReluOp:ONNX_Op<"Relu", "(Tensor) where the rectified linear function, y = max(0, x), is applied to" "the tensor elementwise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -3975,9 +3975,9 @@ def ONNXReshapeOp:ONNX_Op<"Reshape", "could also be 0, in which case the actual dimension value is unchanged (i.e. taken" "from the input tensor)." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$data, - AnyTypeOf<[AnyMemRef, AnyTensor, NoneType]>:$shape); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$reshaped); + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$data, + AnyTypeOf<[TensorOf<[I64]>, NoneType]>:$shape); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$reshaped); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -4002,17 +4002,17 @@ def ONNXResizeOp:ONNX_Op<"Resize", "Each dimension value of the output tensor is:" " output_dimension = floor(input_dimension * (roi_end - roi_start) * scale) if input \\"sizes\\" is not specified." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$X, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$roi, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$scales, - AnyTypeOf<[AnyMemRef, AnyTensor, NoneType]>:$sizes, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$X, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$roi, + TensorOf<[F32]>:$scales, + AnyTypeOf<[TensorOf<[I64]>, NoneType]>:$sizes, DefaultValuedAttr:$coordinate_transformation_mode, DefaultValuedAttr:$cubic_coeff_a, DefaultValuedAttr:$exclude_outside, DefaultValuedAttr:$extrapolation_value, DefaultValuedAttr:$mode, DefaultValuedAttr:$nearest_mode); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 4; @@ -4064,11 +4064,11 @@ def ONNXReverseSequenceOp:ONNX_Op<"ReverseSequence", " [10.0, 9.0, 8.0, 11.0]," " [15.0, 14.0, 13.0, 12.0]]" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$input, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$sequence_lens, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$input, + TensorOf<[I64]>:$sequence_lens, DefaultValuedAttr:$batch_axis, DefaultValuedAttr:$time_axis); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -4098,15 +4098,15 @@ def ONNXRoiAlignOp:ONNX_Op<"RoiAlign", "the value of the sampled locations are computed directly" "through bilinear interpolation." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, - AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$rois, - AnyTypeOf<[TensorOf<[I64]>, MemRefOf<[I64]>]>:$batch_indices, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, + AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$rois, + TensorOf<[I64]>:$batch_indices, DefaultValuedAttr:$mode, DefaultValuedAttr:$output_height, DefaultValuedAttr:$output_width, DefaultValuedAttr:$sampling_ratio, DefaultValuedAttr:$spatial_scale); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 3; @@ -4138,8 +4138,8 @@ def ONNXRoundOp:ONNX_Op<"Round", "round([-4.5]) = [-4.0]" "```" }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -4279,14 +4279,14 @@ def ONNXScanOp:ONNX_Op<"Scan", " }" "" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$initial_state_and_scan_inputs, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$initial_state_and_scan_inputs, AnyAttr:$body, I64Attr:$num_scan_inputs, OptionalAttr:$scan_input_axes, OptionalAttr:$scan_input_directions, OptionalAttr:$scan_output_axes, OptionalAttr:$scan_output_directions); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$final_state_and_scan_outputs); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$final_state_and_scan_outputs); let extraClassDeclaration = [{ static int getNumberOfOperands() { return -1; @@ -4358,11 +4358,11 @@ def ONNXScatterOp:ONNX_Op<"Scatter", " output = [[1.0, 1.1, 3.0, 2.1, 5.0]]" "```" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$data, - AnyTypeOf<[TensorOf<[I32,I64]>, MemRefOf<[I32,I64]>]>:$indices, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$updates, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$data, + AnyTypeOf<[TensorOf<[I32]>, TensorOf<[I64]>]>:$indices, + AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$updates, DefaultValuedAttr:$axis); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 3; @@ -4432,11 +4432,11 @@ def ONNXScatterElementsOp:ONNX_Op<"ScatterElements", " output = [[1.0, 1.1, 3.0, 2.1, 5.0]]" "```" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$data, - AnyTypeOf<[TensorOf<[I32,I64]>, MemRefOf<[I32,I64]>]>:$indices, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$updates, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$data, + AnyTypeOf<[TensorOf<[I32]>, TensorOf<[I64]>]>:$indices, + AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$updates, DefaultValuedAttr:$axis); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 3; @@ -4511,10 +4511,10 @@ def ONNXScatterNDOp:ONNX_Op<"ScatterND", " [[8, 7, 6, 5], [4, 3, 2, 1], [1, 2, 3, 4], [5, 6, 7, 8]]]" "```" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$data, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$indices, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$updates); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$data, + TensorOf<[I64]>:$indices, + AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$updates); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 3; @@ -4537,10 +4537,10 @@ def ONNXSeluOp:ONNX_Op<"Selu", "`y = gamma * (alpha * e^x - alpha) for x <= 0`, `y = gamma * x for x > 0`," "is applied to the tensor elementwise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, DefaultValuedAttr:$alpha, DefaultValuedAttr:$gamma); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -4562,9 +4562,9 @@ def ONNXSequenceAtOp:ONNX_Op<"SequenceAt", "Accepted range for 'position' is in `[-n, n - 1]`, where `n` is the number of tensors in 'input_sequence'." "Negative value means counting positions from the back." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, TensorOf<[AnyTensor]>]>:$input_sequence, - AnyTypeOf<[TensorOf<[I32,I64]>, MemRefOf<[I32,I64]>]>:$position); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$tensor); + let arguments = (ins AnyTypeOf<[TensorOf<[TensorOf<[UI8]>]>, TensorOf<[TensorOf<[UI16]>]>, TensorOf<[TensorOf<[UI32]>]>, TensorOf<[TensorOf<[UI64]>]>, TensorOf<[TensorOf<[I8]>]>, TensorOf<[TensorOf<[I16]>]>, TensorOf<[TensorOf<[I32]>]>, TensorOf<[TensorOf<[I64]>]>, TensorOf<[TensorOf<[F16]>]>, TensorOf<[TensorOf<[F32]>]>, TensorOf<[TensorOf<[F64]>]>, TensorOf<[TensorOf<[StringType]>]>, TensorOf<[TensorOf<[I1]>]>, TensorOf<[TensorOf<[Complex]>]>, TensorOf<[TensorOf<[Complex]>]>]>:$input_sequence, + AnyTypeOf<[TensorOf<[I32]>, TensorOf<[I64]>]>:$position); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$tensor); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -4585,8 +4585,8 @@ def ONNXSequenceConstructOp:ONNX_Op<"SequenceConstruct", "Construct a tensor sequence containing 'inputs' tensors." "All tensors in 'inputs' must have the same data type." }]; - let arguments = (ins Variadic>:$inputs); - let results = (outs AnyTypeOf<[AnyMemRef, TensorOf<[AnyTensor]>]>:$output_sequence); + let arguments = (ins Variadic, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>>:$inputs); + let results = (outs AnyTypeOf<[TensorOf<[TensorOf<[UI8]>]>, TensorOf<[TensorOf<[UI16]>]>, TensorOf<[TensorOf<[UI32]>]>, TensorOf<[TensorOf<[UI64]>]>, TensorOf<[TensorOf<[I8]>]>, TensorOf<[TensorOf<[I16]>]>, TensorOf<[TensorOf<[I32]>]>, TensorOf<[TensorOf<[I64]>]>, TensorOf<[TensorOf<[F16]>]>, TensorOf<[TensorOf<[F32]>]>, TensorOf<[TensorOf<[F64]>]>, TensorOf<[TensorOf<[StringType]>]>, TensorOf<[TensorOf<[I1]>]>, TensorOf<[TensorOf<[Complex]>]>, TensorOf<[TensorOf<[Complex]>]>]>:$output_sequence); let extraClassDeclaration = [{ static int getNumberOfOperands() { return -1; @@ -4607,7 +4607,7 @@ def ONNXSequenceEmptyOp:ONNX_Op<"SequenceEmpty", "Construct an empty tensor sequence, with given data type." }]; let arguments = (ins OptionalAttr:$dtype); - let results = (outs AnyTypeOf<[AnyMemRef, TensorOf<[AnyTensor]>]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[TensorOf<[UI8]>]>, TensorOf<[TensorOf<[UI16]>]>, TensorOf<[TensorOf<[UI32]>]>, TensorOf<[TensorOf<[UI64]>]>, TensorOf<[TensorOf<[I8]>]>, TensorOf<[TensorOf<[I16]>]>, TensorOf<[TensorOf<[I32]>]>, TensorOf<[TensorOf<[I64]>]>, TensorOf<[TensorOf<[F16]>]>, TensorOf<[TensorOf<[F32]>]>, TensorOf<[TensorOf<[F64]>]>, TensorOf<[TensorOf<[StringType]>]>, TensorOf<[TensorOf<[I1]>]>, TensorOf<[TensorOf<[Complex]>]>, TensorOf<[TensorOf<[Complex]>]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 0; @@ -4630,9 +4630,9 @@ def ONNXSequenceEraseOp:ONNX_Op<"SequenceErase", "Negative value means counting positions from the back." "'position' is optional, by default it erases the last tensor from 'input_sequence'." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, TensorOf<[AnyTensor]>]>:$input_sequence, - AnyTypeOf<[TensorOf<[I32,I64]>, MemRefOf<[I32,I64]>, NoneType]>:$position); - let results = (outs AnyTypeOf<[AnyMemRef, TensorOf<[AnyTensor]>]>:$output_sequence); + let arguments = (ins AnyTypeOf<[TensorOf<[TensorOf<[UI8]>]>, TensorOf<[TensorOf<[UI16]>]>, TensorOf<[TensorOf<[UI32]>]>, TensorOf<[TensorOf<[UI64]>]>, TensorOf<[TensorOf<[I8]>]>, TensorOf<[TensorOf<[I16]>]>, TensorOf<[TensorOf<[I32]>]>, TensorOf<[TensorOf<[I64]>]>, TensorOf<[TensorOf<[F16]>]>, TensorOf<[TensorOf<[F32]>]>, TensorOf<[TensorOf<[F64]>]>, TensorOf<[TensorOf<[StringType]>]>, TensorOf<[TensorOf<[I1]>]>, TensorOf<[TensorOf<[Complex]>]>, TensorOf<[TensorOf<[Complex]>]>]>:$input_sequence, + AnyTypeOf<[TensorOf<[I32]>, TensorOf<[I64]>, NoneType]>:$position); + let results = (outs AnyTypeOf<[TensorOf<[TensorOf<[UI8]>]>, TensorOf<[TensorOf<[UI16]>]>, TensorOf<[TensorOf<[UI32]>]>, TensorOf<[TensorOf<[UI64]>]>, TensorOf<[TensorOf<[I8]>]>, TensorOf<[TensorOf<[I16]>]>, TensorOf<[TensorOf<[I32]>]>, TensorOf<[TensorOf<[I64]>]>, TensorOf<[TensorOf<[F16]>]>, TensorOf<[TensorOf<[F32]>]>, TensorOf<[TensorOf<[F64]>]>, TensorOf<[TensorOf<[StringType]>]>, TensorOf<[TensorOf<[I1]>]>, TensorOf<[TensorOf<[Complex]>]>, TensorOf<[TensorOf<[Complex]>]>]>:$output_sequence); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -4656,10 +4656,10 @@ def ONNXSequenceInsertOp:ONNX_Op<"SequenceInsert", "Negative value means counting positions from the back." "'position' is optional, by default it inserts 'tensor' to the back of 'input_sequence'." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, TensorOf<[AnyTensor]>]>:$input_sequence, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$tensor, - AnyTypeOf<[TensorOf<[I32,I64]>, MemRefOf<[I32,I64]>, NoneType]>:$position); - let results = (outs AnyTypeOf<[AnyMemRef, TensorOf<[AnyTensor]>]>:$output_sequence); + let arguments = (ins AnyTypeOf<[TensorOf<[TensorOf<[UI8]>]>, TensorOf<[TensorOf<[UI16]>]>, TensorOf<[TensorOf<[UI32]>]>, TensorOf<[TensorOf<[UI64]>]>, TensorOf<[TensorOf<[I8]>]>, TensorOf<[TensorOf<[I16]>]>, TensorOf<[TensorOf<[I32]>]>, TensorOf<[TensorOf<[I64]>]>, TensorOf<[TensorOf<[F16]>]>, TensorOf<[TensorOf<[F32]>]>, TensorOf<[TensorOf<[F64]>]>, TensorOf<[TensorOf<[StringType]>]>, TensorOf<[TensorOf<[I1]>]>, TensorOf<[TensorOf<[Complex]>]>, TensorOf<[TensorOf<[Complex]>]>]>:$input_sequence, + AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$tensor, + AnyTypeOf<[TensorOf<[I32]>, TensorOf<[I64]>, NoneType]>:$position); + let results = (outs AnyTypeOf<[TensorOf<[TensorOf<[UI8]>]>, TensorOf<[TensorOf<[UI16]>]>, TensorOf<[TensorOf<[UI32]>]>, TensorOf<[TensorOf<[UI64]>]>, TensorOf<[TensorOf<[I8]>]>, TensorOf<[TensorOf<[I16]>]>, TensorOf<[TensorOf<[I32]>]>, TensorOf<[TensorOf<[I64]>]>, TensorOf<[TensorOf<[F16]>]>, TensorOf<[TensorOf<[F32]>]>, TensorOf<[TensorOf<[F64]>]>, TensorOf<[TensorOf<[StringType]>]>, TensorOf<[TensorOf<[I1]>]>, TensorOf<[TensorOf<[Complex]>]>, TensorOf<[TensorOf<[Complex]>]>]>:$output_sequence); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 3; @@ -4679,8 +4679,8 @@ def ONNXSequenceLengthOp:ONNX_Op<"SequenceLength", let description = [{ "Produces a scalar(tensor of empty shape) containing the number of tensors in 'input_sequence'." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, TensorOf<[AnyTensor]>]>:$input_sequence); - let results = (outs AnyTypeOf<[TensorOf<[I64]>, MemRefOf<[I64]>]>:$length); + let arguments = (ins AnyTypeOf<[TensorOf<[TensorOf<[UI8]>]>, TensorOf<[TensorOf<[UI16]>]>, TensorOf<[TensorOf<[UI32]>]>, TensorOf<[TensorOf<[UI64]>]>, TensorOf<[TensorOf<[I8]>]>, TensorOf<[TensorOf<[I16]>]>, TensorOf<[TensorOf<[I32]>]>, TensorOf<[TensorOf<[I64]>]>, TensorOf<[TensorOf<[F16]>]>, TensorOf<[TensorOf<[F32]>]>, TensorOf<[TensorOf<[F64]>]>, TensorOf<[TensorOf<[StringType]>]>, TensorOf<[TensorOf<[I1]>]>, TensorOf<[TensorOf<[Complex]>]>, TensorOf<[TensorOf<[Complex]>]>]>:$input_sequence); + let results = (outs TensorOf<[I64]>:$length); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -4700,8 +4700,8 @@ def ONNXShapeOp:ONNX_Op<"Shape", let description = [{ "Takes a tensor as input and outputs an 1D int64 tensor containing the shape of the input tensor." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$data); - let results = (outs AnyTypeOf<[TensorOf<[I64]>, MemRefOf<[I64]>]>:$shape); + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$data); + let results = (outs TensorOf<[I64]>:$shape); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -4724,10 +4724,10 @@ def ONNXShrinkOp:ONNX_Op<"Shrink", "bias. The formula of this operator is: If x < -lambd, y = x + bias;" "If x > lambd, y = x - bias; Otherwise, y = 0." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$input, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input, DefaultValuedAttr:$bias, DefaultValuedAttr:$lambd); - let results = (outs AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -4749,8 +4749,8 @@ def ONNXSigmoidOp:ONNX_Op<"Sigmoid", "(Tensor) where the sigmoid function, y = 1 / (1 + exp(-x)), is applied to the" "tensor elementwise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -4771,8 +4771,8 @@ def ONNXSignOp:ONNX_Op<"Sign", "Calculate the sign of the given input tensor element-wise." "If input > 0, output 1. if input < 0, output -1. if input == 0, output 0." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -4792,8 +4792,8 @@ def ONNXSinOp:ONNX_Op<"Sin", let description = [{ "Calculates the sine of the given input tensor, element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -4813,8 +4813,8 @@ def ONNXSinhOp:ONNX_Op<"Sinh", let description = [{ "Calculates the hyperbolic sine of the given input tensor element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -4834,8 +4834,8 @@ def ONNXSizeOp:ONNX_Op<"Size", let description = [{ "Takes a tensor as input and outputs a int64 scalar that equals to the total number of elements of the input tensor." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$data); - let results = (outs AnyTypeOf<[TensorOf<[I64]>, MemRefOf<[I64]>]>:$size); + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$data); + let results = (outs TensorOf<[I64]>:$size); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -4888,12 +4888,12 @@ def ONNXSliceOp:ONNX_Op<"Slice", " [2, 3, 4]," " ]" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$data, - AnyTypeOf<[TensorOf<[I32,I64]>, MemRefOf<[I32,I64]>]>:$starts, - AnyTypeOf<[TensorOf<[I32,I64]>, MemRefOf<[I32,I64]>]>:$ends, - AnyTypeOf<[TensorOf<[I32,I64]>, MemRefOf<[I32,I64]>, NoneType]>:$axes, - AnyTypeOf<[TensorOf<[I32,I64]>, MemRefOf<[I32,I64]>, NoneType]>:$steps); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$data, + AnyTypeOf<[TensorOf<[I32]>, TensorOf<[I64]>]>:$starts, + AnyTypeOf<[TensorOf<[I32]>, TensorOf<[I64]>]>:$ends, + AnyTypeOf<[TensorOf<[I32]>, TensorOf<[I64]>, NoneType]>:$axes, + AnyTypeOf<[TensorOf<[I32]>, TensorOf<[I64]>, NoneType, NoneType]>:$steps); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 5; @@ -4926,9 +4926,9 @@ def ONNXSoftmaxOp:ONNX_Op<"Softmax", "will throw errors. The output tensor has the same shape" "and contains the softmax values of the corresponding input." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input, DefaultValuedAttr:$axis); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -4950,8 +4950,8 @@ def ONNXSoftplusOp:ONNX_Op<"Softplus", "(Tensor) where the softplus function, y = ln(exp(x) + 1), is applied to" "the tensor elementwise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -4971,8 +4971,8 @@ def ONNXSoftsignOp:ONNX_Op<"Softsign", let description = [{ "Calculates the softsign (x/(1+|x|)) of the given input tensor element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -4994,9 +4994,9 @@ def ONNXSpaceToDepthOp:ONNX_Op<"SpaceToDepth", "this op outputs a copy of the input tensor where values from the height and width dimensions" "are moved to the depth dimension." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$input, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$input, I64Attr:$blocksize); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5018,10 +5018,10 @@ def ONNXSplitOp:ONNX_Op<"Split", "'axis'. Lengths of the parts can be specified using argument 'split'." "Otherwise, the tensor is split to equal sized parts." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$input, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$input, DefaultValuedAttr:$axis, OptionalAttr:$split); - let results = (outs Variadic>:$outputs); + let results = (outs Variadic, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>>:$outputs); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5050,11 +5050,11 @@ def ONNXSplitToSequenceOp:ONNX_Op<"SplitToSequence", "specified in 'split'. In this scenario, the sum of entries in 'split' must be equal to the" "dimension size of input tensor on 'axis'." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$input, - AnyTypeOf<[TensorOf<[I32,I64]>, MemRefOf<[I32,I64]>, NoneType]>:$split, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$input, + AnyTypeOf<[TensorOf<[I32]>, TensorOf<[I64]>, NoneType]>:$split, DefaultValuedAttr:$axis, DefaultValuedAttr:$keepdims); - let results = (outs AnyTypeOf<[AnyMemRef, TensorOf<[AnyTensor]>]>:$output_sequence); + let results = (outs AnyTypeOf<[TensorOf<[TensorOf<[UI8]>]>, TensorOf<[TensorOf<[UI16]>]>, TensorOf<[TensorOf<[UI32]>]>, TensorOf<[TensorOf<[UI64]>]>, TensorOf<[TensorOf<[I8]>]>, TensorOf<[TensorOf<[I16]>]>, TensorOf<[TensorOf<[I32]>]>, TensorOf<[TensorOf<[I64]>]>, TensorOf<[TensorOf<[F16]>]>, TensorOf<[TensorOf<[F32]>]>, TensorOf<[TensorOf<[F64]>]>, TensorOf<[TensorOf<[StringType]>]>, TensorOf<[TensorOf<[I1]>]>, TensorOf<[TensorOf<[Complex]>]>, TensorOf<[TensorOf<[Complex]>]>]>:$output_sequence); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -5076,8 +5076,8 @@ def ONNXSqrtOp:ONNX_Op<"Sqrt", "(Tensor) where the square root is, y = x^0.5, is applied to" "the tensor elementwise. If x is negative, then it will return NaN." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5100,9 +5100,9 @@ def ONNXSqueezeOp:ONNX_Op<"Squeeze", "If `axes` is not provided, all the single dimensions will be removed from" "the shape. If an axis is selected with shape entry not equal to one, an error is raised." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$data, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$data, OptionalAttr:$axes); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$squeezed); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$squeezed); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5130,12 +5130,12 @@ def ONNXStringNormalizerOp:ONNX_Op<"StringNormalizer", "If all elements in X are dropped, the output will be the empty value of string tensor with shape [1]" "if input shape is [C] and shape [1, 1] if input shape is [1, C]." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$X, + let arguments = (ins TensorOf<[StringType]>:$X, DefaultValuedAttr:$case_change_action, DefaultValuedAttr:$is_case_sensitive, OptionalAttr:$locale, OptionalAttr:$stopwords); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); + let results = (outs TensorOf<[StringType]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5157,9 +5157,9 @@ def ONNXSubOp:ONNX_Op<"Sub", "" "This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$A, - AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$B); - let results = (outs AnyTypeOf<[TensorOf<[I32,I64,F16,F32,F64]>, MemRefOf<[I32,I64,F16,F32,F64]>]>:$C); + let arguments = (ins AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$A, + AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$B); + let results = (outs AnyTypeOf<[TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$C); let builders = [ OpBuilder<"OpBuilder &builder, OperationState &state, Value A, Value B", [{ auto lhsTy = A.getType().cast(); @@ -5207,8 +5207,8 @@ def ONNXSumOp:ONNX_Op<"Sum", "All inputs and outputs must have the same data type." "This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins Variadic, MemRefOf<[F16,F32,F64]>]>>:$data_0); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$sum); + let arguments = (ins Variadic, TensorOf<[F32]>, TensorOf<[F64]>]>>:$data_0); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$sum); let extraClassDeclaration = [{ static int getNumberOfOperands() { return -1; @@ -5228,8 +5228,8 @@ def ONNXTanOp:ONNX_Op<"Tan", let description = [{ "Calculates the tangent of the given input tensor, element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5249,8 +5249,8 @@ def ONNXTanhOp:ONNX_Op<"Tanh", let description = [{ "Calculates the hyperbolic tangent of the given input tensor element-wise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$input); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$input); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5296,7 +5296,7 @@ def ONNXTfIdfVectorizerOp:ONNX_Op<"TfIdfVectorizer", "Only one of pool_strings and pool_int64s can be set. If pool_int64s is set, the input should be an integer tensor." "If pool_strings is set, the input must be a string tensor." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[StringType]>, TensorOf<[I32]>, TensorOf<[I64]>]>:$X, I64Attr:$max_gram_length, I64Attr:$max_skip_count, I64Attr:$min_gram_length, @@ -5306,7 +5306,7 @@ def ONNXTfIdfVectorizerOp:ONNX_Op<"TfIdfVectorizer", OptionalAttr:$pool_int64s, OptionalAttr:$pool_strings, OptionalAttr:$weights); - let results = (outs AnyTypeOf<[TensorOf<[F32]>, MemRefOf<[F32]>]>:$Y); + let results = (outs TensorOf<[F32]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5328,9 +5328,9 @@ def ONNXThresholdedReluOp:ONNX_Op<"ThresholdedRelu", "(Tensor) where the rectified linear function, y = x for x > alpha, y = 0 otherwise," "is applied to the tensor elementwise." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, DefaultValuedAttr:$alpha); - let results = (outs AnyTypeOf<[TensorOf<[F16,F32,F64]>, MemRefOf<[F16,F32,F64]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5352,9 +5352,9 @@ def ONNXTileOp:ONNX_Op<"Tile", "This is the same as function `tile` in Numpy, but no broadcast." "For example A = [[1, 2], [3, 4]], B = [1, 2], tile(A, B) = [[1, 2, 1, 2], [3, 4, 3, 4]]" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$input, - AnyTypeOf<[TensorOf<[I64]>, MemRefOf<[I64]>]>:$repeats); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$input, + TensorOf<[I64]>:$repeats); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -5387,13 +5387,13 @@ def ONNXTopKOp:ONNX_Op<"TopK", "Given two equivalent values, this operator uses the indices along the axis as" " a tiebreaker. That is, the element with the lower index will appear first." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$X, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$K, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, + TensorOf<[I64]>:$K, DefaultValuedAttr:$axis, DefaultValuedAttr:$largest, DefaultValuedAttr:$sorted); - let results = (outs AnyTypeOf<[TensorOf<[I8,I16,I32,I64,F16,F32,F64]>, MemRefOf<[I8,I16,I32,I64,F16,F32,F64]>]>:$Values, - AnyTypeOf<[TensorOf<[I64]>, MemRefOf<[I64]>]>:$Indices); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$Values, + TensorOf<[I64]>:$Indices); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -5415,9 +5415,9 @@ def ONNXTransposeOp:ONNX_Op<"Transpose", "perm=(1, 0, 2), given an input tensor of shape (1, 2, 3), the output shape" "will be (2, 1, 3)." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$data, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$data, OptionalAttr:$perm); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$transposed); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$transposed); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5511,13 +5511,13 @@ def ONNXUniqueOp:ONNX_Op<"Unique", "" " output_counts = [2 1 1]" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$X, OptionalAttr:$axis, DefaultValuedAttr:$sorted); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y, - AnyTypeOf<[AnyMemRef, AnyTensor, NoneType]>:$indices, - AnyTypeOf<[AnyMemRef, AnyTensor, NoneType]>:$inverse_indices, - AnyTypeOf<[AnyMemRef, AnyTensor, NoneType]>:$counts); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$Y, + AnyTypeOf<[TensorOf<[I64]>, NoneType]>:$indices, + AnyTypeOf<[TensorOf<[I64]>, NoneType]>:$inverse_indices, + AnyTypeOf<[TensorOf<[I64]>, NoneType]>:$counts); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5548,9 +5548,9 @@ def ONNXUnsqueezeOp:ONNX_Op<"Unsqueeze", "The order of values in `axes` does not matter and can come in any order. " "" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$data, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$data, I64ArrayAttr:$axes); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$expanded); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$expanded); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5572,10 +5572,10 @@ def ONNXUpsampleOp:ONNX_Op<"Upsample", "Each dimension value of the output tensor is:" " output_dimension = floor(input_dimension * scale)." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$X, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$scales, + let arguments = (ins AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$X, + TensorOf<[F32]>:$scales, DefaultValuedAttr:$mode); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -5598,10 +5598,10 @@ def ONNXWhereOp:ONNX_Op<"Where", " Where behaves like numpy.where with three parameters:" " https://docs.scipy.org/doc/numpy/reference/generated/numpy.where.html" }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$condition, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$X, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$output); + let arguments = (ins TensorOf<[I1]>:$condition, + AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$X, + AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[UI8]>, TensorOf<[UI16]>, TensorOf<[UI32]>, TensorOf<[UI64]>, TensorOf<[I8]>, TensorOf<[I16]>, TensorOf<[I32]>, TensorOf<[I64]>, TensorOf<[F16]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>, TensorOf<[I1]>, TensorOf<[Complex]>, TensorOf<[Complex]>]>:$output); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 3; @@ -5624,9 +5624,9 @@ def ONNXXorOp:ONNX_Op<"Xor", "" "This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check [the doc](Broadcasting.md)." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$A, - AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$B); - let results = (outs AnyTypeOf<[TensorOf<[I1]>, MemRefOf<[I1]>]>:$C); + let arguments = (ins TensorOf<[I1]>:$A, + TensorOf<[I1]>:$B); + let results = (outs TensorOf<[I1]>:$C); let builders = [ OpBuilder<"OpBuilder &builder, OperationState &state, Value A, Value B", [{ auto lhsTy = A.getType().cast(); @@ -5673,9 +5673,9 @@ def ONNXArrayFeatureExtractorOp:ONNX_Op<"ArrayFeatureExtractor", "Select elements of the input tensor based on the indices passed.
" " The indices are applied to the last axes of the tensor." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$X, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Z); + let arguments = (ins AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I64]>, TensorOf<[I32]>, TensorOf<[StringType]>]>:$X, + TensorOf<[I64]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I64]>, TensorOf<[I32]>, TensorOf<[StringType]>]>:$Z); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 2; @@ -5695,9 +5695,9 @@ def ONNXBinarizerOp:ONNX_Op<"Binarizer", let description = [{ "Maps the values of the input tensor to either 0 or 1, element-wise, based on the outcome of a comparison against a threshold value." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F32,F64,I64,I32]>, MemRefOf<[F32,F64,I64,I32]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I64]>, TensorOf<[I32]>]>:$X, DefaultValuedAttr:$threshold); - let results = (outs AnyTypeOf<[TensorOf<[F32,F64,I64,I32]>, MemRefOf<[F32,F64,I64,I32]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I64]>, TensorOf<[I32]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5719,11 +5719,11 @@ def ONNXCastMapOp:ONNX_Op<"CastMap", " in ascending order based on this key.
The operator supports dense packing or sparse packing." " If using sparse packing, the key cannot exceed the max_map-1 value." }]; - let arguments = (ins AnyTypeOf<[TupleOf<[TensorOf<[I64]>]>, MemRefOf<[I64]>]>:$X, + let arguments = (ins AnyTypeOf<[TupleOf<[I64, StringType]>, TupleOf<[I64, F32]>]>:$X, DefaultValuedAttr:$cast_to, DefaultValuedAttr:$map_form, DefaultValuedAttr:$max_map); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[StringType]>, TensorOf<[F32]>, TensorOf<[I64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5750,12 +5750,12 @@ def ONNXCategoryMapperOp:ONNX_Op<"CategoryMapper", " If the string default value is set, it will convert integers to strings." " If the int default value is set, it will convert strings to integers." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[StringType]>, TensorOf<[I64]>]>:$X, OptionalAttr:$cats_int64s, OptionalAttr:$cats_strings, DefaultValuedAttr:$default_int64, DefaultValuedAttr:$default_string); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[StringType]>, TensorOf<[I64]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5786,10 +5786,10 @@ def ONNXDictVectorizerOp:ONNX_Op<"DictVectorizer", " then an input of ``{\"a\": 4, \"c\": 8}`` will produce an output of ``[4, 8, 0, 0]``." " " }]; - let arguments = (ins AnyTypeOf<[TupleOf<[TensorOf<[I64,F32,F64]>]>, MemRefOf<[I64,F32,F64]>]>:$X, + let arguments = (ins AnyTypeOf<[TupleOf<[StringType, I64]>, TupleOf<[I64, StringType]>, TupleOf<[I64, F32]>, TupleOf<[I64, F64]>, TupleOf<[StringType, F32]>, TupleOf<[StringType, F64]>]>:$X, OptionalAttr:$int64_vocabulary, OptionalAttr:$string_vocabulary); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[I64]>, TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[StringType]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5812,9 +5812,9 @@ def ONNXFeatureVectorizerOp:ONNX_Op<"FeatureVectorizer", " Inputs are copied to the output maintaining the order of the input arguments.
" " All inputs must be integers or floats, while the output will be all floating point values." }]; - let arguments = (ins Variadic, MemRefOf<[I32,I64,F32,F64]>]>>:$X, + let arguments = (ins Variadic, TensorOf<[I64]>, TensorOf<[F32]>, TensorOf<[F64]>]>>:$X, OptionalAttr:$inputdimensions); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); + let results = (outs TensorOf<[F32]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return -1; @@ -5841,12 +5841,12 @@ def ONNXImputerOp:ONNX_Op<"Imputer", " which one depends on whether floats or integers are being processed.
" " The imputed_value attribute length can be 1 element, or it can have one element per input feature.
In other words, if the input tensor has the shape [*,F], then the length of the attribute array may be 1 or F. If it is 1, then it is broadcast along the last dimension and applied to each feature." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F32,F64,I64,I32]>, MemRefOf<[F32,F64,I64,I32]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I64]>, TensorOf<[I32]>]>:$X, OptionalAttr:$imputed_value_floats, OptionalAttr:$imputed_value_int64s, DefaultValuedAttr:$replaced_value_float, DefaultValuedAttr:$replaced_value_int64); - let results = (outs AnyTypeOf<[TensorOf<[F32,F64,I64,I32]>, MemRefOf<[F32,F64,I64,I32]>]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I64]>, TensorOf<[I32]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5882,7 +5882,7 @@ def ONNXLabelEncoderOp:ONNX_Op<"LabelEncoder", " For key look-up, bit-wise comparison is used so even a float NaN can be" " mapped to a value in 'values_*' attribute.
" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[StringType]>, TensorOf<[I64]>, TensorOf<[F32]>]>:$X, DefaultValuedAttr:$default_float, DefaultValuedAttr:$default_int64, DefaultValuedAttr:$default_string, @@ -5892,7 +5892,7 @@ def ONNXLabelEncoderOp:ONNX_Op<"LabelEncoder", OptionalAttr:$values_floats, OptionalAttr:$values_int64s, OptionalAttr:$values_strings); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); + let results = (outs AnyTypeOf<[TensorOf<[StringType]>, TensorOf<[I64]>, TensorOf<[F32]>]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5912,15 +5912,15 @@ def ONNXLinearClassifierOp:ONNX_Op<"LinearClassifier", let description = [{ "Linear classifier" }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F32,F64,I64,I32]>, MemRefOf<[F32,F64,I64,I32]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I64]>, TensorOf<[I32]>]>:$X, OptionalAttr:$classlabels_ints, OptionalAttr:$classlabels_strings, F32ArrayAttr:$coefficients, OptionalAttr:$intercepts, DefaultValuedAttr:$multi_class, DefaultValuedAttr:$post_transform); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$Z); + let results = (outs AnyTypeOf<[TensorOf<[StringType]>, TensorOf<[I64]>]>:$Y, + TensorOf<[F32]>:$Z); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5945,12 +5945,12 @@ def ONNXLinearRegressorOp:ONNX_Op<"LinearRegressor", " The coefficients array is of length n, and the coefficients for each target are contiguous." " Intercepts are optional but if provided must match the number of targets." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F32,F64,I64,I32]>, MemRefOf<[F32,F64,I64,I32]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I64]>, TensorOf<[I32]>]>:$X, OptionalAttr:$coefficients, OptionalAttr:$intercepts, DefaultValuedAttr:$post_transform, DefaultValuedAttr:$targets); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); + let results = (outs TensorOf<[F32]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -5979,9 +5979,9 @@ def ONNXNormalizerOp:ONNX_Op<"Normalizer", " For batches, that is, [N,C] tensors, normalization is done along the C axis. In other words, each row" " of the batch is normalized independently." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F32,F64,I64,I32]>, MemRefOf<[F32,F64,I64,I32]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I64]>, TensorOf<[I32]>]>:$X, DefaultValuedAttr:$norm); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); + let results = (outs TensorOf<[F32]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -6008,11 +6008,11 @@ def ONNXOneHotEncoderOp:ONNX_Op<"OneHotEncoder", " If the input is a tensor of float, int32, or double, the data will be cast" " to integers and the cats_int64s category list will be used for the lookups." }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[StringType]>, TensorOf<[I64]>, TensorOf<[I32]>, TensorOf<[F32]>, TensorOf<[F64]>]>:$X, OptionalAttr:$cats_int64s, OptionalAttr:$cats_strings, DefaultValuedAttr:$zeros); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); + let results = (outs TensorOf<[F32]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -6032,7 +6032,7 @@ def ONNXSVMClassifierOp:ONNX_Op<"SVMClassifier", let description = [{ "Support Vector Machine classifier" }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F32,F64,I64,I32]>, MemRefOf<[F32,F64,I64,I32]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I64]>, TensorOf<[I32]>]>:$X, OptionalAttr:$classlabels_ints, OptionalAttr:$classlabels_strings, OptionalAttr:$coefficients, @@ -6044,8 +6044,8 @@ def ONNXSVMClassifierOp:ONNX_Op<"SVMClassifier", OptionalAttr:$rho, OptionalAttr:$support_vectors, OptionalAttr:$vectors_per_class); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$Z); + let results = (outs AnyTypeOf<[TensorOf<[StringType]>, TensorOf<[I64]>]>:$Y, + TensorOf<[F32]>:$Z); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -6065,7 +6065,7 @@ def ONNXSVMRegressorOp:ONNX_Op<"SVMRegressor", let description = [{ "Support Vector Machine regression prediction and one-class SVM anomaly detection." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F32,F64,I64,I32]>, MemRefOf<[F32,F64,I64,I32]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I64]>, TensorOf<[I32]>]>:$X, OptionalAttr:$coefficients, OptionalAttr:$kernel_params, DefaultValuedAttr:$kernel_type, @@ -6074,7 +6074,7 @@ def ONNXSVMRegressorOp:ONNX_Op<"SVMRegressor", DefaultValuedAttr:$post_transform, OptionalAttr:$rho, OptionalAttr:$support_vectors); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); + let results = (outs TensorOf<[F32]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -6094,10 +6094,10 @@ def ONNXScalerOp:ONNX_Op<"Scaler", let description = [{ "Rescale input data, for example to standardize features by removing the mean and scaling to unit variance." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F32,F64,I64,I32]>, MemRefOf<[F32,F64,I64,I32]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I64]>, TensorOf<[I32]>]>:$X, OptionalAttr:$offset, OptionalAttr:$scale); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); + let results = (outs TensorOf<[F32]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -6125,7 +6125,7 @@ def ONNXTreeEnsembleClassifierOp:ONNX_Op<"TreeEnsembleClassifier", " One and only one of classlabels_strings or classlabels_int64s" " will be defined. The class_ids are indices into this list." }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F32,F64,I64,I32]>, MemRefOf<[F32,F64,I64,I32]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I64]>, TensorOf<[I32]>]>:$X, OptionalAttr:$base_values, OptionalAttr:$class_ids, OptionalAttr:$class_nodeids, @@ -6143,8 +6143,8 @@ def ONNXTreeEnsembleClassifierOp:ONNX_Op<"TreeEnsembleClassifier", OptionalAttr:$nodes_truenodeids, OptionalAttr:$nodes_values, DefaultValuedAttr:$post_transform); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y, - AnyTypeOf<[AnyMemRef, AnyTensor]>:$Z); + let results = (outs AnyTypeOf<[TensorOf<[StringType]>, TensorOf<[I64]>]>:$Y, + TensorOf<[F32]>:$Z); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -6173,7 +6173,7 @@ def ONNXTreeEnsembleRegressorOp:ONNX_Op<"TreeEnsembleRegressor", " All trees must have their node ids start at 0 and increment by 1.
" " Mode enum is BRANCH_LEQ, BRANCH_LT, BRANCH_GTE, BRANCH_GT, BRANCH_EQ, BRANCH_NEQ, LEAF" }]; - let arguments = (ins AnyTypeOf<[TensorOf<[F32,F64,I64,I32]>, MemRefOf<[F32,F64,I64,I32]>]>:$X, + let arguments = (ins AnyTypeOf<[TensorOf<[F32]>, TensorOf<[F64]>, TensorOf<[I64]>, TensorOf<[I32]>]>:$X, DefaultValuedAttr:$aggregate_function, OptionalAttr:$base_values, OptionalAttr:$n_targets, @@ -6191,7 +6191,7 @@ def ONNXTreeEnsembleRegressorOp:ONNX_Op<"TreeEnsembleRegressor", OptionalAttr:$target_nodeids, OptionalAttr:$target_treeids, OptionalAttr:$target_weights); - let results = (outs AnyTypeOf<[AnyMemRef, AnyTensor]>:$Y); + let results = (outs TensorOf<[F32]>:$Y); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; @@ -6214,10 +6214,10 @@ def ONNXZipMapOp:ONNX_Op<"ZipMap", " Must provide keys in either classlabels_strings or classlabels_int64s (but not both).
" " The columns of the tensor correspond one-by-one to the keys specified by the attributes. There must be as many columns as keys.
" }]; - let arguments = (ins AnyTypeOf<[AnyMemRef, AnyTensor]>:$X, + let arguments = (ins TensorOf<[F32]>:$X, OptionalAttr:$classlabels_int64s, OptionalAttr:$classlabels_strings); - let results = (outs AnyTypeOf<[TensorOf<[TensorOf<[F32,I64]>]>, MemRefOf<[F32,I64]>]>:$Z); + let results = (outs AnyTypeOf<[TensorOf<[TupleOf<[StringType, F32]>]>, TensorOf<[TupleOf<[I64, F32]>]>]>:$Z); let extraClassDeclaration = [{ static int getNumberOfOperands() { return 1; diff --git a/src/Dialect/ONNX/ONNXOpsHelper.cpp b/src/Dialect/ONNX/ONNXOpsHelper.cpp index 5961495..0ca9208 100644 --- a/src/Dialect/ONNX/ONNXOpsHelper.cpp +++ b/src/Dialect/ONNX/ONNXOpsHelper.cpp @@ -10,8 +10,11 @@ #include "ONNXOpsHelper.hpp" +#include "ONNXOps.hpp" + // Identity affine using namespace mlir; +using namespace mlir::onnxmlir; AffineMap getIdentityDimMap(Builder &builder) { return AffineMap::get(1, 0, {builder.getAffineDimExpr(0)}); } @@ -55,21 +58,26 @@ mlir::Type convertONNXTypeToMLIRType( case onnx::TensorProto_DataType::TensorProto_DataType_DOUBLE: return builder_.getF64Type(); case onnx::TensorProto_DataType::TensorProto_DataType_INT8: - case onnx::TensorProto_DataType::TensorProto_DataType_UINT8: return builder_.getIntegerType(/*width=*/8); + case onnx::TensorProto_DataType::TensorProto_DataType_UINT8: + return builder_.getIntegerType(/*width=*/8, false); case onnx::TensorProto_DataType::TensorProto_DataType_INT16: - case onnx::TensorProto_DataType::TensorProto_DataType_UINT16: return builder_.getIntegerType(/*width=*/16); + case onnx::TensorProto_DataType::TensorProto_DataType_UINT16: + return builder_.getIntegerType(/*width=*/16, false); case onnx::TensorProto_DataType::TensorProto_DataType_INT32: - case onnx::TensorProto_DataType::TensorProto_DataType_UINT32: return builder_.getIntegerType(/*width=*/32); + case onnx::TensorProto_DataType::TensorProto_DataType_UINT32: + return builder_.getIntegerType(/*width=*/32, false); case onnx::TensorProto_DataType::TensorProto_DataType_INT64: - case onnx::TensorProto_DataType::TensorProto_DataType_UINT64: return builder_.getIntegerType(/*width=*/64); + case onnx::TensorProto_DataType::TensorProto_DataType_UINT64: + return builder_.getIntegerType(/*width=*/64, false); case onnx::TensorProto_DataType::TensorProto_DataType_BOOL: return builder_.getI1Type(); - case onnx::TensorProto_DataType::TensorProto_DataType_STRING: + return StringType::get(builder_.getContext()); + case onnx::TensorProto_DataType::TensorProto_DataType_COMPLEX64: case onnx::TensorProto_DataType::TensorProto_DataType_COMPLEX128: case onnx::TensorProto_DataType::TensorProto_DataType_UNDEFINED: diff --git a/test/mlir/krnl/reshape.mlir b/test/mlir/krnl/reshape.mlir index 42e183a..8a055b5 100644 --- a/test/mlir/krnl/reshape.mlir +++ b/test/mlir/krnl/reshape.mlir @@ -2,8 +2,8 @@ // ----- -func @test_reshape(%arg0 : tensor, %arg1 : tensor<4xi32>) -> tensor<*xf32> { - %0 = "onnx.Reshape"(%arg0, %arg1) : (tensor, tensor<4xi32>) -> tensor<*xf32> +func @test_reshape(%arg0 : tensor, %arg1 : tensor<4xi64>) -> tensor<*xf32> { + %0 = "onnx.Reshape"(%arg0, %arg1) : (tensor, tensor<4xi64>) -> tensor<*xf32> "std.return"(%0) : (tensor<*xf32>) -> () // CHECK: llvm.func @llvm.memcpy.p0i8.p0i8.i64(!llvm<"i8*">, !llvm<"i8*">, !llvm.i64, !llvm.i1) diff --git a/test/mlir/onnx/onnx_lowering.mlir b/test/mlir/onnx/onnx_lowering.mlir index 3e3ed4a..f32aa5b 100644 --- a/test/mlir/onnx/onnx_lowering.mlir +++ b/test/mlir/onnx/onnx_lowering.mlir @@ -397,8 +397,8 @@ func @test_relu(%arg0 : tensor) -> tensor<*xf32> { // ----- -func @test_reshape(%arg0 : tensor, %arg1 : tensor<4xi32>) -> tensor<*xf32> { - %0 = "onnx.Reshape"(%arg0, %arg1) : (tensor, tensor<4xi32>) -> tensor<*xf32> +func @test_reshape(%arg0 : tensor, %arg1 : tensor<4xi64>) -> tensor<*xf32> { + %0 = "onnx.Reshape"(%arg0, %arg1) : (tensor, tensor<4xi64>) -> tensor<*xf32> "std.return"(%0) : (tensor<*xf32>) -> () // CHECK-LABEL: test_reshape @@ -411,56 +411,52 @@ func @test_reshape(%arg0 : tensor, %arg1 : tensor<4xi32>) -> tensor<*x // CHECK: [[TYPE_IN_BYTES_1:%.+]] = constant 4 : i64 // CHECK: %[[CONSTANT_1:.+]] = constant 0 : index - // CHECK: [[LOAD_0:%.+]] = load %arg1[%[[CONSTANT_1]]] : memref<4xi32> + // CHECK: [[LOAD_0:%.+]] = load %arg1[%[[CONSTANT_1]]] : memref<4xi64> // CHECK: [[DIM_1:%.+]] = dim %arg0, 0 : memref - // CHECK: [[DIM_1_CAST:%.+]] = index_cast [[DIM_1]] : index to i32 - // CHECK: [[CONSTANT_2:%.+]] = constant 0 : i32 - // CHECK: [[CMP_0:%.+]] = cmpi "eq", [[LOAD_0]], [[CONSTANT_2]] : i32 - // CHECK: [[SELECT_0:%.+]] = select [[CMP_0]], [[DIM_1_CAST]], [[LOAD_0]] : i32 - // CHECK: [[ZEXTI_0:%.+]] = zexti [[SELECT_0]] : i32 to i64 - // CHECK: [[MUL_1:%.+]] = muli [[TYPE_IN_BYTES_1]], [[ZEXTI_0]] : i64 + // CHECK: [[DIM_1_CAST:%.+]] = index_cast [[DIM_1]] : index to i64 + // CHECK: [[CONSTANT_2:%.+]] = constant 0 : i64 + // CHECK: [[CMP_0:%.+]] = cmpi "eq", [[LOAD_0]], [[CONSTANT_2]] : i64 + // CHECK: [[SELECT_0:%.+]] = select [[CMP_0]], [[DIM_1_CAST]], [[LOAD_0]] : i64 + // CHECK: [[MUL_1:%.+]] = muli [[TYPE_IN_BYTES_1]], [[SELECT_0]] : i64 // CHECK: %[[CONSTANT_3:.+]] = constant 1 : index - // CHECK: [[LOAD_1:%.+]] = load %arg1[%[[CONSTANT_3]]] : memref<4xi32> - // CHECK: [[CONSTANT_3:%.+]] = constant 10 : i32 - // CHECK: [[CONSTANT_4:%.+]] = constant 0 : i32 - // CHECK: [[CMP_1:%.+]] = cmpi "eq", [[LOAD_1]], [[CONSTANT_4]] : i32 - // CHECK: [[SELECT_1:%.+]] = select [[CMP_1]], [[CONSTANT_3]], [[LOAD_1]] : i32 - // CHECK: [[ZEXTI_1:%.+]] = zexti [[SELECT_1]] : i32 to i64 - // CHECK: [[MUL_2:%.+]] = muli [[MUL_1]], [[ZEXTI_1]] : i64 + // CHECK: [[LOAD_1:%.+]] = load %arg1[%[[CONSTANT_3]]] : memref<4xi64> + // CHECK: [[CONSTANT_3:%.+]] = constant 10 : i64 + // CHECK: [[CONSTANT_4:%.+]] = constant 0 : i64 + // CHECK: [[CMP_1:%.+]] = cmpi "eq", [[LOAD_1]], [[CONSTANT_4]] : i64 + // CHECK: [[SELECT_1:%.+]] = select [[CMP_1]], [[CONSTANT_3]], [[LOAD_1]] : i64 + // CHECK: [[MUL_2:%.+]] = muli [[MUL_1]], [[SELECT_1]] : i64 // CHECK: %[[CONSTANT_5:.+]] = constant 2 : index - // CHECK: [[LOAD_2:%.+]] = load %arg1[%[[CONSTANT_5]]] : memref<4xi32> - // CHECK: [[ZEXTI_2:%.+]] = zexti [[LOAD_2]] : i32 to i64 - // CHECK: [[MUL_3:%.+]] = muli [[MUL_2]], [[ZEXTI_2]] : i64 + // CHECK: [[LOAD_2:%.+]] = load %arg1[%[[CONSTANT_5]]] : memref<4xi64> + // CHECK: [[MUL_3:%.+]] = muli [[MUL_2]], [[LOAD_2]] : i64 // CHECK: %[[CONSTANT_6:.+]] = constant 3 : index - // CHECK: [[LOAD_3:%.+]] = load %arg1[%[[CONSTANT_6]]] : memref<4xi32> - // CHECK: [[ZEXTI_3:%.+]] = zexti [[LOAD_3]] : i32 to i64 - // CHECK: [[MUL_4:%.+]] = muli [[MUL_3]], [[ZEXTI_3]] : i64 + // CHECK: [[LOAD_3:%.+]] = load %arg1[%[[CONSTANT_6]]] : memref<4xi64> + // CHECK: [[MUL_4:%.+]] = muli [[MUL_3]], [[LOAD_3]] : i64 // CHECK: [[CONSTANT_7:%.+]] = constant 0 : i64 // CHECK: [[SUB_0:%.+]] = subi [[CONSTANT_7]], [[MUL_4]] : i64 // CHECK: [[CONSTANT_8:%.+]] = constant -1 : i64 - // CHECK: [[CMP_2:%.+]] = cmpi "eq", [[ZEXTI_0]], [[CONSTANT_8]] : i64 + // CHECK: [[CMP_2:%.+]] = cmpi "eq", [[SELECT_0]], [[CONSTANT_8]] : i64 // CHECK: [[DIVISIGNED_0:%.+]] = divi_signed [[TENSOR_SIZE]], [[SUB_0]] : i64 - // CHECK: [[SELECT_2:%.+]] = select [[CMP_2]], [[DIVISIGNED_0]], [[ZEXTI_0]] : i64 + // CHECK: [[SELECT_2:%.+]] = select [[CMP_2]], [[DIVISIGNED_0]], [[SELECT_0]] : i64 // CHECK: [[CAST_0:%.+]] = index_cast [[SELECT_2]] : i64 to index - // CHECK: [[CMP_3:%.+]] = cmpi "eq", [[ZEXTI_1]], [[CONSTANT_8]] : i64 + // CHECK: [[CMP_3:%.+]] = cmpi "eq", [[SELECT_1]], [[CONSTANT_8]] : i64 // CHECK: [[DIVISIGNED_1:%.+]] = divi_signed [[TENSOR_SIZE]], [[SUB_0]] : i64 - // CHECK: [[SELECT_3:%.+]] = select [[CMP_3]], [[DIVISIGNED_1]], [[ZEXTI_1]] : i64 + // CHECK: [[SELECT_3:%.+]] = select [[CMP_3]], [[DIVISIGNED_1]], [[SELECT_1]] : i64 // CHECK: [[CAST_1:%.+]] = index_cast [[SELECT_3]] : i64 to index - // CHECK: [[CMP_4:%.+]] = cmpi "eq", [[ZEXTI_2]], [[CONSTANT_8]] : i64 + // CHECK: [[CMP_4:%.+]] = cmpi "eq", [[LOAD_2]], [[CONSTANT_8]] : i64 // CHECK: [[DIVISIGNED_2:%.+]] = divi_signed [[TENSOR_SIZE]], [[SUB_0]] : i64 - // CHECK: [[SELECT_4:%.+]] = select [[CMP_4]], [[DIVISIGNED_2]], [[ZEXTI_2]] : i64 + // CHECK: [[SELECT_4:%.+]] = select [[CMP_4]], [[DIVISIGNED_2]], [[LOAD_2]] : i64 // CHECK: [[CAST_2:%.+]] = index_cast [[SELECT_4]] : i64 to index - // CHECK: [[CMP_5:%.+]] = cmpi "eq", [[ZEXTI_3]], [[CONSTANT_8]] : i64 + // CHECK: [[CMP_5:%.+]] = cmpi "eq", [[LOAD_3]], [[CONSTANT_8]] : i64 // CHECK: [[DIVISIGNED_3:%.+]] = divi_signed [[TENSOR_SIZE]], [[SUB_0]] : i64 - // CHECK: [[SELECT_5:%.+]] = select [[CMP_5]], [[DIVISIGNED_3]], [[ZEXTI_3]] : i64 + // CHECK: [[SELECT_5:%.+]] = select [[CMP_5]], [[DIVISIGNED_3]], [[LOAD_3]] : i64 // CHECK: [[CAST_3:%.+]] = index_cast [[SELECT_5]] : i64 to index // CHECK: [[ALLOC:%.+]] = alloc([[CAST_0]], [[CAST_1]], [[CAST_2]], [[CAST_3]]) : memref diff --git a/test/mlir/onnx/onnx_shape_inference.mlir b/test/mlir/onnx/onnx_shape_inference.mlir index d302418..f38fbd5 100644 --- a/test/mlir/onnx/onnx_shape_inference.mlir +++ b/test/mlir/onnx/onnx_shape_inference.mlir @@ -542,48 +542,48 @@ func @test_default_averagepool_strides_nonunifpad_ceil(%arg0 : tensor<5x5x30x32x /// Test the reshape op inference when constants are present. //===----------------------------------------------------------------------===// -func @test_reshape_dynamic(%arg0 : tensor<5x5x1x32xf32>, %arg1 : tensor<4xi32>) -> tensor<*xf32> { - %0 = "onnx.Reshape"(%arg0, %arg1) : (tensor<5x5x1x32xf32>, tensor<4xi32>) -> tensor<*xf32> +func @test_reshape_dynamic(%arg0 : tensor<5x5x1x32xf32>, %arg1 : tensor<4xi64>) -> tensor<*xf32> { + %0 = "onnx.Reshape"(%arg0, %arg1) : (tensor<5x5x1x32xf32>, tensor<4xi64>) -> tensor<*xf32> "std.return"(%0) : (tensor<*xf32>) -> () // CHECK-LABEL: test_reshape_dynamic - // CHECK: [[RES:%.+]] = "onnx.Reshape"(%arg0, %arg1) : (tensor<5x5x1x32xf32>, tensor<4xi32>) -> tensor + // CHECK: [[RES:%.+]] = "onnx.Reshape"(%arg0, %arg1) : (tensor<5x5x1x32xf32>, tensor<4xi64>) -> tensor // CHECK: return [[RES]] : tensor } // ----- func @test_reshape_1(%arg0 : tensor<5x5x1x32xf32>) -> tensor<*xf32> { - %0 = "onnx.Constant"() {value = dense<[5, 5, 16, 2]> : tensor<4xi32> } : () -> tensor<4xi32> - %1 = "onnx.Reshape"(%arg0, %0) : (tensor<5x5x1x32xf32>, tensor<4xi32>) -> tensor<*xf32> + %0 = "onnx.Constant"() {value = dense<[5, 5, 16, 2]> : tensor<4xi64> } : () -> tensor<4xi64> + %1 = "onnx.Reshape"(%arg0, %0) : (tensor<5x5x1x32xf32>, tensor<4xi64>) -> tensor<*xf32> "std.return"(%1) : (tensor<*xf32>) -> () // CHECK-LABEL: test_reshape_1 - // CHECK: [[RES:%.+]] = "onnx.Reshape"(%arg0, %0) : (tensor<5x5x1x32xf32>, tensor<4xi32>) -> tensor<5x5x16x2xf32> + // CHECK: [[RES:%.+]] = "onnx.Reshape"(%arg0, %0) : (tensor<5x5x1x32xf32>, tensor<4xi64>) -> tensor<5x5x16x2xf32> // CHECK: return [[RES]] : tensor<5x5x16x2xf32> } // ----- func @test_reshape_2(%arg0 : tensor<5x5x1x32xf32>) -> tensor<*xf32> { - %0 = "onnx.Constant"() {value = dense<[-1, 16, 2]> : tensor<3xi32> } : () -> tensor<3xi32> - %1 = "onnx.Reshape"(%arg0, %0) : (tensor<5x5x1x32xf32>, tensor<3xi32>) -> tensor<*xf32> + %0 = "onnx.Constant"() {value = dense<[-1, 16, 2]> : tensor<3xi64> } : () -> tensor<3xi64> + %1 = "onnx.Reshape"(%arg0, %0) : (tensor<5x5x1x32xf32>, tensor<3xi64>) -> tensor<*xf32> "std.return"(%1) : (tensor<*xf32>) -> () // CHECK-LABEL: test_reshape_2 - // CHECK: [[RES:%.+]] = "onnx.Reshape"(%arg0, %0) : (tensor<5x5x1x32xf32>, tensor<3xi32>) -> tensor<25x16x2xf32> + // CHECK: [[RES:%.+]] = "onnx.Reshape"(%arg0, %0) : (tensor<5x5x1x32xf32>, tensor<3xi64>) -> tensor<25x16x2xf32> // CHECK: return [[RES]] : tensor<25x16x2xf32> } // ----- func @test_reshape_3(%arg0 : tensor<5x5x1x32xf32>) -> tensor<*xf32> { - %0 = "onnx.Constant"() {value = dense<[-1, 0, 2]> : tensor<3xi32> } : () -> tensor<3xi32> - %1 = "onnx.Reshape"(%arg0, %0) : (tensor<5x5x1x32xf32>, tensor<3xi32>) -> tensor<*xf32> + %0 = "onnx.Constant"() {value = dense<[-1, 0, 2]> : tensor<3xi64> } : () -> tensor<3xi64> + %1 = "onnx.Reshape"(%arg0, %0) : (tensor<5x5x1x32xf32>, tensor<3xi64>) -> tensor<*xf32> "std.return"(%1) : (tensor<*xf32>) -> () // CHECK-LABEL: test_reshape_3 - // CHECK: [[RES:%.+]] = "onnx.Reshape"(%arg0, %0) : (tensor<5x5x1x32xf32>, tensor<3xi32>) -> tensor<80x5x2xf32> + // CHECK: [[RES:%.+]] = "onnx.Reshape"(%arg0, %0) : (tensor<5x5x1x32xf32>, tensor<3xi64>) -> tensor<80x5x2xf32> // CHECK: return [[RES]] : tensor<80x5x2xf32> } @@ -904,13 +904,13 @@ func @test_cast_2(%arg0 : tensor<2x3x4xf32>) -> tensor<*xui8> { "std.return"(%1) : (tensor<*xui8>) -> () // CHECK-LABEL: test_cast_2 - // CHECK: [[RES:%.+]] = "onnx.Cast"(%arg0) {to = 2 : i64} : (tensor<2x3x4xf32>) -> tensor<2x3x4xi8> - // CHECK: return [[RES]] : tensor<2x3x4xi8> + // CHECK: [[RES:%.+]] = "onnx.Cast"(%arg0) {to = 2 : i64} : (tensor<2x3x4xf32>) -> tensor<2x3x4xui8> + // CHECK: return [[RES]] : tensor<2x3x4xui8> } -func @test_cast_3(%arg0 : tensor<2x3x4xf32>) -> tensor<*xsi8> { - %1 = "onnx.Cast"(%arg0) {to = 3} : (tensor<2x3x4xf32>) -> tensor<*xsi8> - "std.return"(%1) : (tensor<*xsi8>) -> () +func @test_cast_3(%arg0 : tensor<2x3x4xf32>) -> tensor<*xi8> { + %1 = "onnx.Cast"(%arg0) {to = 3} : (tensor<2x3x4xf32>) -> tensor<*xi8> + "std.return"(%1) : (tensor<*xi8>) -> () // CHECK-LABEL: test_cast_3 // CHECK: [[RES:%.+]] = "onnx.Cast"(%arg0) {to = 3 : i64} : (tensor<2x3x4xf32>) -> tensor<2x3x4xi8> @@ -930,30 +930,33 @@ func @test_cast_10(%arg0 : tensor<2x3x4xf32>) -> tensor<*xf16> { /// Test the quantization op inferences. //===----------------------------------------------------------------------===// -func @test_dyn_quantize_linear_1(%arg0 : tensor<5x2x3x4xf32>) -> tensor<*xi8> { - %1:3 = "onnx.DynamicQuantizeLinear"(%arg0) {} : (tensor<5x2x3x4xf32>) -> (tensor<*xi8>, tensor<*xi8>, tensor<*xi8>) - "std.return"(%1#0) {} : (tensor<*xi8>) -> () +// TOFIX +// This test case is commented out because the #1 output should be tensor +// but tensor is generated +func @test_dyn_quantize_linear_1(%arg0 : tensor<5x2x3x4xf32>) -> tensor<*xui8> { + %1:3 = "onnx.DynamicQuantizeLinear"(%arg0) {} : (tensor<5x2x3x4xf32>) -> (tensor<*xui8>, tensor<*xf32>, tensor<*xui8>) + "std.return"(%1#0) {} : (tensor<*xui8>) -> () - // CHECK-LABEL: test_dyn_quantize_linear_1 - // CHECK: [[RES:%.+]], {{.*}}, {{.*}} = "onnx.DynamicQuantizeLinear"(%arg0) : (tensor<5x2x3x4xf32>) -> (tensor<5x2x3x4xi8>, tensor, tensor) - // CHECK: return [[RES]] : tensor<5x2x3x4xi8> + // CHECK-LABEL: test_dyn_quantize_linear_1 + // CHECK: [[RES:%.+]], {{.*}}, {{.*}} = "onnx.DynamicQuantizeLinear"(%arg0) : (tensor<5x2x3x4xf32>) -> (tensor<5x2x3x4xui8>, tensor, tensor) + // CHECK: return [[RES]] : tensor<5x2x3x4xui8> } -func @test_quantize_linear_1(%arg0 : tensor<5x2x3x4xf32>, %arg1 : tensor, %arg2 : tensor) -> tensor<*xi8> { - %1 = "onnx.QuantizeLinear"(%arg0, %arg1, %arg2) {} : (tensor<5x2x3x4xf32>, tensor, tensor) -> tensor<*xi8> +func @test_quantize_linear_1(%arg0 : tensor<5x2x3x4xf32>, %arg1 : tensor, %arg2 : tensor) -> tensor<*xi8> { + %1 = "onnx.QuantizeLinear"(%arg0, %arg1, %arg2) {} : (tensor<5x2x3x4xf32>, tensor, tensor) -> tensor<*xi8> "std.return"(%1) {} : (tensor<*xi8>) -> () // CHECK-LABEL: test_quantize_linear_1 - // CHECK: [[RES:%.+]] = "onnx.QuantizeLinear"(%arg0, %arg1, %arg2) : (tensor<5x2x3x4xf32>, tensor, tensor) -> tensor<5x2x3x4xi8> + // CHECK: [[RES:%.+]] = "onnx.QuantizeLinear"(%arg0, %arg1, %arg2) : (tensor<5x2x3x4xf32>, tensor, tensor) -> tensor<5x2x3x4xi8> // CHECK: return [[RES]] : tensor<5x2x3x4xi8> } -func @test_dequantize_linear_1(%arg0 : tensor<5x2x3x4xi8>, %arg1 : tensor, %arg2 : tensor) -> tensor<*xf32> { - %1 = "onnx.DequantizeLinear"(%arg0, %arg1, %arg2) {} : (tensor<5x2x3x4xi8>, tensor, tensor) -> tensor<*xf32> +func @test_dequantize_linear_1(%arg0 : tensor<5x2x3x4xi8>, %arg1 : tensor, %arg2 : tensor) -> tensor<*xf32> { + %1 = "onnx.DequantizeLinear"(%arg0, %arg1, %arg2) {} : (tensor<5x2x3x4xi8>, tensor, tensor) -> tensor<*xf32> "std.return"(%1) {} : (tensor<*xf32>) -> () // CHECK-LABEL: test_dequantize_linear_1 - // CHECK: [[RES:%.+]] = "onnx.DequantizeLinear"(%arg0, %arg1, %arg2) : (tensor<5x2x3x4xi8>, tensor, tensor) -> tensor<5x2x3x4xf32> + // CHECK: [[RES:%.+]] = "onnx.DequantizeLinear"(%arg0, %arg1, %arg2) : (tensor<5x2x3x4xi8>, tensor, tensor) -> tensor<5x2x3x4xf32> // CHECK: return [[RES]] : tensor<5x2x3x4xf32> } diff --git a/test/mlir/onnx/onnx_structure.mlir b/test/mlir/onnx/onnx_structure.mlir index b5033a6..c295171 100644 --- a/test/mlir/onnx/onnx_structure.mlir +++ b/test/mlir/onnx/onnx_structure.mlir @@ -1,9 +1,16 @@ // RUN: onnx-mlir-opt %s -split-input-file | FileCheck %s //===----------------------------------------------------------------------===// -// CHECK-LABEL: @check_map1(%arg0: tuple, tensor<10xi64>>) -> tensor<*xi64> { -func @check_map1(%arg0: tuple, tensor<10xi64>>) -> tensor<*xi64> { - %0 = "onnx.CastMap"(%arg0) {cast_to = "TO_FLOAT", map_form = "DENSE", max_map = 1 : i64} : (tuple, tensor<10xi64>>) -> tensor<*xi64> - return %0 : tensor<*xi64> - // CHECK-NEXT: %0 = "onnx.CastMap"(%arg0) {cast_to = "TO_FLOAT", map_form = "DENSE", max_map = 1 : i64} : (tuple, tensor<10xi64>>) -> tensor<*xi64> +// CHECK-LABEL: @check_map1(%arg0: tuple) -> tensor<*xf32> { +func @check_map1(%arg0: tuple) -> tensor<*xf32> { + %0 = "onnx.CastMap"(%arg0) {cast_to = "TO_FLOAT", map_form = "DENSE", max_map = 1 : i64} : (tuple) -> tensor<*xf32> + return %0 : tensor<*xf32> + // CHECK-NEXT: %0 = "onnx.CastMap"(%arg0) {cast_to = "TO_FLOAT", map_form = "DENSE", max_map = 1 : i64} : (tuple) -> tensor<*xf32> } + +// CHECK-LABEL: @check_string(%arg0: tensor<10x20x!onnx.String>) -> tensor<10x20x!onnx.String> { +func @check_string(%arg0: tensor<10x20x!onnx.String>) -> tensor<10x20x!onnx.String> { + return %arg0 : tensor<10x20x!onnx.String> + // CHECK-NEXT: return %arg0 : tensor<10x20x!onnx.String> +} + diff --git a/test/mlir/transform/attribute_promotion.mlir b/test/mlir/transform/attribute_promotion.mlir index 563bbb7..4bd31d5 100644 --- a/test/mlir/transform/attribute_promotion.mlir +++ b/test/mlir/transform/attribute_promotion.mlir @@ -1,22 +1,22 @@ // RUN: onnx-mlir-opt --attribute-promotion %s -split-input-file | FileCheck %s func @test_should_promote_to_attribute(%arg0 : tensor) -> tensor<*xf32> { - %shape = constant dense<[6, 7, 42]> : tensor<3xi32> - %0 = "onnx.Reshape"(%arg0, %shape) : (tensor, tensor<3xi32>) -> tensor<*xf32> + %shape = constant dense<[6, 7, 42]> : tensor<3xi64> + %0 = "onnx.Reshape"(%arg0, %shape) : (tensor, tensor<3xi64>) -> tensor<*xf32> return %0 : tensor<*xf32> // CHECK-LABEL: test_should_promote_to_attribute // CHECK-NEXT: [[NONE:%.+]] = constant unit - // CHECK-NEXT: [[RESHAPE:%.+]] = "onnx.Reshape"(%{{.*}}, [[NONE]]) {shape = dense<[6, 7, 42]> : tensor<3xi32>} : (tensor, none) -> tensor<*xf32> + // CHECK-NEXT: [[RESHAPE:%.+]] = "onnx.Reshape"(%{{.*}}, [[NONE]]) {shape = dense<[6, 7, 42]> : tensor<3xi64>} : (tensor, none) -> tensor<*xf32> // CHECK-NEXT: return [[RESHAPE]] : tensor<*xf32> } func @test_should_promote_to_attribute_1(%arg0 : tensor) -> tensor<*xf32> { - %shape = "onnx.Constant"() { value = dense<[6, 7, 42]> : tensor<3xi32>}: () -> tensor<3xi32> - %0 = "onnx.Reshape"(%arg0, %shape) : (tensor, tensor<3xi32>) -> tensor<*xf32> + %shape = "onnx.Constant"() { value = dense<[6, 7, 42]> : tensor<3xi64>}: () -> tensor<3xi64> + %0 = "onnx.Reshape"(%arg0, %shape) : (tensor, tensor<3xi64>) -> tensor<*xf32> return %0 : tensor<*xf32> // CHECK-LABEL: test_should_promote_to_attribute_1 // CHECK-NEXT: [[NONE:%.+]] = constant unit - // CHECK-NEXT: [[RESHAPE:%.+]] = "onnx.Reshape"(%{{.*}}, [[NONE]]) {shape = dense<[6, 7, 42]> : tensor<3xi32>} : (tensor, none) -> tensor<*xf32> + // CHECK-NEXT: [[RESHAPE:%.+]] = "onnx.Reshape"(%{{.*}}, [[NONE]]) {shape = dense<[6, 7, 42]> : tensor<3xi64>} : (tensor, none) -> tensor<*xf32> // CHECK-NEXT: return [[RESHAPE]] : tensor<*xf32> } @@ -29,25 +29,25 @@ func @test_should_not_promote_to_attribute(%arg0 : tensor, %arg1 : ten } func @test_promote_to_attribute_without_removing_const_op(%arg0 : tensor) -> (tensor<*xf32>, tensor<*xf32>) { - %shape = constant dense<[6, 7, 42]> : tensor<3xi32> - %0 = "onnx.Reshape"(%arg0, %shape) : (tensor, tensor<3xi32>) -> tensor<*xf32> - %1 = "onnx.Identity"(%shape) : (tensor<3xi32>) -> tensor<*xf32> + %shape = constant dense<[6, 7, 42]> : tensor<3xi64> + %0 = "onnx.Reshape"(%arg0, %shape) : (tensor, tensor<3xi64>) -> tensor<*xf32> + %1 = "onnx.Identity"(%shape) : (tensor<3xi64>) -> tensor<*xf32> "std.return"(%0, %1) : (tensor<*xf32>, tensor<*xf32>) -> () // CHECK-LABEL: test_promote_to_attribute_without_removing_const_op // CHECK-NEXT: [[NONE:%.+]] = constant unit - // CHECK-NEXT: [[SHAPE:%.+]] = constant dense<[6, 7, 42]> : tensor<3xi32> - // CHECK-NEXT: [[RESHAPE:%.+]] = "onnx.Reshape"(%{{.*}}, [[NONE]]) {shape = dense<[6, 7, 42]> : tensor<3xi32>} : (tensor, none) -> tensor<*xf32> - // CHECK-NEXT: [[IDENTITY:%.+]] = "onnx.Identity"([[SHAPE]]) : (tensor<3xi32>) -> tensor<*xf32> + // CHECK-NEXT: [[SHAPE:%.+]] = constant dense<[6, 7, 42]> : tensor<3xi64> + // CHECK-NEXT: [[RESHAPE:%.+]] = "onnx.Reshape"(%{{.*}}, [[NONE]]) {shape = dense<[6, 7, 42]> : tensor<3xi64>} : (tensor, none) -> tensor<*xf32> + // CHECK-NEXT: [[IDENTITY:%.+]] = "onnx.Identity"([[SHAPE]]) : (tensor<3xi64>) -> tensor<*xf32> // CHECK-NEXT: return [[RESHAPE]], [[IDENTITY]] : tensor<*xf32>, tensor<*xf32> } func @test_should_promote_to_attribute1(%arg0 : tensor) -> tensor<*xf32> { - %shape = constant dense<[0, 2, 2, 4]> : tensor<4xi32> + %shape = constant dense<[0, 2, 2, 4]> : tensor<4xi64> %constant_value = constant dense<[0.]> : tensor<1xf32> - %0 = "onnx.Pad"(%arg0, %shape, %constant_value) {mode = "constant"} : (tensor, tensor<4xi32>, tensor<1xf32>)-> tensor<*xf32> + %0 = "onnx.Pad"(%arg0, %shape, %constant_value) {mode = "constant"} : (tensor, tensor<4xi64>, tensor<1xf32>)-> tensor<*xf32> return %0 : tensor<*xf32> // CHECK-LABEL: test_should_promote_to_attribute1 // CHECK-NEXT: [[NONE:%.+]] = constant unit - // CHECK-NEXT: [[PAD:%.+]] = "onnx.Pad"(%{{.*}}, [[NONE]], [[NONE]]) {constant_value = dense<0.000000e+00> : tensor<1xf32>, mode = "constant", pads = dense<[0, 2, 2, 4]> : tensor<4xi32>} : (tensor, none, none) -> tensor<*xf32> + // CHECK-NEXT: [[PAD:%.+]] = "onnx.Pad"(%{{.*}}, [[NONE]], [[NONE]]) {constant_value = dense<0.000000e+00> : tensor<1xf32>, mode = "constant", pads = dense<[0, 2, 2, 4]> : tensor<4xi64>} : (tensor, none, none) -> tensor<*xf32> // CHECK-NEXT: return [[RESHAPE]] : tensor<*xf32> } diff --git a/utils/gen_onnx_mlir.py b/utils/gen_onnx_mlir.py index cbdc86d..c89f10c 100644 --- a/utils/gen_onnx_mlir.py +++ b/utils/gen_onnx_mlir.py @@ -320,10 +320,10 @@ custom_definition_misc = dict([ ('Constant', onnx_types = ( 'bool', 'int8', 'int16', 'int32', 'int64', 'unkown', 'float16', - 'float', 'double', 'complex64', 'complex128' + 'float', 'double', 'complex64', 'complex128', 'string' ) -tblgen_types = ('I1', 'I8', 'I16', 'I32', 'I64', 'BF16', 'F16', 'F32', 'F64', - 'Complex', 'Complex' +tblgen_types = ('AnyI1', 'AnyI8', 'AnyI16', 'AnyI32', 'AnyI64', 'BF16', 'F16', 'F32', 'F64', + 'Complex', 'Complex', 'StringType' ) MAX_NUM_TYPES=20 @@ -468,7 +468,7 @@ def dec_indent(indent): def join_args(args): return ", ".join(args) -def get_operands_or_results(schema, is_input): +def get_operands_or_results(schema, type_str_dict, is_input): value_list = schema.inputs if is_input else schema.outputs if not value_list: return OrderedDict() @@ -482,7 +482,10 @@ def get_operands_or_results(schema, is_input): name_to_types = OrderedDict() for i, value in enumerate(value_list): - structure, elem_types = get_allowed_elem_types(schema, value) + types = get_onnx_mlir_types(schema, type_str_dict, value) + + ''' + structure, elem_types = get_allowed_elem_types(schema, type_str_dict, value) if structure == 'tensor' : if elem_types is None: @@ -513,6 +516,7 @@ def get_operands_or_results(schema, is_input): types = list(map(lambda x: x.format(elem_types_str), types)) else: types = ["AnyMemRef", "AnyTensor"] + ''' # If operand is promotable to an attribute, then it must be # nullable in case it migrates to be an attribute. @@ -693,7 +697,68 @@ def get_type_inference_func(s, indent, type_inference_code): indent = dec_indent(indent) return s +def parse_type_str(allowedType): + # AnyI may be used for uint because the onnx_mlir is not generating uint output + # This will be fixed later and UI will be replace AnyI + onnx_to_mlir_type_dict = { '(': '<[', + ')': ']>', + 'tensor' : 'TensorOf', + 'seq' : 'TensorOf', + 'map' : 'TupleOf', + 'bool': 'I1', + #'uint8' : 'AnyI8', + #uint16' : 'AnyI16', + #uint32' : 'AnyI32', + #uint64' : 'AnyI64', + 'uint8' : 'UI8', + 'uint16' : 'UI16', + 'uint32' : 'UI32', + 'uint64' : 'UI64', + 'int8' : 'I8', + 'int16' : 'I16', + 'int32' : 'I32', + 'int64' : 'I64', + 'float16' : 'F16', + 'float' : 'F32', + 'double' : 'F64', + 'unkown' : 'BF16', + 'complex64' : 'Complex', + 'complex128' : 'Complex', + 'string' : 'StringType'} + for key, item in onnx_to_mlir_type_dict.items(): + allowedType = allowedType.replace(key, item) + return allowedType + +def parse_a_type_constraint(constraint): + allowedTypes = constraint.allowed_type_strs + mlirTypes = [] + for allowedType in allowedTypes: + mlirType = parse_type_str(allowedType) + mlirTypes.append(mlirType) + # Remove redundant and sort. + # However onnx keeps a consitently meaningful order + # There is no redundancy as long as each onnx type is mapped uniquely + # mlirTypes = sorted(list(set(mlirTypes))) + return mlirTypes + +def parse_type_constraints(schema): + type_str_dict = dict() + for type_constraint in schema.type_constraints: + type_str_dict[type_constraint.type_param_str] = parse_a_type_constraint(type_constraint) + return type_str_dict + +def get_onnx_mlir_types(schema, type_str_dict, input): + if input.typeStr : + if not input.typeStr in type_str_dict : + # some arguments use type description directly + # instead of constraint + return [parse_type_str(input.typeStr)] + else : + return type_str_dict[input.typeStr] + else : + print('No typeStr ', schema.name) + return [] def gen_op_def(schema): indent = inc_indent() @@ -727,15 +792,20 @@ def gen_op_def(schema): s += indent + '"{}"\n'.format(escaped_line) s += indent + '}];\n' + + # handle the type constraint for input and output + # parse type constraint into onnx-mlir type string list + type_str_dict = parse_type_constraints(schema) + # Generate ins (consisting of operands and attributes). - ins = get_operands_or_results(schema, is_input=True) + ins = get_operands_or_results(schema, type_str_dict, is_input=True) ins.update(get_attrs(schema)) ins_strs = ["{1}:${0}".format(*i) for i in ins.items()] s += indent + 'let arguments = (ins {});\n'.format( (',\n' + inc_indent(indent)).join(ins_strs)) # Generate outs (operation results). - outs = get_operands_or_results(schema, is_input=False) + outs = get_operands_or_results(schema, type_str_dict, is_input=False) outs_strs = ["{1}:${0}".format(*i) for i in outs.items()] s += indent + 'let results = (outs {});\n'.format( (',\n' + inc_indent(indent)).join(outs_strs)) @@ -756,7 +826,7 @@ def gen_op_def(schema): # Value, Y, Attribute A", [{}]> indent = inc_indent(indent) s += indent + 'OpBuilder<"OpBuilder &builder, OperationState &state' - operands_dict = get_operands_or_results(schema, is_input=True) + operands_dict = get_operands_or_results(schema, type_str_dict, is_input=True) for name, ty in operands_dict.items(): s += ', {} {}'.format(tblgen_operand_type_to_cpp_type(ty), name)