diff --git a/cgmanifest.json b/cgmanifest.json index 0e440b7952..543b98aed1 100644 --- a/cgmanifest.json +++ b/cgmanifest.json @@ -49,7 +49,7 @@ "component": { "type": "git", "git": { - "commitHash": "7d90796473295ca3cdf976ed772215c5980ad3e0", + "commitHash": "568b65aaa2bd94b04d8fdac24b398dc25c507b50", "repositoryUrl": "https://github.com/onnx/onnx.git" } } diff --git a/cmake/external/onnx b/cmake/external/onnx index 7d90796473..568b65aaa2 160000 --- a/cmake/external/onnx +++ b/cmake/external/onnx @@ -1 +1 @@ -Subproject commit 7d90796473295ca3cdf976ed772215c5980ad3e0 +Subproject commit 568b65aaa2bd94b04d8fdac24b398dc25c507b50 diff --git a/include/onnxruntime/core/graph/graph.h b/include/onnxruntime/core/graph/graph.h index 39707cd944..0063c5687b 100644 --- a/include/onnxruntime/core/graph/graph.h +++ b/include/onnxruntime/core/graph/graph.h @@ -252,6 +252,7 @@ class Node { ADD_ATTR_INTERFACES(std::string) ADD_ATTR_INTERFACES(ONNX_NAMESPACE::TensorProto) ADD_ATTR_INTERFACES(ONNX_NAMESPACE::GraphProto) + ADD_ATTR_INTERFACES(ONNX_NAMESPACE::SparseTensorProto) /** Remove the specified attribute from this Node */ bool ClearAttribute(const std::string& attr_name); diff --git a/onnxruntime/core/framework/op_node_proto_helper.cc b/onnxruntime/core/framework/op_node_proto_helper.cc index a171289575..18035a0c5c 100644 --- a/onnxruntime/core/framework/op_node_proto_helper.cc +++ b/onnxruntime/core/framework/op_node_proto_helper.cc @@ -153,8 +153,10 @@ uint32_t OpNodeProtoHelper::GetPrimitiveAttrElementCount(AttributeProto_ case AttributeProto_AttributeType_UNDEFINED: case AttributeProto_AttributeType_TENSOR: case AttributeProto_AttributeType_GRAPH: + case AttributeProto_AttributeType_SPARSE_TENSOR: case AttributeProto_AttributeType_TENSORS: case AttributeProto_AttributeType_GRAPHS: + case AttributeProto_AttributeType_SPARSE_TENSORS: default: return 0; } diff --git a/onnxruntime/core/graph/graph.cc b/onnxruntime/core/graph/graph.cc index eb61b8c3a7..938aa54f53 100644 --- a/onnxruntime/core/graph/graph.cc +++ b/onnxruntime/core/graph/graph.cc @@ -479,11 +479,13 @@ ADD_BASIC_ATTR_IMPL(float, AttributeProto_AttributeType::AttributeProto_Attribut ADD_BASIC_ATTR_IMPL(int64_t, AttributeProto_AttributeType::AttributeProto_AttributeType_INT, i) ADD_BASIC_ATTR_IMPL(std::string, AttributeProto_AttributeType::AttributeProto_AttributeType_STRING, s) ADD_ATTR_IMPL(TensorProto, AttributeProto_AttributeType::AttributeProto_AttributeType_TENSOR, t) +ADD_ATTR_IMPL(SparseTensorProto, AttributeProto_AttributeType::AttributeProto_AttributeType_SPARSE_TENSOR, sparse_tensor) ADD_LIST_ATTR_IMPL(float, AttributeProto_AttributeType::AttributeProto_AttributeType_FLOATS, floats) ADD_LIST_ATTR_IMPL(int64_t, AttributeProto_AttributeType::AttributeProto_AttributeType_INTS, ints) ADD_LIST_ATTR_IMPL(std::string, AttributeProto_AttributeType::AttributeProto_AttributeType_STRINGS, strings) ADD_LIST_ATTR_IMPL(TensorProto, AttributeProto_AttributeType::AttributeProto_AttributeType_TENSORS, tensors) ADD_LIST_ATTR_IMPL(GraphProto, AttributeProto_AttributeType::AttributeProto_AttributeType_GRAPHS, graphs) +ADD_LIST_ATTR_IMPL(SparseTensorProto, AttributeProto_AttributeType::AttributeProto_AttributeType_SPARSE_TENSORS, sparse_tensors) bool Node::ClearAttribute(const std::string& attr_name) { graph_->SetGraphResolveNeeded(); diff --git a/onnxruntime/core/graph/op.cc b/onnxruntime/core/graph/op.cc index f38e839ea3..7317106c4a 100644 --- a/onnxruntime/core/graph/op.cc +++ b/onnxruntime/core/graph/op.cc @@ -51,6 +51,8 @@ Status TypeUtils::GetType(const AttributeProto& attr, AttrType& type) { type = AttrType::AttributeProto_AttributeType_TENSOR; } else if (attr.has_g()) { type = AttrType::AttributeProto_AttributeType_GRAPH; + } else if (attr.has_sparse_tensor()) { + type = AttrType::AttributeProto_AttributeType_SPARSE_TENSOR; } else if (attr.floats_size()) { type = AttrType::AttributeProto_AttributeType_FLOATS; } else if (attr.ints_size()) { @@ -61,6 +63,8 @@ Status TypeUtils::GetType(const AttributeProto& attr, AttrType& type) { type = AttrType::AttributeProto_AttributeType_TENSORS; } else if (attr.graphs_size()) { type = AttrType::AttributeProto_AttributeType_GRAPHS; + } else if (attr.sparse_tensors_size()) { + type = AttrType::AttributeProto_AttributeType_SPARSE_TENSORS; } else { return Status(ONNXRUNTIME, FAIL, "Invalid AttributeProto."); } diff --git a/onnxruntime/core/graph/op.h b/onnxruntime/core/graph/op.h index 505a90053c..7cb35c6e2a 100644 --- a/onnxruntime/core/graph/op.h +++ b/onnxruntime/core/graph/op.h @@ -33,7 +33,9 @@ AttributeProto_AttributeType_FLOATS = 6, AttributeProto_AttributeType_INTS = 7, AttributeProto_AttributeType_STRINGS = 8, AttributeProto_AttributeType_TENSORS = 9, -AttributeProto_AttributeType_GRAPHS = 10 +AttributeProto_AttributeType_GRAPHS = 10, +AttributeProto_AttributeType_SPARSE_TENSOR = 22, +AttributeProto_AttributeType_SPARSE_TENSORS = 23, */ static constexpr const char* kAttrTypeStrings[] = { diff --git a/onnxruntime/core/protobuf/onnx-ml.proto b/onnxruntime/core/protobuf/onnx-ml.proto index 857eb6f68e..f79fbaa86f 100644 --- a/onnxruntime/core/protobuf/onnx-ml.proto +++ b/onnxruntime/core/protobuf/onnx-ml.proto @@ -86,7 +86,13 @@ enum Version { // IR VERSION 5 published on March 18, 2019 // - Add message TensorAnnotation. // - Add quantization annotation in GraphProto to map tensor with its scale and zero point quantization parameters. - IR_VERSION = 0x0000000000000005; + IR_VERSION_2019_3_18 = 0x0000000000000005; + + // IR VERSION 6 published on + // - Add support for sparse tensor constants stored in model. + // - Add message SparseTensorProto + // - Add sparse initializers + IR_VERSION = 0x0000000000000006; } // Attributes @@ -106,12 +112,14 @@ message AttributeProto { STRING = 3; TENSOR = 4; GRAPH = 5; + SPARSE_TENSOR = 11; FLOATS = 6; INTS = 7; STRINGS = 8; TENSORS = 9; GRAPHS = 10; + SPARSE_TENSORS = 12; } // The name field MUST be present for this version of the IR. @@ -140,6 +148,7 @@ message AttributeProto { optional bytes s = 4; // UTF-8 string optional TensorProto t = 5; // tensor value optional GraphProto g = 6; // graph + optional SparseTensorProto sparse_tensor = 22; // sparse tensor value // Do not use field below, it's deprecated. // optional ValueProto v = 12; // value - subsumes everything but graph @@ -148,6 +157,7 @@ message AttributeProto { repeated bytes strings = 9; // list of UTF-8 strings repeated TensorProto tensors = 10; // list of tensors repeated GraphProto graphs = 11; // list of graph + repeated SparseTensorProto sparse_tensors = 23; // list of sparse tensors } // Defines information on value, including the name, the type, and @@ -277,6 +287,9 @@ message GraphProto { // MAY also appear in the input list. repeated TensorProto initializer = 5; + // Initializers (see above) stored in sparse format. + repeated SparseTensorProto sparse_initializer = 15; + // A human-readable documentation for this graph. Markdown is allowed. optional string doc_string = 10; @@ -446,6 +459,28 @@ message TensorProto { repeated uint64 uint64_data = 11 [packed = true]; } +// A serialized sparse-tensor value +message SparseTensorProto { + // The sequence of non-default values are encoded as a tensor of shape [NNZ]. + // The default-value is zero for numeric tensors, and empty-string for string tensors. + optional TensorProto values = 1; + + // The indices of the non-default values, which may be stored in one of two formats. + // (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value + // corresponding to the j-th index of the i-th value (in the values tensor). + // (b) Indices can be a tensor of shape [NNZ], in which case the i-th value + // must be the linearized-index of the i-th value (in the values tensor). + // The linearized-index can be converted into an index tuple (k_1,...,k_rank) + // using the shape provided below. + // The indices must appear in ascending order without duplication. + // In the first format, the ordering is lexicographic-ordering: + // e.g., index-value [1,4] must appear before [2,1] + optional TensorProto indices = 2; + + // The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank] + repeated int64 dims = 3; +} + // Defines a tensor shape. A dimension can be either an integer value // or a symbolic variable. A symbolic variable represents an unknown // dimension. @@ -478,6 +513,14 @@ message TypeProto { optional TensorShapeProto shape = 2; } + message SparseTensor { + // This field MUST NOT have the value of UNDEFINED + // This field MUST have a valid TensorProto.DataType value + // This field MUST be present for this version of the IR. + optional int32 elem_type = 1; + optional TensorShapeProto shape = 2; + } + // repeated T message Sequence { @@ -506,19 +549,13 @@ message TypeProto { // repeated TypeProto parameters = 3; } - message SparseTensor { - // This field MUST NOT have the value of UNDEFINED - // This field MUST have a valid TensorProto.DataType value - // This field MUST be present for this version of the IR. - optional int32 elem_type = 1; - optional TensorShapeProto shape = 2; - } - oneof value { // The type of a tensor. Tensor tensor_type = 1; + SparseTensor sparse_tensor_type = 8; + // NOTE: DNN-only implementations of ONNX MAY elect to not support non-tensor values // as input and output to graphs and nodes. These types are needed to naturally @@ -533,8 +570,6 @@ message TypeProto { Opaque opaque_type = 7; - SparseTensor sparse_tensor_type = 8; - } // An optional denotation can be used to denote the whole diff --git a/onnxruntime/core/protobuf/onnx-ml.proto3 b/onnxruntime/core/protobuf/onnx-ml.proto3 index 6baaecca01..eb01c7b1d2 100644 --- a/onnxruntime/core/protobuf/onnx-ml.proto3 +++ b/onnxruntime/core/protobuf/onnx-ml.proto3 @@ -86,7 +86,13 @@ enum Version { // IR VERSION 5 published on March 18, 2019 // - Add message TensorAnnotation. // - Add quantization annotation in GraphProto to map tensor with its scale and zero point quantization parameters. - IR_VERSION = 0x0000000000000005; + IR_VERSION_2019_3_18 = 0x0000000000000005; + + // IR VERSION 6 published on + // - Add support for sparse tensor constants stored in model. + // - Add message SparseTensorProto + // - Add sparse initializers + IR_VERSION = 0x0000000000000006; } // Attributes @@ -106,12 +112,14 @@ message AttributeProto { STRING = 3; TENSOR = 4; GRAPH = 5; + SPARSE_TENSOR = 11; FLOATS = 6; INTS = 7; STRINGS = 8; TENSORS = 9; GRAPHS = 10; + SPARSE_TENSORS = 12; } // The name field MUST be present for this version of the IR. @@ -140,6 +148,7 @@ message AttributeProto { bytes s = 4; // UTF-8 string TensorProto t = 5; // tensor value GraphProto g = 6; // graph + SparseTensorProto sparse_tensor = 22; // sparse tensor value // Do not use field below, it's deprecated. // optional ValueProto v = 12; // value - subsumes everything but graph @@ -148,6 +157,7 @@ message AttributeProto { repeated bytes strings = 9; // list of UTF-8 strings repeated TensorProto tensors = 10; // list of tensors repeated GraphProto graphs = 11; // list of graph + repeated SparseTensorProto sparse_tensors = 23; // list of sparse tensors } // Defines information on value, including the name, the type, and @@ -277,6 +287,9 @@ message GraphProto { // MAY also appear in the input list. repeated TensorProto initializer = 5; + // Initializers (see above) stored in sparse format. + repeated SparseTensorProto sparse_initializer = 15; + // A human-readable documentation for this graph. Markdown is allowed. string doc_string = 10; @@ -446,6 +459,28 @@ message TensorProto { repeated uint64 uint64_data = 11 [packed = true]; } +// A serialized sparse-tensor value +message SparseTensorProto { + // The sequence of non-default values are encoded as a tensor of shape [NNZ]. + // The default-value is zero for numeric tensors, and empty-string for string tensors. + TensorProto values = 1; + + // The indices of the non-default values, which may be stored in one of two formats. + // (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value + // corresponding to the j-th index of the i-th value (in the values tensor). + // (b) Indices can be a tensor of shape [NNZ], in which case the i-th value + // must be the linearized-index of the i-th value (in the values tensor). + // The linearized-index can be converted into an index tuple (k_1,...,k_rank) + // using the shape provided below. + // The indices must appear in ascending order without duplication. + // In the first format, the ordering is lexicographic-ordering: + // e.g., index-value [1,4] must appear before [2,1] + TensorProto indices = 2; + + // The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank] + repeated int64 dims = 3; +} + // Defines a tensor shape. A dimension can be either an integer value // or a symbolic variable. A symbolic variable represents an unknown // dimension. @@ -478,6 +513,14 @@ message TypeProto { TensorShapeProto shape = 2; } + message SparseTensor { + // This field MUST NOT have the value of UNDEFINED + // This field MUST have a valid TensorProto.DataType value + // This field MUST be present for this version of the IR. + int32 elem_type = 1; + TensorShapeProto shape = 2; + } + // repeated T message Sequence { @@ -506,19 +549,13 @@ message TypeProto { // repeated TypeProto parameters = 3; } - message SparseTensor { - // This field MUST NOT have the value of UNDEFINED - // This field MUST have a valid TensorProto.DataType value - // This field MUST be present for this version of the IR. - int32 elem_type = 1; - TensorShapeProto shape = 2; - } - oneof value { // The type of a tensor. Tensor tensor_type = 1; + SparseTensor sparse_tensor_type = 8; + // NOTE: DNN-only implementations of ONNX MAY elect to not support non-tensor values // as input and output to graphs and nodes. These types are needed to naturally @@ -533,8 +570,6 @@ message TypeProto { Opaque opaque_type = 7; - SparseTensor sparse_tensor_type = 8; - } // An optional denotation can be used to denote the whole diff --git a/onnxruntime/core/protobuf/onnx.in.proto b/onnxruntime/core/protobuf/onnx.in.proto index 54a0048287..b8005244fb 100644 --- a/onnxruntime/core/protobuf/onnx.in.proto +++ b/onnxruntime/core/protobuf/onnx.in.proto @@ -83,7 +83,13 @@ enum Version { // IR VERSION 5 published on March 18, 2019 // - Add message TensorAnnotation. // - Add quantization annotation in GraphProto to map tensor with its scale and zero point quantization parameters. - IR_VERSION = 0x0000000000000005; + IR_VERSION_2019_3_18 = 0x0000000000000005; + + // IR VERSION 6 published on + // - Add support for sparse tensor constants stored in model. + // - Add message SparseTensorProto + // - Add sparse initializers + IR_VERSION = 0x0000000000000006; } // Attributes @@ -103,12 +109,14 @@ message AttributeProto { STRING = 3; TENSOR = 4; GRAPH = 5; + SPARSE_TENSOR = 11; FLOATS = 6; INTS = 7; STRINGS = 8; TENSORS = 9; GRAPHS = 10; + SPARSE_TENSORS = 12; } // The name field MUST be present for this version of the IR. @@ -137,6 +145,7 @@ message AttributeProto { optional bytes s = 4; // UTF-8 string optional TensorProto t = 5; // tensor value optional GraphProto g = 6; // graph + optional SparseTensorProto sparse_tensor = 22; // sparse tensor value // Do not use field below, it's deprecated. // optional ValueProto v = 12; // value - subsumes everything but graph @@ -145,6 +154,7 @@ message AttributeProto { repeated bytes strings = 9; // list of UTF-8 strings repeated TensorProto tensors = 10; // list of tensors repeated GraphProto graphs = 11; // list of graph + repeated SparseTensorProto sparse_tensors = 23; // list of sparse tensors } // Defines information on value, including the name, the type, and @@ -274,6 +284,9 @@ message GraphProto { // MAY also appear in the input list. repeated TensorProto initializer = 5; + // Initializers (see above) stored in sparse format. + repeated SparseTensorProto sparse_initializer = 15; + // A human-readable documentation for this graph. Markdown is allowed. optional string doc_string = 10; @@ -443,6 +456,28 @@ message TensorProto { repeated uint64 uint64_data = 11 [packed = true]; } +// A serialized sparse-tensor value +message SparseTensorProto { + // The sequence of non-default values are encoded as a tensor of shape [NNZ]. + // The default-value is zero for numeric tensors, and empty-string for string tensors. + optional TensorProto values = 1; + + // The indices of the non-default values, which may be stored in one of two formats. + // (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value + // corresponding to the j-th index of the i-th value (in the values tensor). + // (b) Indices can be a tensor of shape [NNZ], in which case the i-th value + // must be the linearized-index of the i-th value (in the values tensor). + // The linearized-index can be converted into an index tuple (k_1,...,k_rank) + // using the shape provided below. + // The indices must appear in ascending order without duplication. + // In the first format, the ordering is lexicographic-ordering: + // e.g., index-value [1,4] must appear before [2,1] + optional TensorProto indices = 2; + + // The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank] + repeated int64 dims = 3; +} + // Defines a tensor shape. A dimension can be either an integer value // or a symbolic variable. A symbolic variable represents an unknown // dimension. @@ -475,6 +510,14 @@ message TypeProto { optional TensorShapeProto shape = 2; } + message SparseTensor { + // This field MUST NOT have the value of UNDEFINED + // This field MUST have a valid TensorProto.DataType value + // This field MUST be present for this version of the IR. + optional int32 elem_type = 1; + optional TensorShapeProto shape = 2; + } + // #if ONNX-ML // repeated T @@ -504,20 +547,14 @@ message TypeProto { // repeated TypeProto parameters = 3; } - message SparseTensor { - // This field MUST NOT have the value of UNDEFINED - // This field MUST have a valid TensorProto.DataType value - // This field MUST be present for this version of the IR. - optional int32 elem_type = 1; - optional TensorShapeProto shape = 2; - } - // #endif oneof value { // The type of a tensor. Tensor tensor_type = 1; + SparseTensor sparse_tensor_type = 8; + // #if ONNX-ML // NOTE: DNN-only implementations of ONNX MAY elect to not support non-tensor values @@ -533,8 +570,6 @@ message TypeProto { Opaque opaque_type = 7; - SparseTensor sparse_tensor_type = 8; - // #endif } diff --git a/onnxruntime/server/protobuf/onnx-ml.proto b/onnxruntime/server/protobuf/onnx-ml.proto index 857eb6f68e..f79fbaa86f 100644 --- a/onnxruntime/server/protobuf/onnx-ml.proto +++ b/onnxruntime/server/protobuf/onnx-ml.proto @@ -86,7 +86,13 @@ enum Version { // IR VERSION 5 published on March 18, 2019 // - Add message TensorAnnotation. // - Add quantization annotation in GraphProto to map tensor with its scale and zero point quantization parameters. - IR_VERSION = 0x0000000000000005; + IR_VERSION_2019_3_18 = 0x0000000000000005; + + // IR VERSION 6 published on + // - Add support for sparse tensor constants stored in model. + // - Add message SparseTensorProto + // - Add sparse initializers + IR_VERSION = 0x0000000000000006; } // Attributes @@ -106,12 +112,14 @@ message AttributeProto { STRING = 3; TENSOR = 4; GRAPH = 5; + SPARSE_TENSOR = 11; FLOATS = 6; INTS = 7; STRINGS = 8; TENSORS = 9; GRAPHS = 10; + SPARSE_TENSORS = 12; } // The name field MUST be present for this version of the IR. @@ -140,6 +148,7 @@ message AttributeProto { optional bytes s = 4; // UTF-8 string optional TensorProto t = 5; // tensor value optional GraphProto g = 6; // graph + optional SparseTensorProto sparse_tensor = 22; // sparse tensor value // Do not use field below, it's deprecated. // optional ValueProto v = 12; // value - subsumes everything but graph @@ -148,6 +157,7 @@ message AttributeProto { repeated bytes strings = 9; // list of UTF-8 strings repeated TensorProto tensors = 10; // list of tensors repeated GraphProto graphs = 11; // list of graph + repeated SparseTensorProto sparse_tensors = 23; // list of sparse tensors } // Defines information on value, including the name, the type, and @@ -277,6 +287,9 @@ message GraphProto { // MAY also appear in the input list. repeated TensorProto initializer = 5; + // Initializers (see above) stored in sparse format. + repeated SparseTensorProto sparse_initializer = 15; + // A human-readable documentation for this graph. Markdown is allowed. optional string doc_string = 10; @@ -446,6 +459,28 @@ message TensorProto { repeated uint64 uint64_data = 11 [packed = true]; } +// A serialized sparse-tensor value +message SparseTensorProto { + // The sequence of non-default values are encoded as a tensor of shape [NNZ]. + // The default-value is zero for numeric tensors, and empty-string for string tensors. + optional TensorProto values = 1; + + // The indices of the non-default values, which may be stored in one of two formats. + // (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value + // corresponding to the j-th index of the i-th value (in the values tensor). + // (b) Indices can be a tensor of shape [NNZ], in which case the i-th value + // must be the linearized-index of the i-th value (in the values tensor). + // The linearized-index can be converted into an index tuple (k_1,...,k_rank) + // using the shape provided below. + // The indices must appear in ascending order without duplication. + // In the first format, the ordering is lexicographic-ordering: + // e.g., index-value [1,4] must appear before [2,1] + optional TensorProto indices = 2; + + // The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank] + repeated int64 dims = 3; +} + // Defines a tensor shape. A dimension can be either an integer value // or a symbolic variable. A symbolic variable represents an unknown // dimension. @@ -478,6 +513,14 @@ message TypeProto { optional TensorShapeProto shape = 2; } + message SparseTensor { + // This field MUST NOT have the value of UNDEFINED + // This field MUST have a valid TensorProto.DataType value + // This field MUST be present for this version of the IR. + optional int32 elem_type = 1; + optional TensorShapeProto shape = 2; + } + // repeated T message Sequence { @@ -506,19 +549,13 @@ message TypeProto { // repeated TypeProto parameters = 3; } - message SparseTensor { - // This field MUST NOT have the value of UNDEFINED - // This field MUST have a valid TensorProto.DataType value - // This field MUST be present for this version of the IR. - optional int32 elem_type = 1; - optional TensorShapeProto shape = 2; - } - oneof value { // The type of a tensor. Tensor tensor_type = 1; + SparseTensor sparse_tensor_type = 8; + // NOTE: DNN-only implementations of ONNX MAY elect to not support non-tensor values // as input and output to graphs and nodes. These types are needed to naturally @@ -533,8 +570,6 @@ message TypeProto { Opaque opaque_type = 7; - SparseTensor sparse_tensor_type = 8; - } // An optional denotation can be used to denote the whole diff --git a/onnxruntime/test/onnx/main.cc b/onnxruntime/test/onnx/main.cc index 7ca1f84ebc..477cb59728 100644 --- a/onnxruntime/test/onnx/main.cc +++ b/onnxruntime/test/onnx/main.cc @@ -411,7 +411,40 @@ int real_main(int argc, char* argv[], Ort::Env& env) { {"cumsum_1d_reverse_exclusive", "not implemented yet"}, {"cumsum_1d_reverse", "not implemented yet"}, {"cumsum_1d_exclusive", "not implemented yet"}, - {"cumsum_1d", "not implemented yet"}, + {"cumsum_1d", "not implemented yet"}, + {"range_float_type_positive_delta", "not implemented yet"}, + {"range_float_type_positive_delta_expanded", "not implemented yet"}, + {"range_int32_type_negative_delta", "not implemented yet"}, + {"range_int32_type_negative_delta_expanded", "not implemented yet"}, + {"det_2d", "not implemented yet"}, + {"det_nd", "not implemented yet"}, + {"gathernd_example_float32", "not implemented yet"}, + {"gathernd_example_int32", "not implemented yet"}, + {"resize_downsample_scales_cubic_A_n0p5_exclude_outside", "not implemented yet"}, + {"resize_downsample_scales_cubic_align_corners", "not implemented yet"}, + {"resize_downsample_scales_cubic", "not implemented yet"}, + {"resize_downsample_scales_linear_align_corners", "not implemented yet"}, + {"resize_downsample_scales_linear", "not implemented yet"}, + {"resize_downsample_scales_nearest", "not implemented yet"}, + {"resize_downsample_sizes_cubic", "not implemented yet"}, + {"resize_downsample_sizes_linear_pytorch_half_pixel", "not implemented yet"}, + {"resize_downsample_sizes_nearest", "not implemented yet"}, + {"resize_downsample_sizes_nearest_tf_half_pixel_for_nn", "not implemented yet"}, + {"resize_tf_crop_and_resize", "not implemented yet"}, + {"resize_upsample_scales_cubic_A_n0p5_exclude_outside", "not implemented yet"}, + {"resize_upsample_scales_cubic_align_corners", "not implemented yet"}, + {"resize_upsample_scales_cubic_asymmetric", "not implemented yet"}, + {"resize_upsample_scales_cubic", "not implemented yet"}, + {"resize_upsample_scales_linear_align_corners", "not implemented yet"}, + {"resize_upsample_scales_linear", "not implemented yet"}, + {"resize_upsample_scales_nearest", "not implemented yet"}, + {"resize_upsample_sizes_cubic", "not implemented yet"}, + {"resize_upsample_sizes_nearest_ceil_half_pixel", "not implemented yet"}, + {"resize_upsample_sizes_nearest", "not implemented yet"}, + {"resize_upsample_sizes_nearest_floor_align_corners", "not implemented yet"}, + {"resize_upsample_sizes_nearest_round_prefer_ceil_asymmetric", "not implemented yet"}, + {"scatternd", "not implemented yet"}, + {"yolov3", "regression in resize opset 10 shape inference"}, }; #ifdef USE_NGRAPH diff --git a/onnxruntime/test/python/onnx_backend_test_series.py b/onnxruntime/test/python/onnx_backend_test_series.py index 164f598cb8..61552a83b4 100644 --- a/onnxruntime/test/python/onnx_backend_test_series.py +++ b/onnxruntime/test/python/onnx_backend_test_series.py @@ -120,6 +120,38 @@ def create_backend_test(testname=None): '^test_unique_*', '^test_mod_float_mixed_sign_example_cpu.*', #onnxruntime::Mod::Compute fmod_ was false. fmod attribute must be true for float, float16 and double types '^test_shrink_cpu.*', #Invalid rank for input: x Got: 1 Expected: 2 Please fix either the inputs or the model. + '^test_range_float_type_positive_delta_cpu.*', + '^test_range_float_type_positive_delta_expanded_cpu.*', + '^test_range_int32_type_negative_delta_cpu.*', + '^test_range_int32_type_negative_delta_expanded_cpu.*', + '^test_det_2d_cpu.*', + '^test_det_nd_cpu.*', + '^test_gathernd_example_float32_cpu.*', + '^test_gathernd_example_int32_cpu.*', + '^test_resize_downsample_scales_cubic_A_n0p5_exclude_outside_cpu.*', + '^test_resize_downsample_scales_cubic_align_corners_cpu.*', + '^test_resize_downsample_scales_cubic_cpu.*', + '^test_resize_downsample_scales_linear_align_corners_cpu.*', + '^test_resize_downsample_scales_linear_cpu.*', + '^test_resize_downsample_scales_nearest_cpu.*', + '^test_resize_downsample_sizes_cubic_cpu.*', + '^test_resize_downsample_sizes_linear_pytorch_half_pixel_cpu.*', + '^test_resize_downsample_sizes_nearest_cpu.*', + '^test_resize_downsample_sizes_nearest_tf_half_pixel_for_nn_cpu.*', + '^test_resize_tf_crop_and_resize_cpu.*', + '^test_resize_upsample_scales_cubic_A_n0p5_exclude_outside_cpu.*', + '^test_resize_upsample_scales_cubic_align_corners_cpu.*', + '^test_resize_upsample_scales_cubic_asymmetric_cpu.*', + '^test_resize_upsample_scales_cubic_cpu.*', + '^test_resize_upsample_scales_linear_align_corners_cpu.*', + '^test_resize_upsample_scales_linear_cpu.*', + '^test_resize_upsample_scales_nearest_cpu.*', + '^test_resize_upsample_sizes_cubic_cpu.*', + '^test_resize_upsample_sizes_nearest_ceil_half_pixel_cpu.*', + '^test_resize_upsample_sizes_nearest_cpu.*', + '^test_resize_upsample_sizes_nearest_floor_align_corners_cpu.*', + '^test_resize_upsample_sizes_nearest_round_prefer_ceil_asymmetric_cpu.*', + '^test_scatternd_cpu.*', ) # Example of how to disable tests for a specific provider. diff --git a/tools/ci_build/github/linux/docker/scripts/install_onnx.sh b/tools/ci_build/github/linux/docker/scripts/install_onnx.sh index c15c01ec4a..c73b22a795 100755 --- a/tools/ci_build/github/linux/docker/scripts/install_onnx.sh +++ b/tools/ci_build/github/linux/docker/scripts/install_onnx.sh @@ -13,7 +13,7 @@ version2tag=(5af210ca8a1c73aa6bae8754c9346ec54d0a756e-onnx123 bae6333e149a59a3faa9c4d9c44974373dcf5256-onnx130 9e55ace55aad1ada27516038dfbdc66a8a0763db-onnx141 7d7bc83d29a328233d3e8affa4c4ea8b3e3599ef-onnx150 - 7d90796473295ca3cdf976ed772215c5980ad3e0-onnxtip) + 568b65aaa2bd94b04d8fdac24b398dc25c507b50-onnxtip) for v2t in ${version2tag[*]}; do onnx_version="$(cut -d'-' -f1<<<${v2t})" onnx_tag="$(cut -d'-' -f2<<<${v2t})"