diff --git a/src/OnnxSharp.Test/OnnxSharp.Test.csproj b/src/OnnxSharp.Test/OnnxSharp.Test.csproj index 94a953e..490d549 100644 --- a/src/OnnxSharp.Test/OnnxSharp.Test.csproj +++ b/src/OnnxSharp.Test/OnnxSharp.Test.csproj @@ -7,7 +7,7 @@ - net461;net5.0 + net462;net5.0 @@ -20,13 +20,13 @@ - - - + + + - - + + diff --git a/src/OnnxSharp/Onnx.cs b/src/OnnxSharp/Onnx.cs index 5b2add1..b275b48 100644 --- a/src/OnnxSharp/Onnx.cs +++ b/src/OnnxSharp/Onnx.cs @@ -2,7 +2,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: onnx.proto3 // -#pragma warning disable 1591, 0612, 3021 +#pragma warning disable 1591, 0612, 3021, 8981 #region Designer generated code using pb = global::Google.Protobuf; @@ -24,103 +24,136 @@ public static partial class OnnxReflection { static OnnxReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "Cgtvbm54LnByb3RvMxIEb25ueCLoBAoOQXR0cmlidXRlUHJvdG8SDAoEbmFt", + "Cgtvbm54LnByb3RvMxIEb25ueCLbBQoOQXR0cmlidXRlUHJvdG8SDAoEbmFt", "ZRgBIAEoCRIVCg1yZWZfYXR0cl9uYW1lGBUgASgJEhIKCmRvY19zdHJpbmcY", "DSABKAkSMAoEdHlwZRgUIAEoDjIiLm9ubnguQXR0cmlidXRlUHJvdG8uQXR0", "cmlidXRlVHlwZRIJCgFmGAIgASgCEgkKAWkYAyABKAMSCQoBcxgEIAEoDBIc", "CgF0GAUgASgLMhEub25ueC5UZW5zb3JQcm90bxIbCgFnGAYgASgLMhAub25u", "eC5HcmFwaFByb3RvEi4KDXNwYXJzZV90ZW5zb3IYFiABKAsyFy5vbm54LlNw", - "YXJzZVRlbnNvclByb3RvEg4KBmZsb2F0cxgHIAMoAhIMCgRpbnRzGAggAygD", - "Eg8KB3N0cmluZ3MYCSADKAwSIgoHdGVuc29ycxgKIAMoCzIRLm9ubnguVGVu", - "c29yUHJvdG8SIAoGZ3JhcGhzGAsgAygLMhAub25ueC5HcmFwaFByb3RvEi8K", - "DnNwYXJzZV90ZW5zb3JzGBcgAygLMhcub25ueC5TcGFyc2VUZW5zb3JQcm90", - "byK4AQoNQXR0cmlidXRlVHlwZRINCglVTkRFRklORUQQABIJCgVGTE9BVBAB", - "EgcKA0lOVBACEgoKBlNUUklORxADEgoKBlRFTlNPUhAEEgkKBUdSQVBIEAUS", - "EQoNU1BBUlNFX1RFTlNPUhALEgoKBkZMT0FUUxAGEggKBElOVFMQBxILCgdT", - "VFJJTkdTEAgSCwoHVEVOU09SUxAJEgoKBkdSQVBIUxAKEhIKDlNQQVJTRV9U", - "RU5TT1JTEAwiUQoOVmFsdWVJbmZvUHJvdG8SDAoEbmFtZRgBIAEoCRIdCgR0", - "eXBlGAIgASgLMg8ub25ueC5UeXBlUHJvdG8SEgoKZG9jX3N0cmluZxgDIAEo", - "CSKWAQoJTm9kZVByb3RvEg0KBWlucHV0GAEgAygJEg4KBm91dHB1dBgCIAMo", - "CRIMCgRuYW1lGAMgASgJEg8KB29wX3R5cGUYBCABKAkSDgoGZG9tYWluGAcg", - "ASgJEicKCWF0dHJpYnV0ZRgFIAMoCzIULm9ubnguQXR0cmlidXRlUHJvdG8S", - "EgoKZG9jX3N0cmluZxgGIAEoCSLWAQoRVHJhaW5pbmdJbmZvUHJvdG8SKAoO", - "aW5pdGlhbGl6YXRpb24YASABKAsyEC5vbm54LkdyYXBoUHJvdG8SIwoJYWxn", - "b3JpdGhtGAIgASgLMhAub25ueC5HcmFwaFByb3RvEjwKFmluaXRpYWxpemF0", - "aW9uX2JpbmRpbmcYAyADKAsyHC5vbm54LlN0cmluZ1N0cmluZ0VudHJ5UHJv", - "dG8SNAoOdXBkYXRlX2JpbmRpbmcYBCADKAsyHC5vbm54LlN0cmluZ1N0cmlu", - "Z0VudHJ5UHJvdG8iwwIKCk1vZGVsUHJvdG8SEgoKaXJfdmVyc2lvbhgBIAEo", - "AxIuCgxvcHNldF9pbXBvcnQYCCADKAsyGC5vbm54Lk9wZXJhdG9yU2V0SWRQ", - "cm90bxIVCg1wcm9kdWNlcl9uYW1lGAIgASgJEhgKEHByb2R1Y2VyX3ZlcnNp", - "b24YAyABKAkSDgoGZG9tYWluGAQgASgJEhUKDW1vZGVsX3ZlcnNpb24YBSAB", - "KAMSEgoKZG9jX3N0cmluZxgGIAEoCRIfCgVncmFwaBgHIAEoCzIQLm9ubngu", - "R3JhcGhQcm90bxI0Cg5tZXRhZGF0YV9wcm9wcxgOIAMoCzIcLm9ubnguU3Ry", - "aW5nU3RyaW5nRW50cnlQcm90bxIuCg10cmFpbmluZ19pbmZvGBQgAygLMhcu", - "b25ueC5UcmFpbmluZ0luZm9Qcm90byI0ChZTdHJpbmdTdHJpbmdFbnRyeVBy", - "b3RvEgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCSJrChBUZW5zb3JBbm5v", - "dGF0aW9uEhMKC3RlbnNvcl9uYW1lGAEgASgJEkIKHHF1YW50X3BhcmFtZXRl", - "cl90ZW5zb3JfbmFtZXMYAiADKAsyHC5vbm54LlN0cmluZ1N0cmluZ0VudHJ5", - "UHJvdG8i2AIKCkdyYXBoUHJvdG8SHQoEbm9kZRgBIAMoCzIPLm9ubnguTm9k", - "ZVByb3RvEgwKBG5hbWUYAiABKAkSJgoLaW5pdGlhbGl6ZXIYBSADKAsyES5v", - "bm54LlRlbnNvclByb3RvEjMKEnNwYXJzZV9pbml0aWFsaXplchgPIAMoCzIX", - "Lm9ubnguU3BhcnNlVGVuc29yUHJvdG8SEgoKZG9jX3N0cmluZxgKIAEoCRIj", - "CgVpbnB1dBgLIAMoCzIULm9ubnguVmFsdWVJbmZvUHJvdG8SJAoGb3V0cHV0", - "GAwgAygLMhQub25ueC5WYWx1ZUluZm9Qcm90bxIoCgp2YWx1ZV9pbmZvGA0g", - "AygLMhQub25ueC5WYWx1ZUluZm9Qcm90bxI3ChdxdWFudGl6YXRpb25fYW5u", - "b3RhdGlvbhgOIAMoCzIWLm9ubnguVGVuc29yQW5ub3RhdGlvbiK4BQoLVGVu", - "c29yUHJvdG8SDAoEZGltcxgBIAMoAxIRCglkYXRhX3R5cGUYAiABKAUSKgoH", - "c2VnbWVudBgDIAEoCzIZLm9ubnguVGVuc29yUHJvdG8uU2VnbWVudBIWCgpm", - "bG9hdF9kYXRhGAQgAygCQgIQARIWCgppbnQzMl9kYXRhGAUgAygFQgIQARIT", - "CgtzdHJpbmdfZGF0YRgGIAMoDBIWCgppbnQ2NF9kYXRhGAcgAygDQgIQARIM", - "CgRuYW1lGAggASgJEhIKCmRvY19zdHJpbmcYDCABKAkSEAoIcmF3X2RhdGEY", - "CSABKAwSMwoNZXh0ZXJuYWxfZGF0YRgNIAMoCzIcLm9ubnguU3RyaW5nU3Ry", - "aW5nRW50cnlQcm90bxI1Cg1kYXRhX2xvY2F0aW9uGA4gASgOMh4ub25ueC5U", - "ZW5zb3JQcm90by5EYXRhTG9jYXRpb24SFwoLZG91YmxlX2RhdGEYCiADKAFC", - "AhABEhcKC3VpbnQ2NF9kYXRhGAsgAygEQgIQARolCgdTZWdtZW50Eg0KBWJl", - "Z2luGAEgASgDEgsKA2VuZBgCIAEoAyLaAQoIRGF0YVR5cGUSDQoJVU5ERUZJ", - "TkVEEAASCQoFRkxPQVQQARIJCgVVSU5UOBACEggKBElOVDgQAxIKCgZVSU5U", - "MTYQBBIJCgVJTlQxNhAFEgkKBUlOVDMyEAYSCQoFSU5UNjQQBxIKCgZTVFJJ", - "TkcQCBIICgRCT09MEAkSCwoHRkxPQVQxNhAKEgoKBkRPVUJMRRALEgoKBlVJ", - "TlQzMhAMEgoKBlVJTlQ2NBANEg0KCUNPTVBMRVg2NBAOEg4KCkNPTVBMRVgx", - "MjgQDxIMCghCRkxPQVQxNhAQIikKDERhdGFMb2NhdGlvbhILCgdERUZBVUxU", - "EAASDAoIRVhURVJOQUwQASJoChFTcGFyc2VUZW5zb3JQcm90bxIhCgZ2YWx1", - "ZXMYASABKAsyES5vbm54LlRlbnNvclByb3RvEiIKB2luZGljZXMYAiABKAsy", - "ES5vbm54LlRlbnNvclByb3RvEgwKBGRpbXMYAyADKAMilQEKEFRlbnNvclNo", - "YXBlUHJvdG8SLQoDZGltGAEgAygLMiAub25ueC5UZW5zb3JTaGFwZVByb3Rv", - "LkRpbWVuc2lvbhpSCglEaW1lbnNpb24SEwoJZGltX3ZhbHVlGAEgASgDSAAS", - "EwoJZGltX3BhcmFtGAIgASgJSAASEgoKZGVub3RhdGlvbhgDIAEoCUIHCgV2", - "YWx1ZSLlAgoJVHlwZVByb3RvEi0KC3RlbnNvcl90eXBlGAEgASgLMhYub25u", - "eC5UeXBlUHJvdG8uVGVuc29ySAASMQoNc2VxdWVuY2VfdHlwZRgEIAEoCzIY", - "Lm9ubnguVHlwZVByb3RvLlNlcXVlbmNlSAASJwoIbWFwX3R5cGUYBSABKAsy", - "Ey5vbm54LlR5cGVQcm90by5NYXBIABISCgpkZW5vdGF0aW9uGAYgASgJGkIK", - "BlRlbnNvchIRCgllbGVtX3R5cGUYASABKAUSJQoFc2hhcGUYAiABKAsyFi5v", - "bm54LlRlbnNvclNoYXBlUHJvdG8aLgoIU2VxdWVuY2USIgoJZWxlbV90eXBl", - "GAEgASgLMg8ub25ueC5UeXBlUHJvdG8aPAoDTWFwEhAKCGtleV90eXBlGAEg", - "ASgFEiMKCnZhbHVlX3R5cGUYAiABKAsyDy5vbm54LlR5cGVQcm90b0IHCgV2", - "YWx1ZSI1ChJPcGVyYXRvclNldElkUHJvdG8SDgoGZG9tYWluGAEgASgJEg8K", - "B3ZlcnNpb24YAiABKAMqywEKB1ZlcnNpb24SEgoOX1NUQVJUX1ZFUlNJT04Q", - "ABIZChVJUl9WRVJTSU9OXzIwMTdfMTBfMTAQARIZChVJUl9WRVJTSU9OXzIw", - "MTdfMTBfMzAQAhIYChRJUl9WRVJTSU9OXzIwMTdfMTFfMxADEhgKFElSX1ZF", - "UlNJT05fMjAxOV8xXzIyEAQSGAoUSVJfVkVSU0lPTl8yMDE5XzNfMTgQBRIY", - "ChRJUl9WRVJTSU9OXzIwMTlfOV8xORAGEg4KCklSX1ZFUlNJT04QB0ICSANi", - "BnByb3RvMw==")); + "YXJzZVRlbnNvclByb3RvEhsKAnRwGA4gASgLMg8ub25ueC5UeXBlUHJvdG8S", + "DgoGZmxvYXRzGAcgAygCEgwKBGludHMYCCADKAMSDwoHc3RyaW5ncxgJIAMo", + "DBIiCgd0ZW5zb3JzGAogAygLMhEub25ueC5UZW5zb3JQcm90bxIgCgZncmFw", + "aHMYCyADKAsyEC5vbm54LkdyYXBoUHJvdG8SLwoOc3BhcnNlX3RlbnNvcnMY", + "FyADKAsyFy5vbm54LlNwYXJzZVRlbnNvclByb3RvEiQKC3R5cGVfcHJvdG9z", + "GA8gAygLMg8ub25ueC5UeXBlUHJvdG8i2QEKDUF0dHJpYnV0ZVR5cGUSDQoJ", + "VU5ERUZJTkVEEAASCQoFRkxPQVQQARIHCgNJTlQQAhIKCgZTVFJJTkcQAxIK", + "CgZURU5TT1IQBBIJCgVHUkFQSBAFEhEKDVNQQVJTRV9URU5TT1IQCxIOCgpU", + "WVBFX1BST1RPEA0SCgoGRkxPQVRTEAYSCAoESU5UUxAHEgsKB1NUUklOR1MQ", + "CBILCgdURU5TT1JTEAkSCgoGR1JBUEhTEAoSEgoOU1BBUlNFX1RFTlNPUlMQ", + "DBIPCgtUWVBFX1BST1RPUxAOSgQIDBANSgQIEBAUUgF2IocBCg5WYWx1ZUlu", + "Zm9Qcm90bxIMCgRuYW1lGAEgASgJEh0KBHR5cGUYAiABKAsyDy5vbm54LlR5", + "cGVQcm90bxISCgpkb2Nfc3RyaW5nGAMgASgJEjQKDm1ldGFkYXRhX3Byb3Bz", + "GAQgAygLMhwub25ueC5TdHJpbmdTdHJpbmdFbnRyeVByb3RvIt4BCglOb2Rl", + "UHJvdG8SDQoFaW5wdXQYASADKAkSDgoGb3V0cHV0GAIgAygJEgwKBG5hbWUY", + "AyABKAkSDwoHb3BfdHlwZRgEIAEoCRIOCgZkb21haW4YByABKAkSEAoIb3Zl", + "cmxvYWQYCCABKAkSJwoJYXR0cmlidXRlGAUgAygLMhQub25ueC5BdHRyaWJ1", + "dGVQcm90bxISCgpkb2Nfc3RyaW5nGAYgASgJEjQKDm1ldGFkYXRhX3Byb3Bz", + "GAkgAygLMhwub25ueC5TdHJpbmdTdHJpbmdFbnRyeVByb3RvItYBChFUcmFp", + "bmluZ0luZm9Qcm90bxIoCg5pbml0aWFsaXphdGlvbhgBIAEoCzIQLm9ubngu", + "R3JhcGhQcm90bxIjCglhbGdvcml0aG0YAiABKAsyEC5vbm54LkdyYXBoUHJv", + "dG8SPAoWaW5pdGlhbGl6YXRpb25fYmluZGluZxgDIAMoCzIcLm9ubnguU3Ry", + "aW5nU3RyaW5nRW50cnlQcm90bxI0Cg51cGRhdGVfYmluZGluZxgEIAMoCzIc", + "Lm9ubnguU3RyaW5nU3RyaW5nRW50cnlQcm90byLrAgoKTW9kZWxQcm90bxIS", + "Cgppcl92ZXJzaW9uGAEgASgDEi4KDG9wc2V0X2ltcG9ydBgIIAMoCzIYLm9u", + "bnguT3BlcmF0b3JTZXRJZFByb3RvEhUKDXByb2R1Y2VyX25hbWUYAiABKAkS", + "GAoQcHJvZHVjZXJfdmVyc2lvbhgDIAEoCRIOCgZkb21haW4YBCABKAkSFQoN", + "bW9kZWxfdmVyc2lvbhgFIAEoAxISCgpkb2Nfc3RyaW5nGAYgASgJEh8KBWdy", + "YXBoGAcgASgLMhAub25ueC5HcmFwaFByb3RvEjQKDm1ldGFkYXRhX3Byb3Bz", + "GA4gAygLMhwub25ueC5TdHJpbmdTdHJpbmdFbnRyeVByb3RvEi4KDXRyYWlu", + "aW5nX2luZm8YFCADKAsyFy5vbm54LlRyYWluaW5nSW5mb1Byb3RvEiYKCWZ1", + "bmN0aW9ucxgZIAMoCzITLm9ubnguRnVuY3Rpb25Qcm90byI0ChZTdHJpbmdT", + "dHJpbmdFbnRyeVByb3RvEgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCSJr", + "ChBUZW5zb3JBbm5vdGF0aW9uEhMKC3RlbnNvcl9uYW1lGAEgASgJEkIKHHF1", + "YW50X3BhcmFtZXRlcl90ZW5zb3JfbmFtZXMYAiADKAsyHC5vbm54LlN0cmlu", + "Z1N0cmluZ0VudHJ5UHJvdG8i1AMKCkdyYXBoUHJvdG8SHQoEbm9kZRgBIAMo", + "CzIPLm9ubnguTm9kZVByb3RvEgwKBG5hbWUYAiABKAkSJgoLaW5pdGlhbGl6", + "ZXIYBSADKAsyES5vbm54LlRlbnNvclByb3RvEjMKEnNwYXJzZV9pbml0aWFs", + "aXplchgPIAMoCzIXLm9ubnguU3BhcnNlVGVuc29yUHJvdG8SEgoKZG9jX3N0", + "cmluZxgKIAEoCRIjCgVpbnB1dBgLIAMoCzIULm9ubnguVmFsdWVJbmZvUHJv", + "dG8SJAoGb3V0cHV0GAwgAygLMhQub25ueC5WYWx1ZUluZm9Qcm90bxIoCgp2", + "YWx1ZV9pbmZvGA0gAygLMhQub25ueC5WYWx1ZUluZm9Qcm90bxI3ChdxdWFu", + "dGl6YXRpb25fYW5ub3RhdGlvbhgOIAMoCzIWLm9ubnguVGVuc29yQW5ub3Rh", + "dGlvbhI0Cg5tZXRhZGF0YV9wcm9wcxgQIAMoCzIcLm9ubnguU3RyaW5nU3Ry", + "aW5nRW50cnlQcm90b0oECAMQBEoECAQQBUoECAYQClIKaXJfdmVyc2lvblIQ", + "cHJvZHVjZXJfdmVyc2lvblIMcHJvZHVjZXJfdGFnUgZkb21haW4i3QYKC1Rl", + "bnNvclByb3RvEgwKBGRpbXMYASADKAMSEQoJZGF0YV90eXBlGAIgASgFEioK", + "B3NlZ21lbnQYAyABKAsyGS5vbm54LlRlbnNvclByb3RvLlNlZ21lbnQSFgoK", + "ZmxvYXRfZGF0YRgEIAMoAkICEAESFgoKaW50MzJfZGF0YRgFIAMoBUICEAES", + "EwoLc3RyaW5nX2RhdGEYBiADKAwSFgoKaW50NjRfZGF0YRgHIAMoA0ICEAES", + "DAoEbmFtZRgIIAEoCRISCgpkb2Nfc3RyaW5nGAwgASgJEhAKCHJhd19kYXRh", + "GAkgASgMEjMKDWV4dGVybmFsX2RhdGEYDSADKAsyHC5vbm54LlN0cmluZ1N0", + "cmluZ0VudHJ5UHJvdG8SNQoNZGF0YV9sb2NhdGlvbhgOIAEoDjIeLm9ubngu", + "VGVuc29yUHJvdG8uRGF0YUxvY2F0aW9uEhcKC2RvdWJsZV9kYXRhGAogAygB", + "QgIQARIXCgt1aW50NjRfZGF0YRgLIAMoBEICEAESNAoObWV0YWRhdGFfcHJv", + "cHMYECADKAsyHC5vbm54LlN0cmluZ1N0cmluZ0VudHJ5UHJvdG8aJQoHU2Vn", + "bWVudBINCgViZWdpbhgBIAEoAxILCgNlbmQYAiABKAMiyQIKCERhdGFUeXBl", + "Eg0KCVVOREVGSU5FRBAAEgkKBUZMT0FUEAESCQoFVUlOVDgQAhIICgRJTlQ4", + "EAMSCgoGVUlOVDE2EAQSCQoFSU5UMTYQBRIJCgVJTlQzMhAGEgkKBUlOVDY0", + "EAcSCgoGU1RSSU5HEAgSCAoEQk9PTBAJEgsKB0ZMT0FUMTYQChIKCgZET1VC", + "TEUQCxIKCgZVSU5UMzIQDBIKCgZVSU5UNjQQDRINCglDT01QTEVYNjQQDhIO", + "CgpDT01QTEVYMTI4EA8SDAoIQkZMT0FUMTYQEBIQCgxGTE9BVDhFNE0zRk4Q", + "ERISCg5GTE9BVDhFNE0zRk5VWhASEg4KCkZMT0FUOEU1TTIQExISCg5GTE9B", + "VDhFNU0yRk5VWhAUEgkKBVVJTlQ0EBUSCAoESU5UNBAWEg4KCkZMT0FUNEUy", + "TTEQFyIpCgxEYXRhTG9jYXRpb24SCwoHREVGQVVMVBAAEgwKCEVYVEVSTkFM", + "EAEiaAoRU3BhcnNlVGVuc29yUHJvdG8SIQoGdmFsdWVzGAEgASgLMhEub25u", + "eC5UZW5zb3JQcm90bxIiCgdpbmRpY2VzGAIgASgLMhEub25ueC5UZW5zb3JQ", + "cm90bxIMCgRkaW1zGAMgAygDIpUBChBUZW5zb3JTaGFwZVByb3RvEi0KA2Rp", + "bRgBIAMoCzIgLm9ubnguVGVuc29yU2hhcGVQcm90by5EaW1lbnNpb24aUgoJ", + "RGltZW5zaW9uEhMKCWRpbV92YWx1ZRgBIAEoA0gAEhMKCWRpbV9wYXJhbRgC", + "IAEoCUgAEhIKCmRlbm90YXRpb24YAyABKAlCBwoFdmFsdWUizgQKCVR5cGVQ", + "cm90bxItCgt0ZW5zb3JfdHlwZRgBIAEoCzIWLm9ubnguVHlwZVByb3RvLlRl", + "bnNvckgAEjEKDXNlcXVlbmNlX3R5cGUYBCABKAsyGC5vbm54LlR5cGVQcm90", + "by5TZXF1ZW5jZUgAEicKCG1hcF90eXBlGAUgASgLMhMub25ueC5UeXBlUHJv", + "dG8uTWFwSAASMQoNb3B0aW9uYWxfdHlwZRgJIAEoCzIYLm9ubnguVHlwZVBy", + "b3RvLk9wdGlvbmFsSAASOgoSc3BhcnNlX3RlbnNvcl90eXBlGAggASgLMhwu", + "b25ueC5UeXBlUHJvdG8uU3BhcnNlVGVuc29ySAASEgoKZGVub3RhdGlvbhgG", + "IAEoCRpCCgZUZW5zb3ISEQoJZWxlbV90eXBlGAEgASgFEiUKBXNoYXBlGAIg", + "ASgLMhYub25ueC5UZW5zb3JTaGFwZVByb3RvGi4KCFNlcXVlbmNlEiIKCWVs", + "ZW1fdHlwZRgBIAEoCzIPLm9ubnguVHlwZVByb3RvGjwKA01hcBIQCghrZXlf", + "dHlwZRgBIAEoBRIjCgp2YWx1ZV90eXBlGAIgASgLMg8ub25ueC5UeXBlUHJv", + "dG8aLgoIT3B0aW9uYWwSIgoJZWxlbV90eXBlGAEgASgLMg8ub25ueC5UeXBl", + "UHJvdG8aSAoMU3BhcnNlVGVuc29yEhEKCWVsZW1fdHlwZRgBIAEoBRIlCgVz", + "aGFwZRgCIAEoCzIWLm9ubnguVGVuc29yU2hhcGVQcm90b0IHCgV2YWx1ZSI1", + "ChJPcGVyYXRvclNldElkUHJvdG8SDgoGZG9tYWluGAEgASgJEg8KB3ZlcnNp", + "b24YAiABKAMihgMKDUZ1bmN0aW9uUHJvdG8SDAoEbmFtZRgBIAEoCRINCgVp", + "bnB1dBgEIAMoCRIOCgZvdXRwdXQYBSADKAkSEQoJYXR0cmlidXRlGAYgAygJ", + "Ei0KD2F0dHJpYnV0ZV9wcm90bxgLIAMoCzIULm9ubnguQXR0cmlidXRlUHJv", + "dG8SHQoEbm9kZRgHIAMoCzIPLm9ubnguTm9kZVByb3RvEhIKCmRvY19zdHJp", + "bmcYCCABKAkSLgoMb3BzZXRfaW1wb3J0GAkgAygLMhgub25ueC5PcGVyYXRv", + "clNldElkUHJvdG8SDgoGZG9tYWluGAogASgJEhAKCG92ZXJsb2FkGA0gASgJ", + "EigKCnZhbHVlX2luZm8YDCADKAsyFC5vbm54LlZhbHVlSW5mb1Byb3RvEjQK", + "Dm1ldGFkYXRhX3Byb3BzGA4gAygLMhwub25ueC5TdHJpbmdTdHJpbmdFbnRy", + "eVByb3RvSgQIAhADSgQIAxAEUg1zaW5jZV92ZXJzaW9uUgZzdGF0dXMqsQIK", + "B1ZlcnNpb24SEgoOX1NUQVJUX1ZFUlNJT04QABIZChVJUl9WRVJTSU9OXzIw", + "MTdfMTBfMTAQARIZChVJUl9WRVJTSU9OXzIwMTdfMTBfMzAQAhIYChRJUl9W", + "RVJTSU9OXzIwMTdfMTFfMxADEhgKFElSX1ZFUlNJT05fMjAxOV8xXzIyEAQS", + "GAoUSVJfVkVSU0lPTl8yMDE5XzNfMTgQBRIYChRJUl9WRVJTSU9OXzIwMTlf", + "OV8xORAGEhcKE0lSX1ZFUlNJT05fMjAyMF81XzgQBxIYChRJUl9WRVJTSU9O", + "XzIwMjFfN18zMBAIEhcKE0lSX1ZFUlNJT05fMjAyM181XzUQCRIYChRJUl9W", + "RVJTSU9OXzIwMjRfM18yNRAKEg4KCklSX1ZFUlNJT04QCyouCg5PcGVyYXRv", + "clN0YXR1cxIQCgxFWFBFUklNRU5UQUwQABIKCgZTVEFCTEUQAUICSANiBnBy", + "b3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Onnx.Version), }, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.AttributeProto), global::Onnx.AttributeProto.Parser, new[]{ "Name", "RefAttrName", "DocString", "Type", "F", "I", "S", "T", "G", "SparseTensor", "Floats", "Ints", "Strings", "Tensors", "Graphs", "SparseTensors" }, null, new[]{ typeof(global::Onnx.AttributeProto.Types.AttributeType) }, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.ValueInfoProto), global::Onnx.ValueInfoProto.Parser, new[]{ "Name", "Type", "DocString" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.NodeProto), global::Onnx.NodeProto.Parser, new[]{ "Input", "Output", "Name", "OpType", "Domain", "Attribute", "DocString" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Onnx.Version), typeof(global::Onnx.OperatorStatus), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.AttributeProto), global::Onnx.AttributeProto.Parser, new[]{ "Name", "RefAttrName", "DocString", "Type", "F", "I", "S", "T", "G", "SparseTensor", "Tp", "Floats", "Ints", "Strings", "Tensors", "Graphs", "SparseTensors", "TypeProtos" }, null, new[]{ typeof(global::Onnx.AttributeProto.Types.AttributeType) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.ValueInfoProto), global::Onnx.ValueInfoProto.Parser, new[]{ "Name", "Type", "DocString", "MetadataProps" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.NodeProto), global::Onnx.NodeProto.Parser, new[]{ "Input", "Output", "Name", "OpType", "Domain", "Overload", "Attribute", "DocString", "MetadataProps" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TrainingInfoProto), global::Onnx.TrainingInfoProto.Parser, new[]{ "Initialization", "Algorithm", "InitializationBinding", "UpdateBinding" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.ModelProto), global::Onnx.ModelProto.Parser, new[]{ "IrVersion", "OpsetImport", "ProducerName", "ProducerVersion", "Domain", "ModelVersion", "DocString", "Graph", "MetadataProps", "TrainingInfo" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.ModelProto), global::Onnx.ModelProto.Parser, new[]{ "IrVersion", "OpsetImport", "ProducerName", "ProducerVersion", "Domain", "ModelVersion", "DocString", "Graph", "MetadataProps", "TrainingInfo", "Functions" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.StringStringEntryProto), global::Onnx.StringStringEntryProto.Parser, new[]{ "Key", "Value" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TensorAnnotation), global::Onnx.TensorAnnotation.Parser, new[]{ "TensorName", "QuantParameterTensorNames" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.GraphProto), global::Onnx.GraphProto.Parser, new[]{ "Node", "Name", "Initializer", "SparseInitializer", "DocString", "Input", "Output", "ValueInfo", "QuantizationAnnotation" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TensorProto), global::Onnx.TensorProto.Parser, new[]{ "Dims", "DataType", "Segment", "FloatData", "Int32Data", "StringData", "Int64Data", "Name", "DocString", "RawData", "ExternalData", "DataLocation", "DoubleData", "Uint64Data" }, null, new[]{ typeof(global::Onnx.TensorProto.Types.DataType), typeof(global::Onnx.TensorProto.Types.DataLocation) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TensorProto.Types.Segment), global::Onnx.TensorProto.Types.Segment.Parser, new[]{ "Begin", "End" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.GraphProto), global::Onnx.GraphProto.Parser, new[]{ "Node", "Name", "Initializer", "SparseInitializer", "DocString", "Input", "Output", "ValueInfo", "QuantizationAnnotation", "MetadataProps" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TensorProto), global::Onnx.TensorProto.Parser, new[]{ "Dims", "DataType", "Segment", "FloatData", "Int32Data", "StringData", "Int64Data", "Name", "DocString", "RawData", "ExternalData", "DataLocation", "DoubleData", "Uint64Data", "MetadataProps" }, null, new[]{ typeof(global::Onnx.TensorProto.Types.DataType), typeof(global::Onnx.TensorProto.Types.DataLocation) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TensorProto.Types.Segment), global::Onnx.TensorProto.Types.Segment.Parser, new[]{ "Begin", "End" }, null, null, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.SparseTensorProto), global::Onnx.SparseTensorProto.Parser, new[]{ "Values", "Indices", "Dims" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TensorShapeProto), global::Onnx.TensorShapeProto.Parser, new[]{ "Dim" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TensorShapeProto.Types.Dimension), global::Onnx.TensorShapeProto.Types.Dimension.Parser, new[]{ "DimValue", "DimParam", "Denotation" }, new[]{ "Value" }, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TypeProto), global::Onnx.TypeProto.Parser, new[]{ "TensorType", "SequenceType", "MapType", "Denotation" }, new[]{ "Value" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TypeProto.Types.Tensor), global::Onnx.TypeProto.Types.Tensor.Parser, new[]{ "ElemType", "Shape" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TypeProto), global::Onnx.TypeProto.Parser, new[]{ "TensorType", "SequenceType", "MapType", "OptionalType", "SparseTensorType", "Denotation" }, new[]{ "Value" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TypeProto.Types.Tensor), global::Onnx.TypeProto.Types.Tensor.Parser, new[]{ "ElemType", "Shape" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TypeProto.Types.Sequence), global::Onnx.TypeProto.Types.Sequence.Parser, new[]{ "ElemType" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TypeProto.Types.Map), global::Onnx.TypeProto.Types.Map.Parser, new[]{ "KeyType", "ValueType" }, null, null, null, null)}), - new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.OperatorSetIdProto), global::Onnx.OperatorSetIdProto.Parser, new[]{ "Domain", "Version" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TypeProto.Types.Map), global::Onnx.TypeProto.Types.Map.Parser, new[]{ "KeyType", "ValueType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TypeProto.Types.Optional), global::Onnx.TypeProto.Types.Optional.Parser, new[]{ "ElemType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.TypeProto.Types.SparseTensor), global::Onnx.TypeProto.Types.SparseTensor.Parser, new[]{ "ElemType", "Shape" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.OperatorSetIdProto), global::Onnx.OperatorSetIdProto.Parser, new[]{ "Domain", "Version" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Onnx.FunctionProto), global::Onnx.FunctionProto.Parser, new[]{ "Name", "Input", "Output", "Attribute", "AttributeProto", "Node", "DocString", "OpsetImport", "Domain", "Overload", "ValueInfo", "MetadataProps" }, null, null, null, null) })); } #endregion @@ -182,7 +215,7 @@ public enum Version { /// [pbr::OriginalName("IR_VERSION_2019_9_19")] IrVersion2019919 = 6, /// - /// IR VERSION 7 published on <TBD> + /// IR VERSION 7 published on May 8, 2020 /// - Add support to allow function body graph to rely on multiple external opreator sets. /// - Add a list to promote inference graph's initializers to global and /// mutable variables. Global variables are visible in all graphs of the @@ -192,7 +225,39 @@ public enum Version { /// can modify the values of mutable variables. /// - Implicitly add inference graph into each TrainingInfoProto's algorithm. /// - [pbr::OriginalName("IR_VERSION")] IrVersion = 7, + [pbr::OriginalName("IR_VERSION_2020_5_8")] IrVersion202058 = 7, + /// + /// IR VERSION 8 published on July 30, 2021 + /// Introduce TypeProto.SparseTensor + /// Introduce TypeProto.Optional + /// Added a list of FunctionProtos local to the model + /// Deprecated since_version and operator status from FunctionProto + /// + [pbr::OriginalName("IR_VERSION_2021_7_30")] IrVersion2021730 = 8, + /// + /// IR VERSION 9 published on May 5, 2023 + /// Added AttributeProto to FunctionProto so that default attribute values can be set. + /// Added FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ. + /// + [pbr::OriginalName("IR_VERSION_2023_5_5")] IrVersion202355 = 9, + /// + /// IR VERSION 10 published on March 25, 2024 + /// Added UINT4, INT4. + /// + [pbr::OriginalName("IR_VERSION_2024_3_25")] IrVersion2024325 = 10, + /// + /// IR VERSION 11 published on TBD + /// Added FLOAT4E2M1. + /// + [pbr::OriginalName("IR_VERSION")] IrVersion = 11, + } + + /// + /// Operator/function status. + /// + public enum OperatorStatus { + [pbr::OriginalName("EXPERIMENTAL")] Experimental = 0, + [pbr::OriginalName("STABLE")] Stable = 1, } #endregion @@ -206,6 +271,7 @@ public enum Version { /// An AttributeProto MUST contain the name field, and *only one* of the /// following content fields, effectively enforcing a C/C++ union equivalent. /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class AttributeProto : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -214,19 +280,23 @@ public sealed partial class AttributeProto : pb::IMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AttributeProto()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.OnnxReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AttributeProto() { OnConstruction(); } @@ -234,6 +304,7 @@ public AttributeProto() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AttributeProto(AttributeProto other) : this() { name_ = other.name_; refAttrName_ = other.refAttrName_; @@ -245,16 +316,19 @@ public AttributeProto(AttributeProto other) : this() { t_ = other.t_ != null ? other.t_.Clone() : null; g_ = other.g_ != null ? other.g_.Clone() : null; sparseTensor_ = other.sparseTensor_ != null ? other.sparseTensor_.Clone() : null; + tp_ = other.tp_ != null ? other.tp_.Clone() : null; floats_ = other.floats_.Clone(); ints_ = other.ints_.Clone(); strings_ = other.strings_.Clone(); tensors_ = other.tensors_.Clone(); graphs_ = other.graphs_.Clone(); sparseTensors_ = other.sparseTensors_.Clone(); + typeProtos_ = other.typeProtos_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AttributeProto Clone() { return new AttributeProto(this); } @@ -266,6 +340,7 @@ public AttributeProto Clone() { /// The name field MUST be present for this version of the IR. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Name { get { return name_; } set { @@ -283,6 +358,7 @@ public string Name { /// NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string RefAttrName { get { return refAttrName_; } set { @@ -297,6 +373,7 @@ public string RefAttrName { /// A human-readable documentation for this attribute. Markdown is allowed. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string DocString { get { return docString_; } set { @@ -316,6 +393,7 @@ public string DocString { /// change was made to accommodate proto3 implementations. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.AttributeProto.Types.AttributeType Type { get { return type_; } set { @@ -330,6 +408,7 @@ public string DocString { /// Exactly ONE of the following fields must be present for this version of the IR /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public float F { get { return f_; } set { @@ -344,6 +423,7 @@ public float F { /// int /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long I { get { return i_; } set { @@ -358,6 +438,7 @@ public long I { /// UTF-8 string /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString S { get { return s_; } set { @@ -372,6 +453,7 @@ public long I { /// tensor value /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.TensorProto T { get { return t_; } set { @@ -386,6 +468,7 @@ public long I { /// graph /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.GraphProto G { get { return g_; } set { @@ -400,6 +483,7 @@ public long I { /// sparse tensor value /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.SparseTensorProto SparseTensor { get { return sparseTensor_; } set { @@ -407,6 +491,22 @@ public long I { } } + /// Field number for the "tp" field. + public const int TpFieldNumber = 14; + private global::Onnx.TypeProto tp_; + /// + /// Do not use field below, it's deprecated. + /// optional ValueProto v = 12; // value - subsumes everything but graph + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Onnx.TypeProto Tp { + get { return tp_; } + set { + tp_ = value; + } + } + /// Field number for the "floats" field. public const int FloatsFieldNumber = 7; private static readonly pb::FieldCodec _repeated_floats_codec @@ -416,6 +516,7 @@ public long I { /// list of floats /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Floats { get { return floats_; } } @@ -429,6 +530,7 @@ public long I { /// list of ints /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Ints { get { return ints_; } } @@ -442,6 +544,7 @@ public long I { /// list of UTF-8 strings /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Strings { get { return strings_; } } @@ -455,6 +558,7 @@ public long I { /// list of tensors /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Tensors { get { return tensors_; } } @@ -468,6 +572,7 @@ public long I { /// list of graph /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Graphs { get { return graphs_; } } @@ -481,16 +586,33 @@ public long I { /// list of sparse tensors /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField SparseTensors { get { return sparseTensors_; } } + /// Field number for the "type_protos" field. + public const int TypeProtosFieldNumber = 15; + private static readonly pb::FieldCodec _repeated_typeProtos_codec + = pb::FieldCodec.ForMessage(122, global::Onnx.TypeProto.Parser); + private readonly pbc::RepeatedField typeProtos_ = new pbc::RepeatedField(); + /// + /// list of type protos + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField TypeProtos { + get { return typeProtos_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as AttributeProto); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(AttributeProto other) { if (ReferenceEquals(other, null)) { return false; @@ -508,16 +630,19 @@ public bool Equals(AttributeProto other) { if (!object.Equals(T, other.T)) return false; if (!object.Equals(G, other.G)) return false; if (!object.Equals(SparseTensor, other.SparseTensor)) return false; + if (!object.Equals(Tp, other.Tp)) return false; if(!floats_.Equals(other.floats_)) return false; if(!ints_.Equals(other.ints_)) return false; if(!strings_.Equals(other.strings_)) return false; if(!tensors_.Equals(other.tensors_)) return false; if(!graphs_.Equals(other.graphs_)) return false; if(!sparseTensors_.Equals(other.sparseTensors_)) return false; + if(!typeProtos_.Equals(other.typeProtos_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Name.Length != 0) hash ^= Name.GetHashCode(); @@ -530,12 +655,14 @@ public override int GetHashCode() { if (t_ != null) hash ^= T.GetHashCode(); if (g_ != null) hash ^= G.GetHashCode(); if (sparseTensor_ != null) hash ^= SparseTensor.GetHashCode(); + if (tp_ != null) hash ^= Tp.GetHashCode(); hash ^= floats_.GetHashCode(); hash ^= ints_.GetHashCode(); hash ^= strings_.GetHashCode(); hash ^= tensors_.GetHashCode(); hash ^= graphs_.GetHashCode(); hash ^= sparseTensors_.GetHashCode(); + hash ^= typeProtos_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -543,11 +670,13 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); @@ -585,6 +714,11 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(106); output.WriteString(DocString); } + if (tp_ != null) { + output.WriteRawTag(114); + output.WriteMessage(Tp); + } + typeProtos_.WriteTo(output, _repeated_typeProtos_codec); if (Type != global::Onnx.AttributeProto.Types.AttributeType.Undefined) { output.WriteRawTag(160, 1); output.WriteEnum((int) Type); @@ -606,6 +740,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (Name.Length != 0) { output.WriteRawTag(10); @@ -640,6 +775,11 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(106); output.WriteString(DocString); } + if (tp_ != null) { + output.WriteRawTag(114); + output.WriteMessage(Tp); + } + typeProtos_.WriteTo(ref output, _repeated_typeProtos_codec); if (Type != global::Onnx.AttributeProto.Types.AttributeType.Undefined) { output.WriteRawTag(160, 1); output.WriteEnum((int) Type); @@ -660,6 +800,7 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Name.Length != 0) { @@ -692,12 +833,16 @@ public int CalculateSize() { if (sparseTensor_ != null) { size += 2 + pb::CodedOutputStream.ComputeMessageSize(SparseTensor); } + if (tp_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Tp); + } size += floats_.CalculateSize(_repeated_floats_codec); size += ints_.CalculateSize(_repeated_ints_codec); size += strings_.CalculateSize(_repeated_strings_codec); size += tensors_.CalculateSize(_repeated_tensors_codec); size += graphs_.CalculateSize(_repeated_graphs_codec); size += sparseTensors_.CalculateSize(_repeated_sparseTensors_codec); + size += typeProtos_.CalculateSize(_repeated_typeProtos_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -705,6 +850,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(AttributeProto other) { if (other == null) { return; @@ -748,23 +894,35 @@ public void MergeFrom(AttributeProto other) { } SparseTensor.MergeFrom(other.SparseTensor); } + if (other.tp_ != null) { + if (tp_ == null) { + Tp = new global::Onnx.TypeProto(); + } + Tp.MergeFrom(other.Tp); + } floats_.Add(other.floats_); ints_.Add(other.ints_); strings_.Add(other.strings_); tensors_.Add(other.tensors_); graphs_.Add(other.graphs_); sparseTensors_.Add(other.sparseTensors_); + typeProtos_.Add(other.typeProtos_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -824,6 +982,17 @@ public void MergeFrom(pb::CodedInputStream input) { DocString = input.ReadString(); break; } + case 114: { + if (tp_ == null) { + Tp = new global::Onnx.TypeProto(); + } + input.ReadMessage(Tp); + break; + } + case 122: { + typeProtos_.AddEntriesFrom(input, _repeated_typeProtos_codec); + break; + } case 160: { Type = (global::Onnx.AttributeProto.Types.AttributeType) input.ReadEnum(); break; @@ -850,10 +1019,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -913,6 +1087,17 @@ public void MergeFrom(pb::CodedInputStream input) { DocString = input.ReadString(); break; } + case 114: { + if (tp_ == null) { + Tp = new global::Onnx.TypeProto(); + } + input.ReadMessage(Tp); + break; + } + case 122: { + typeProtos_.AddEntriesFrom(ref input, _repeated_typeProtos_codec); + break; + } case 160: { Type = (global::Onnx.AttributeProto.Types.AttributeType) input.ReadEnum(); break; @@ -940,6 +1125,7 @@ public void MergeFrom(pb::CodedInputStream input) { #region Nested types /// Container for nested types declared in the AttributeProto message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static partial class Types { /// /// Note: this enum is structurally identical to the OpSchema::AttrType @@ -953,12 +1139,14 @@ public enum AttributeType { [pbr::OriginalName("TENSOR")] Tensor = 4, [pbr::OriginalName("GRAPH")] Graph = 5, [pbr::OriginalName("SPARSE_TENSOR")] SparseTensor = 11, + [pbr::OriginalName("TYPE_PROTO")] TypeProto = 13, [pbr::OriginalName("FLOATS")] Floats = 6, [pbr::OriginalName("INTS")] Ints = 7, [pbr::OriginalName("STRINGS")] Strings = 8, [pbr::OriginalName("TENSORS")] Tensors = 9, [pbr::OriginalName("GRAPHS")] Graphs = 10, [pbr::OriginalName("SPARSE_TENSORS")] SparseTensors = 12, + [pbr::OriginalName("TYPE_PROTOS")] TypeProtos = 14, } } @@ -970,6 +1158,7 @@ public enum AttributeType { /// Defines information on value, including the name, the type, and /// the shape of the value. /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class ValueInfoProto : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -978,19 +1167,23 @@ public sealed partial class ValueInfoProto : pb::IMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ValueInfoProto()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.OnnxReflection.Descriptor.MessageTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ValueInfoProto() { OnConstruction(); } @@ -998,14 +1191,17 @@ public ValueInfoProto() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ValueInfoProto(ValueInfoProto other) : this() { name_ = other.name_; type_ = other.type_ != null ? other.type_.Clone() : null; docString_ = other.docString_; + metadataProps_ = other.metadataProps_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ValueInfoProto Clone() { return new ValueInfoProto(this); } @@ -1017,6 +1213,7 @@ public ValueInfoProto Clone() { /// This field MUST be present in this version of the IR. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Name { get { return name_; } set { @@ -1032,6 +1229,7 @@ public string Name { /// inputs and outputs of the top-level graph. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.TypeProto Type { get { return type_; } set { @@ -1046,6 +1244,7 @@ public string Name { /// A human-readable documentation for this value. Markdown is allowed. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string DocString { get { return docString_; } set { @@ -1053,12 +1252,28 @@ public string DocString { } } + /// Field number for the "metadata_props" field. + public const int MetadataPropsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_metadataProps_codec + = pb::FieldCodec.ForMessage(34, global::Onnx.StringStringEntryProto.Parser); + private readonly pbc::RepeatedField metadataProps_ = new pbc::RepeatedField(); + /// + /// Named metadata values; keys should be distinct. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField MetadataProps { + get { return metadataProps_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as ValueInfoProto); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(ValueInfoProto other) { if (ReferenceEquals(other, null)) { return false; @@ -1069,15 +1284,18 @@ public bool Equals(ValueInfoProto other) { if (Name != other.Name) return false; if (!object.Equals(Type, other.Type)) return false; if (DocString != other.DocString) return false; + if(!metadataProps_.Equals(other.metadataProps_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Name.Length != 0) hash ^= Name.GetHashCode(); if (type_ != null) hash ^= Type.GetHashCode(); if (DocString.Length != 0) hash ^= DocString.GetHashCode(); + hash ^= metadataProps_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1085,11 +1303,13 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); @@ -1106,6 +1326,7 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(26); output.WriteString(DocString); } + metadataProps_.WriteTo(output, _repeated_metadataProps_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1114,6 +1335,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (Name.Length != 0) { output.WriteRawTag(10); @@ -1127,6 +1349,7 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(26); output.WriteString(DocString); } + metadataProps_.WriteTo(ref output, _repeated_metadataProps_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -1134,6 +1357,7 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Name.Length != 0) { @@ -1145,6 +1369,7 @@ public int CalculateSize() { if (DocString.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(DocString); } + size += metadataProps_.CalculateSize(_repeated_metadataProps_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1152,6 +1377,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(ValueInfoProto other) { if (other == null) { return; @@ -1168,17 +1394,23 @@ public void MergeFrom(ValueInfoProto other) { if (other.DocString.Length != 0) { DocString = other.DocString; } + metadataProps_.Add(other.metadataProps_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1197,6 +1429,10 @@ public void MergeFrom(pb::CodedInputStream input) { DocString = input.ReadString(); break; } + case 34: { + metadataProps_.AddEntriesFrom(input, _repeated_metadataProps_codec); + break; + } } } #endif @@ -1204,10 +1440,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -1226,6 +1467,10 @@ public void MergeFrom(pb::CodedInputStream input) { DocString = input.ReadString(); break; } + case 34: { + metadataProps_.AddEntriesFrom(ref input, _repeated_metadataProps_codec); + break; + } } } } @@ -1242,6 +1487,7 @@ public void MergeFrom(pb::CodedInputStream input) { /// For example, it can be a node of type "Conv" that takes in an image, a filter /// tensor and a bias tensor, and produces the convolved output. /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class NodeProto : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -1250,19 +1496,23 @@ public sealed partial class NodeProto : pb::IMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NodeProto()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.OnnxReflection.Descriptor.MessageTypes[2]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public NodeProto() { OnConstruction(); } @@ -1270,18 +1520,22 @@ public NodeProto() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public NodeProto(NodeProto other) : this() { input_ = other.input_.Clone(); output_ = other.output_.Clone(); name_ = other.name_; opType_ = other.opType_; domain_ = other.domain_; + overload_ = other.overload_; attribute_ = other.attribute_.Clone(); docString_ = other.docString_; + metadataProps_ = other.metadataProps_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public NodeProto Clone() { return new NodeProto(this); } @@ -1295,6 +1549,7 @@ public NodeProto Clone() { /// namespace Value /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Input { get { return input_; } } @@ -1308,6 +1563,7 @@ public NodeProto Clone() { /// namespace Value /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Output { get { return output_; } } @@ -1317,9 +1573,10 @@ public NodeProto Clone() { private string name_ = ""; /// /// An optional identifier for this node in a graph. - /// This field MAY be absent in ths version of the IR. + /// This field MAY be absent in this version of the IR. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Name { get { return name_; } set { @@ -1334,6 +1591,7 @@ public string Name { /// The symbolic identifier of the Operator to execute. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string OpType { get { return opType_; } set { @@ -1348,6 +1606,7 @@ public string OpType { /// The domain of the OperatorSet that specifies the operator named by op_type. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Domain { get { return domain_; } set { @@ -1355,6 +1614,21 @@ public string Domain { } } + /// Field number for the "overload" field. + public const int OverloadFieldNumber = 8; + private string overload_ = ""; + /// + /// Overload identifier, used only to map this to a model-local function. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Overload { + get { return overload_; } + set { + overload_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Field number for the "attribute" field. public const int AttributeFieldNumber = 5; private static readonly pb::FieldCodec _repeated_attribute_codec @@ -1364,6 +1638,7 @@ public string Domain { /// Additional named attributes. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Attribute { get { return attribute_; } } @@ -1375,6 +1650,7 @@ public string Domain { /// A human-readable documentation for this node. Markdown is allowed. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string DocString { get { return docString_; } set { @@ -1382,12 +1658,28 @@ public string DocString { } } + /// Field number for the "metadata_props" field. + public const int MetadataPropsFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_metadataProps_codec + = pb::FieldCodec.ForMessage(74, global::Onnx.StringStringEntryProto.Parser); + private readonly pbc::RepeatedField metadataProps_ = new pbc::RepeatedField(); + /// + /// Named metadata values; keys should be distinct. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField MetadataProps { + get { return metadataProps_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as NodeProto); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(NodeProto other) { if (ReferenceEquals(other, null)) { return false; @@ -1400,12 +1692,15 @@ public bool Equals(NodeProto other) { if (Name != other.Name) return false; if (OpType != other.OpType) return false; if (Domain != other.Domain) return false; + if (Overload != other.Overload) return false; if(!attribute_.Equals(other.attribute_)) return false; if (DocString != other.DocString) return false; + if(!metadataProps_.Equals(other.metadataProps_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= input_.GetHashCode(); @@ -1413,8 +1708,10 @@ public override int GetHashCode() { if (Name.Length != 0) hash ^= Name.GetHashCode(); if (OpType.Length != 0) hash ^= OpType.GetHashCode(); if (Domain.Length != 0) hash ^= Domain.GetHashCode(); + if (Overload.Length != 0) hash ^= Overload.GetHashCode(); hash ^= attribute_.GetHashCode(); if (DocString.Length != 0) hash ^= DocString.GetHashCode(); + hash ^= metadataProps_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1422,11 +1719,13 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); @@ -1450,6 +1749,11 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(58); output.WriteString(Domain); } + if (Overload.Length != 0) { + output.WriteRawTag(66); + output.WriteString(Overload); + } + metadataProps_.WriteTo(output, _repeated_metadataProps_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1458,6 +1762,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { input_.WriteTo(ref output, _repeated_input_codec); output_.WriteTo(ref output, _repeated_output_codec); @@ -1478,6 +1783,11 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(58); output.WriteString(Domain); } + if (Overload.Length != 0) { + output.WriteRawTag(66); + output.WriteString(Overload); + } + metadataProps_.WriteTo(ref output, _repeated_metadataProps_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -1485,6 +1795,7 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += input_.CalculateSize(_repeated_input_codec); @@ -1498,10 +1809,14 @@ public int CalculateSize() { if (Domain.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Domain); } + if (Overload.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Overload); + } size += attribute_.CalculateSize(_repeated_attribute_codec); if (DocString.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(DocString); } + size += metadataProps_.CalculateSize(_repeated_metadataProps_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1509,6 +1824,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(NodeProto other) { if (other == null) { return; @@ -1524,21 +1840,30 @@ public void MergeFrom(NodeProto other) { if (other.Domain.Length != 0) { Domain = other.Domain; } + if (other.Overload.Length != 0) { + Overload = other.Overload; + } attribute_.Add(other.attribute_); if (other.DocString.Length != 0) { DocString = other.DocString; } + metadataProps_.Add(other.metadataProps_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1570,6 +1895,14 @@ public void MergeFrom(pb::CodedInputStream input) { Domain = input.ReadString(); break; } + case 66: { + Overload = input.ReadString(); + break; + } + case 74: { + metadataProps_.AddEntriesFrom(input, _repeated_metadataProps_codec); + break; + } } } #endif @@ -1577,10 +1910,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -1612,6 +1950,14 @@ public void MergeFrom(pb::CodedInputStream input) { Domain = input.ReadString(); break; } + case 66: { + Overload = input.ReadString(); + break; + } + case 74: { + metadataProps_.AddEntriesFrom(ref input, _repeated_metadataProps_codec); + break; + } } } } @@ -1640,6 +1986,7 @@ public void MergeFrom(pb::CodedInputStream input) { /// consecutive update steps (such as block coordinate descent methods), /// the user needs to create a TrainingInfoProto for each step. /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class TrainingInfoProto : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -1648,19 +1995,23 @@ public sealed partial class TrainingInfoProto : pb::IMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TrainingInfoProto()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.OnnxReflection.Descriptor.MessageTypes[3]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TrainingInfoProto() { OnConstruction(); } @@ -1668,6 +2019,7 @@ public TrainingInfoProto() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TrainingInfoProto(TrainingInfoProto other) : this() { initialization_ = other.initialization_ != null ? other.initialization_.Clone() : null; algorithm_ = other.algorithm_ != null ? other.algorithm_.Clone() : null; @@ -1677,6 +2029,7 @@ public TrainingInfoProto(TrainingInfoProto other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TrainingInfoProto Clone() { return new TrainingInfoProto(this); } @@ -1700,6 +2053,7 @@ public TrainingInfoProto Clone() { /// produce any output. Thus, no initializer would be changed by default. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.GraphProto Initialization { get { return initialization_; } set { @@ -1718,7 +2072,7 @@ public TrainingInfoProto Clone() { /// /// An execution of the training algorithm step is performed by executing the /// graph obtained by combining the inference graph (namely "ModelProto.graph") - /// and the "algorithm" graph. That is, the actual the actual + /// and the "algorithm" graph. That is, the actual /// input/initializer/output/node/value_info/sparse_initializer list of /// the training graph is the concatenation of /// "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer" @@ -1742,6 +2096,7 @@ public TrainingInfoProto Clone() { /// update any initializers. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.GraphProto Algorithm { get { return algorithm_; } set { @@ -1764,6 +2119,7 @@ public TrainingInfoProto Clone() { /// by the execution of "initialization". /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField InitializationBinding { get { return initializationBinding_; } } @@ -1816,16 +2172,19 @@ public TrainingInfoProto Clone() { /// by the execution of "algorithm". /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField UpdateBinding { get { return updateBinding_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as TrainingInfoProto); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(TrainingInfoProto other) { if (ReferenceEquals(other, null)) { return false; @@ -1841,6 +2200,7 @@ public bool Equals(TrainingInfoProto other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (initialization_ != null) hash ^= Initialization.GetHashCode(); @@ -1854,11 +2214,13 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); @@ -1881,6 +2243,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (initialization_ != null) { output.WriteRawTag(10); @@ -1899,6 +2262,7 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (initialization_ != null) { @@ -1916,6 +2280,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(TrainingInfoProto other) { if (other == null) { return; @@ -1938,13 +2303,18 @@ public void MergeFrom(TrainingInfoProto other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1977,10 +2347,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -2021,6 +2396,7 @@ public void MergeFrom(pb::CodedInputStream input) { /// /// The semantics of the model are described by the associated GraphProto's. /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class ModelProto : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -2029,19 +2405,23 @@ public sealed partial class ModelProto : pb::IMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ModelProto()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.OnnxReflection.Descriptor.MessageTypes[4]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ModelProto() { OnConstruction(); } @@ -2049,6 +2429,7 @@ public ModelProto() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ModelProto(ModelProto other) : this() { irVersion_ = other.irVersion_; opsetImport_ = other.opsetImport_.Clone(); @@ -2060,10 +2441,12 @@ public ModelProto(ModelProto other) : this() { graph_ = other.graph_ != null ? other.graph_.Clone() : null; metadataProps_ = other.metadataProps_.Clone(); trainingInfo_ = other.trainingInfo_.Clone(); + functions_ = other.functions_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ModelProto Clone() { return new ModelProto(this); } @@ -2076,6 +2459,7 @@ public ModelProto Clone() { /// This field MUST be present. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long IrVersion { get { return irVersion_; } set { @@ -2099,6 +2483,7 @@ public long IrVersion { /// in the referenced operator sets. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField OpsetImport { get { return opsetImport_; } } @@ -2112,6 +2497,7 @@ public long IrVersion { /// emitted the model. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ProducerName { get { return producerName_; } set { @@ -2128,6 +2514,7 @@ public string ProducerName { /// emitted the model. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ProducerVersion { get { return producerVersion_; } set { @@ -2147,6 +2534,7 @@ public string ProducerVersion { /// the graph. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Domain { get { return domain_; } set { @@ -2161,6 +2549,7 @@ public string Domain { /// The version of the graph encoded. See Version enum below. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long ModelVersion { get { return modelVersion_; } set { @@ -2175,6 +2564,7 @@ public long ModelVersion { /// A human-readable documentation for this model. Markdown is allowed. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string DocString { get { return docString_; } set { @@ -2189,6 +2579,7 @@ public string DocString { /// The parameterized graph that is evaluated to execute the model. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.GraphProto Graph { get { return graph_; } set { @@ -2205,6 +2596,7 @@ public string DocString { /// Named metadata values; keys should be distinct. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField MetadataProps { get { return metadataProps_; } } @@ -2226,16 +2618,48 @@ public string DocString { /// If this field is empty, the training behavior of the model is undefined. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField TrainingInfo { get { return trainingInfo_; } } + /// Field number for the "functions" field. + public const int FunctionsFieldNumber = 25; + private static readonly pb::FieldCodec _repeated_functions_codec + = pb::FieldCodec.ForMessage(202, global::Onnx.FunctionProto.Parser); + private readonly pbc::RepeatedField functions_ = new pbc::RepeatedField(); + /// + /// A list of function protos local to the model. + /// + /// The (domain, name, overload) tuple must be unique across the function protos in this list. + /// In case of any conflicts the behavior (whether the model local functions are given higher priority, + /// or standard operator sets are given higher priotity or this is treated as error) is defined by + /// the runtimes. + /// + /// The operator sets imported by FunctionProto should be compatible with the ones + /// imported by ModelProto and other model local FunctionProtos. + /// Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto + /// or by 2 FunctionProtos then versions for the operator set may be different but, + /// the operator schema returned for op_type, domain, version combination + /// for both the versions should be same for every node in the function body. + /// + /// One FunctionProto can reference other FunctionProto in the model, however, recursive reference + /// is not allowed. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Functions { + get { return functions_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as ModelProto); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(ModelProto other) { if (ReferenceEquals(other, null)) { return false; @@ -2253,10 +2677,12 @@ public bool Equals(ModelProto other) { if (!object.Equals(Graph, other.Graph)) return false; if(!metadataProps_.Equals(other.metadataProps_)) return false; if(!trainingInfo_.Equals(other.trainingInfo_)) return false; + if(!functions_.Equals(other.functions_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (IrVersion != 0L) hash ^= IrVersion.GetHashCode(); @@ -2269,6 +2695,7 @@ public override int GetHashCode() { if (graph_ != null) hash ^= Graph.GetHashCode(); hash ^= metadataProps_.GetHashCode(); hash ^= trainingInfo_.GetHashCode(); + hash ^= functions_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -2276,11 +2703,13 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); @@ -2316,6 +2745,7 @@ public void WriteTo(pb::CodedOutputStream output) { opsetImport_.WriteTo(output, _repeated_opsetImport_codec); metadataProps_.WriteTo(output, _repeated_metadataProps_codec); trainingInfo_.WriteTo(output, _repeated_trainingInfo_codec); + functions_.WriteTo(output, _repeated_functions_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -2324,6 +2754,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (IrVersion != 0L) { output.WriteRawTag(8); @@ -2356,6 +2787,7 @@ public void WriteTo(pb::CodedOutputStream output) { opsetImport_.WriteTo(ref output, _repeated_opsetImport_codec); metadataProps_.WriteTo(ref output, _repeated_metadataProps_codec); trainingInfo_.WriteTo(ref output, _repeated_trainingInfo_codec); + functions_.WriteTo(ref output, _repeated_functions_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -2363,6 +2795,7 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (IrVersion != 0L) { @@ -2389,6 +2822,7 @@ public int CalculateSize() { } size += metadataProps_.CalculateSize(_repeated_metadataProps_codec); size += trainingInfo_.CalculateSize(_repeated_trainingInfo_codec); + size += functions_.CalculateSize(_repeated_functions_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -2396,6 +2830,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(ModelProto other) { if (other == null) { return; @@ -2427,17 +2862,23 @@ public void MergeFrom(ModelProto other) { } metadataProps_.Add(other.metadataProps_); trainingInfo_.Add(other.trainingInfo_); + functions_.Add(other.functions_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2484,6 +2925,10 @@ public void MergeFrom(pb::CodedInputStream input) { trainingInfo_.AddEntriesFrom(input, _repeated_trainingInfo_codec); break; } + case 202: { + functions_.AddEntriesFrom(input, _repeated_functions_codec); + break; + } } } #endif @@ -2491,10 +2936,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -2541,6 +2991,10 @@ public void MergeFrom(pb::CodedInputStream input) { trainingInfo_.AddEntriesFrom(ref input, _repeated_trainingInfo_codec); break; } + case 202: { + functions_.AddEntriesFrom(ref input, _repeated_functions_codec); + break; + } } } } @@ -2552,6 +3006,7 @@ public void MergeFrom(pb::CodedInputStream input) { /// StringStringEntryProto follows the pattern for cross-proto-version maps. /// See https://developers.google.com/protocol-buffers/docs/proto3#maps /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class StringStringEntryProto : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -2560,19 +3015,23 @@ public sealed partial class StringStringEntryProto : pb::IMessage _parser = new pb::MessageParser(() => new StringStringEntryProto()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.OnnxReflection.Descriptor.MessageTypes[5]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public StringStringEntryProto() { OnConstruction(); } @@ -2580,6 +3039,7 @@ public StringStringEntryProto() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public StringStringEntryProto(StringStringEntryProto other) : this() { key_ = other.key_; value_ = other.value_; @@ -2587,6 +3047,7 @@ public StringStringEntryProto(StringStringEntryProto other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public StringStringEntryProto Clone() { return new StringStringEntryProto(this); } @@ -2595,6 +3056,7 @@ public StringStringEntryProto Clone() { public const int KeyFieldNumber = 1; private string key_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Key { get { return key_; } set { @@ -2606,6 +3068,7 @@ public string Key { public const int ValueFieldNumber = 2; private string value_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Value { get { return value_; } set { @@ -2614,11 +3077,13 @@ public string Value { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as StringStringEntryProto); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(StringStringEntryProto other) { if (ReferenceEquals(other, null)) { return false; @@ -2632,6 +3097,7 @@ public bool Equals(StringStringEntryProto other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Key.Length != 0) hash ^= Key.GetHashCode(); @@ -2643,11 +3109,13 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); @@ -2668,6 +3136,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (Key.Length != 0) { output.WriteRawTag(10); @@ -2684,6 +3153,7 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Key.Length != 0) { @@ -2699,6 +3169,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(StringStringEntryProto other) { if (other == null) { return; @@ -2713,13 +3184,18 @@ public void MergeFrom(StringStringEntryProto other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2738,10 +3214,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -2760,6 +3241,7 @@ public void MergeFrom(pb::CodedInputStream input) { } + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class TensorAnnotation : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -2768,19 +3250,23 @@ public sealed partial class TensorAnnotation : pb::IMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TensorAnnotation()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.OnnxReflection.Descriptor.MessageTypes[6]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TensorAnnotation() { OnConstruction(); } @@ -2788,6 +3274,7 @@ public TensorAnnotation() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TensorAnnotation(TensorAnnotation other) : this() { tensorName_ = other.tensorName_; quantParameterTensorNames_ = other.quantParameterTensorNames_.Clone(); @@ -2795,6 +3282,7 @@ public TensorAnnotation(TensorAnnotation other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TensorAnnotation Clone() { return new TensorAnnotation(this); } @@ -2803,6 +3291,7 @@ public TensorAnnotation Clone() { public const int TensorNameFieldNumber = 1; private string tensorName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string TensorName { get { return tensorName_; } set { @@ -2822,16 +3311,19 @@ public string TensorName { /// quantization parameter keys. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField QuantParameterTensorNames { get { return quantParameterTensorNames_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as TensorAnnotation); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(TensorAnnotation other) { if (ReferenceEquals(other, null)) { return false; @@ -2845,6 +3337,7 @@ public bool Equals(TensorAnnotation other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (TensorName.Length != 0) hash ^= TensorName.GetHashCode(); @@ -2856,11 +3349,13 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); @@ -2878,6 +3373,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (TensorName.Length != 0) { output.WriteRawTag(10); @@ -2891,6 +3387,7 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (TensorName.Length != 0) { @@ -2904,6 +3401,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(TensorAnnotation other) { if (other == null) { return; @@ -2916,13 +3414,18 @@ public void MergeFrom(TensorAnnotation other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2941,10 +3444,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -2971,6 +3479,7 @@ public void MergeFrom(pb::CodedInputStream input) { /// This is the equivalent of the "network" or "graph" in many deep learning /// frameworks. /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class GraphProto : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -2979,19 +3488,23 @@ public sealed partial class GraphProto : pb::IMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GraphProto()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.OnnxReflection.Descriptor.MessageTypes[7]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public GraphProto() { OnConstruction(); } @@ -2999,6 +3512,7 @@ public GraphProto() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public GraphProto(GraphProto other) : this() { node_ = other.node_.Clone(); name_ = other.name_; @@ -3009,10 +3523,12 @@ public GraphProto(GraphProto other) : this() { output_ = other.output_.Clone(); valueInfo_ = other.valueInfo_.Clone(); quantizationAnnotation_ = other.quantizationAnnotation_.Clone(); + metadataProps_ = other.metadataProps_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public GraphProto Clone() { return new GraphProto(this); } @@ -3026,6 +3542,7 @@ public GraphProto Clone() { /// The nodes in the graph, sorted topologically. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Node { get { return node_; } } @@ -3037,6 +3554,7 @@ public GraphProto Clone() { /// The name of the graph. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Name { get { return name_; } set { @@ -3056,6 +3574,7 @@ public string Name { /// but the name MAY also appear in the input list. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Initializer { get { return initializer_; } } @@ -3069,6 +3588,7 @@ public string Name { /// Initializers (see above) stored in sparse format. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField SparseInitializer { get { return sparseInitializer_; } } @@ -3080,6 +3600,7 @@ public string Name { /// A human-readable documentation for this graph. Markdown is allowed. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string DocString { get { return docString_; } set { @@ -3096,6 +3617,7 @@ public string DocString { /// The inputs and outputs of the graph. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Input { get { return input_; } } @@ -3106,6 +3628,7 @@ public string DocString { = pb::FieldCodec.ForMessage(98, global::Onnx.ValueInfoProto.Parser); private readonly pbc::RepeatedField output_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Output { get { return output_; } } @@ -3120,6 +3643,7 @@ public string DocString { /// must be distinct. It is optional for a value to appear in value_info list. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField ValueInfo { get { return valueInfo_; } } @@ -3136,16 +3660,33 @@ public string DocString { /// which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField QuantizationAnnotation { get { return quantizationAnnotation_; } } + /// Field number for the "metadata_props" field. + public const int MetadataPropsFieldNumber = 16; + private static readonly pb::FieldCodec _repeated_metadataProps_codec + = pb::FieldCodec.ForMessage(130, global::Onnx.StringStringEntryProto.Parser); + private readonly pbc::RepeatedField metadataProps_ = new pbc::RepeatedField(); + /// + /// Named metadata values; keys should be distinct. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField MetadataProps { + get { return metadataProps_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as GraphProto); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(GraphProto other) { if (ReferenceEquals(other, null)) { return false; @@ -3162,10 +3703,12 @@ public bool Equals(GraphProto other) { if(!output_.Equals(other.output_)) return false; if(!valueInfo_.Equals(other.valueInfo_)) return false; if(!quantizationAnnotation_.Equals(other.quantizationAnnotation_)) return false; + if(!metadataProps_.Equals(other.metadataProps_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= node_.GetHashCode(); @@ -3177,6 +3720,7 @@ public override int GetHashCode() { hash ^= output_.GetHashCode(); hash ^= valueInfo_.GetHashCode(); hash ^= quantizationAnnotation_.GetHashCode(); + hash ^= metadataProps_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3184,11 +3728,13 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); @@ -3208,6 +3754,7 @@ public void WriteTo(pb::CodedOutputStream output) { valueInfo_.WriteTo(output, _repeated_valueInfo_codec); quantizationAnnotation_.WriteTo(output, _repeated_quantizationAnnotation_codec); sparseInitializer_.WriteTo(output, _repeated_sparseInitializer_codec); + metadataProps_.WriteTo(output, _repeated_metadataProps_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -3216,6 +3763,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { node_.WriteTo(ref output, _repeated_node_codec); if (Name.Length != 0) { @@ -3232,6 +3780,7 @@ public void WriteTo(pb::CodedOutputStream output) { valueInfo_.WriteTo(ref output, _repeated_valueInfo_codec); quantizationAnnotation_.WriteTo(ref output, _repeated_quantizationAnnotation_codec); sparseInitializer_.WriteTo(ref output, _repeated_sparseInitializer_codec); + metadataProps_.WriteTo(ref output, _repeated_metadataProps_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -3239,6 +3788,7 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += node_.CalculateSize(_repeated_node_codec); @@ -3254,6 +3804,7 @@ public int CalculateSize() { size += output_.CalculateSize(_repeated_output_codec); size += valueInfo_.CalculateSize(_repeated_valueInfo_codec); size += quantizationAnnotation_.CalculateSize(_repeated_quantizationAnnotation_codec); + size += metadataProps_.CalculateSize(_repeated_metadataProps_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3261,6 +3812,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(GraphProto other) { if (other == null) { return; @@ -3278,17 +3830,23 @@ public void MergeFrom(GraphProto other) { output_.Add(other.output_); valueInfo_.Add(other.valueInfo_); quantizationAnnotation_.Add(other.quantizationAnnotation_); + metadataProps_.Add(other.metadataProps_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3328,6 +3886,10 @@ public void MergeFrom(pb::CodedInputStream input) { sparseInitializer_.AddEntriesFrom(input, _repeated_sparseInitializer_codec); break; } + case 130: { + metadataProps_.AddEntriesFrom(input, _repeated_metadataProps_codec); + break; + } } } #endif @@ -3335,10 +3897,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -3378,6 +3945,10 @@ public void MergeFrom(pb::CodedInputStream input) { sparseInitializer_.AddEntriesFrom(ref input, _repeated_sparseInitializer_codec); break; } + case 130: { + metadataProps_.AddEntriesFrom(ref input, _repeated_metadataProps_codec); + break; + } } } } @@ -3390,6 +3961,7 @@ public void MergeFrom(pb::CodedInputStream input) { /// /// A serialized tensor value. /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class TensorProto : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -3398,19 +3970,23 @@ public sealed partial class TensorProto : pb::IMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TensorProto()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.OnnxReflection.Descriptor.MessageTypes[8]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TensorProto() { OnConstruction(); } @@ -3418,6 +3994,7 @@ public TensorProto() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TensorProto(TensorProto other) : this() { dims_ = other.dims_.Clone(); dataType_ = other.dataType_; @@ -3433,10 +4010,12 @@ public TensorProto(TensorProto other) : this() { dataLocation_ = other.dataLocation_; doubleData_ = other.doubleData_.Clone(); uint64Data_ = other.uint64Data_.Clone(); + metadataProps_ = other.metadataProps_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TensorProto Clone() { return new TensorProto(this); } @@ -3450,6 +4029,7 @@ public TensorProto Clone() { /// The shape of the tensor. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Dims { get { return dims_; } } @@ -3462,6 +4042,7 @@ public TensorProto Clone() { /// This field MUST have a valid TensorProto.DataType value /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int DataType { get { return dataType_; } set { @@ -3473,6 +4054,7 @@ public int DataType { public const int SegmentFieldNumber = 3; private global::Onnx.TensorProto.Types.Segment segment_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.TensorProto.Types.Segment Segment { get { return segment_; } set { @@ -3495,6 +4077,7 @@ public int DataType { /// When this field is present, the data_type field MUST be FLOAT or COMPLEX64. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField FloatData { get { return floatData_; } } @@ -3505,13 +4088,16 @@ public int DataType { = pb::FieldCodec.ForInt32(42); private readonly pbc::RepeatedField int32Data_ = new pbc::RepeatedField(); /// - /// For int32, uint8, int8, uint16, int16, bool, and float16 values - /// float16 values must be bit-wise converted to an uint16_t prior + /// For int32, uint8, int8, uint16, int16, uint4, int4, bool, float8 and float16 values + /// float16 and float8 values must be bit-wise converted to an uint16_t prior /// to writing to the buffer. + /// uint4 and int4 values must be packed to 4bitx2 prior to writing to the buffer, the first element is stored in + /// the 4 LSB and the second element is stored in the 4 MSB. /// When this field is present, the data_type field MUST be - /// INT32, INT16, INT8, UINT16, UINT8, BOOL, or FLOAT16 + /// INT32, INT16, INT8, INT4, UINT16, UINT8, UINT4, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Int32Data { get { return int32Data_; } } @@ -3529,6 +4115,7 @@ public int DataType { /// When this field is present, the data_type field MUST be STRING /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField StringData { get { return stringData_; } } @@ -3543,6 +4130,7 @@ public int DataType { /// When this field is present, the data_type field MUST be INT64 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Int64Data { get { return int64Data_; } } @@ -3554,6 +4142,7 @@ public int DataType { /// Optionally, a name for the tensor. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Name { get { return name_; } set { @@ -3568,6 +4157,7 @@ public string Name { /// A human-readable documentation for this tensor. Markdown is allowed. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string DocString { get { return docString_; } set { @@ -3589,6 +4179,7 @@ public string DocString { /// Complex64 elements must be written as two consecutive FLOAT values, real component first. /// Complex128 elements must be written as two consecutive DOUBLE values, real component first. /// Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false). + /// uint4 and int4 values must be packed to 4bitx2, the first element is stored in the 4 LSB and the second element is stored in the 4 MSB. /// /// Note: the advantage of specific field rather than the raw_data field is /// that in some cases (e.g. int data), protobuf does a better packing via @@ -3596,6 +4187,7 @@ public string DocString { /// When this field is present, the data_type field MUST NOT be STRING or UNDEFINED /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString RawData { get { return rawData_; } set { @@ -3620,6 +4212,7 @@ public string DocString { /// - "checksum" (optional) - SHA1 digest of file specified in under 'location' key. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField ExternalData { get { return externalData_; } } @@ -3631,6 +4224,7 @@ public string DocString { /// If value not set, data is stored in raw_data (if set) otherwise in type-specified field. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.TensorProto.Types.DataLocation DataLocation { get { return dataLocation_; } set { @@ -3653,6 +4247,7 @@ public string DocString { /// When this field is present, the data_type field MUST be DOUBLE or COMPLEX128 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField DoubleData { get { return doubleData_; } } @@ -3668,16 +4263,33 @@ public string DocString { /// UINT32 or UINT64 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Uint64Data { get { return uint64Data_; } } + /// Field number for the "metadata_props" field. + public const int MetadataPropsFieldNumber = 16; + private static readonly pb::FieldCodec _repeated_metadataProps_codec + = pb::FieldCodec.ForMessage(130, global::Onnx.StringStringEntryProto.Parser); + private readonly pbc::RepeatedField metadataProps_ = new pbc::RepeatedField(); + /// + /// Named metadata values; keys should be distinct. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField MetadataProps { + get { return metadataProps_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as TensorProto); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(TensorProto other) { if (ReferenceEquals(other, null)) { return false; @@ -3699,10 +4311,12 @@ public bool Equals(TensorProto other) { if (DataLocation != other.DataLocation) return false; if(!doubleData_.Equals(other.doubleData_)) return false; if(!uint64Data_.Equals(other.uint64Data_)) return false; + if(!metadataProps_.Equals(other.metadataProps_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= dims_.GetHashCode(); @@ -3719,6 +4333,7 @@ public override int GetHashCode() { if (DataLocation != global::Onnx.TensorProto.Types.DataLocation.Default) hash ^= DataLocation.GetHashCode(); hash ^= doubleData_.GetHashCode(); hash ^= uint64Data_.GetHashCode(); + hash ^= metadataProps_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3726,11 +4341,13 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); @@ -3767,6 +4384,7 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(112); output.WriteEnum((int) DataLocation); } + metadataProps_.WriteTo(output, _repeated_metadataProps_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -3775,6 +4393,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { dims_.WriteTo(ref output, _repeated_dims_codec); if (DataType != 0) { @@ -3808,6 +4427,7 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(112); output.WriteEnum((int) DataLocation); } + metadataProps_.WriteTo(ref output, _repeated_metadataProps_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -3815,6 +4435,7 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += dims_.CalculateSize(_repeated_dims_codec); @@ -3843,6 +4464,7 @@ public int CalculateSize() { } size += doubleData_.CalculateSize(_repeated_doubleData_codec); size += uint64Data_.CalculateSize(_repeated_uint64Data_codec); + size += metadataProps_.CalculateSize(_repeated_metadataProps_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3850,6 +4472,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(TensorProto other) { if (other == null) { return; @@ -3883,17 +4506,23 @@ public void MergeFrom(TensorProto other) { } doubleData_.Add(other.doubleData_); uint64Data_.Add(other.uint64Data_); + metadataProps_.Add(other.metadataProps_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3962,6 +4591,10 @@ public void MergeFrom(pb::CodedInputStream input) { DataLocation = (global::Onnx.TensorProto.Types.DataLocation) input.ReadEnum(); break; } + case 130: { + metadataProps_.AddEntriesFrom(input, _repeated_metadataProps_codec); + break; + } } } #endif @@ -3969,10 +4602,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -4041,6 +4679,10 @@ public void MergeFrom(pb::CodedInputStream input) { DataLocation = (global::Onnx.TensorProto.Types.DataLocation) input.ReadEnum(); break; } + case 130: { + metadataProps_.AddEntriesFrom(ref input, _repeated_metadataProps_codec); + break; + } } } } @@ -4049,6 +4691,7 @@ public void MergeFrom(pb::CodedInputStream input) { #region Nested types /// Container for nested types declared in the TensorProto message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static partial class Types { public enum DataType { [pbr::OriginalName("UNDEFINED")] Undefined = 0, @@ -4110,6 +4753,39 @@ public enum DataType { /// This format has 1 sign bit, 8 exponent bits, and 7 mantissa bits. /// [pbr::OriginalName("BFLOAT16")] Bfloat16 = 16, + /// + /// Non-IEEE floating-point format based on papers + /// FP8 Formats for Deep Learning, https://arxiv.org/abs/2209.05433, + /// 8-bit Numerical Formats For Deep Neural Networks, https://arxiv.org/pdf/2206.02915.pdf. + /// Operators supported FP8 are Cast, CastLike, QuantizeLinear, DequantizeLinear. + /// The computation usually happens inside a block quantize / dequantize + /// fused by the runtime. + /// + [pbr::OriginalName("FLOAT8E4M3FN")] Float8E4M3Fn = 17, + /// + /// float 8, mostly used for coefficients, supports nan, not inf, no negative zero + /// + [pbr::OriginalName("FLOAT8E4M3FNUZ")] Float8E4M3Fnuz = 18, + /// + /// follows IEEE 754, supports nan, inf, mostly used for gradients + /// + [pbr::OriginalName("FLOAT8E5M2")] Float8E5M2 = 19, + /// + /// follows IEEE 754, supports nan, not inf, mostly used for gradients, no negative zero + /// + [pbr::OriginalName("FLOAT8E5M2FNUZ")] Float8E5M2Fnuz = 20, + /// + /// 4-bit integer data types + /// + [pbr::OriginalName("UINT4")] Uint4 = 21, + /// + /// Signed integer in range [-8, 7], using two's-complement representation + /// + [pbr::OriginalName("INT4")] Int4 = 22, + /// + /// 4-bit floating point data types + /// + [pbr::OriginalName("FLOAT4E2M1")] Float4E2M1 = 23, } /// @@ -4127,6 +4803,7 @@ public enum DataLocation { /// case the following fields will specify the segment that is stored in /// the current TensorProto. /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class Segment : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -4135,19 +4812,23 @@ public sealed partial class Segment : pb::IMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Segment()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.TensorProto.Descriptor.NestedTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Segment() { OnConstruction(); } @@ -4155,6 +4836,7 @@ public Segment() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Segment(Segment other) : this() { begin_ = other.begin_; end_ = other.end_; @@ -4162,6 +4844,7 @@ public Segment(Segment other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Segment Clone() { return new Segment(this); } @@ -4170,6 +4853,7 @@ public Segment Clone() { public const int BeginFieldNumber = 1; private long begin_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long Begin { get { return begin_; } set { @@ -4181,6 +4865,7 @@ public long Begin { public const int EndFieldNumber = 2; private long end_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long End { get { return end_; } set { @@ -4189,11 +4874,13 @@ public long End { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as Segment); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(Segment other) { if (ReferenceEquals(other, null)) { return false; @@ -4207,6 +4894,7 @@ public bool Equals(Segment other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Begin != 0L) hash ^= Begin.GetHashCode(); @@ -4218,11 +4906,13 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); @@ -4243,6 +4933,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (Begin != 0L) { output.WriteRawTag(8); @@ -4259,6 +4950,7 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Begin != 0L) { @@ -4274,6 +4966,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(Segment other) { if (other == null) { return; @@ -4288,13 +4981,18 @@ public void MergeFrom(Segment other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -4313,10 +5011,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -4343,6 +5046,7 @@ public void MergeFrom(pb::CodedInputStream input) { /// /// A serialized sparse-tensor value /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class SparseTensorProto : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -4351,19 +5055,23 @@ public sealed partial class SparseTensorProto : pb::IMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SparseTensorProto()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.OnnxReflection.Descriptor.MessageTypes[9]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SparseTensorProto() { OnConstruction(); } @@ -4371,6 +5079,7 @@ public SparseTensorProto() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SparseTensorProto(SparseTensorProto other) : this() { values_ = other.values_ != null ? other.values_.Clone() : null; indices_ = other.indices_ != null ? other.indices_.Clone() : null; @@ -4379,6 +5088,7 @@ public SparseTensorProto(SparseTensorProto other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SparseTensorProto Clone() { return new SparseTensorProto(this); } @@ -4393,6 +5103,7 @@ public SparseTensorProto Clone() { /// when used in sparse_initializer list. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.TensorProto Values { get { return values_; } set { @@ -4416,6 +5127,7 @@ public SparseTensorProto Clone() { /// e.g., index-value [1,4] must appear before [2,1] /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.TensorProto Indices { get { return indices_; } set { @@ -4432,16 +5144,19 @@ public SparseTensorProto Clone() { /// The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank] /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Dims { get { return dims_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SparseTensorProto); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SparseTensorProto other) { if (ReferenceEquals(other, null)) { return false; @@ -4456,6 +5171,7 @@ public bool Equals(SparseTensorProto other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (values_ != null) hash ^= Values.GetHashCode(); @@ -4468,11 +5184,13 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); @@ -4494,6 +5212,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (values_ != null) { output.WriteRawTag(10); @@ -4511,6 +5230,7 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (values_ != null) { @@ -4527,6 +5247,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SparseTensorProto other) { if (other == null) { return; @@ -4548,13 +5269,18 @@ public void MergeFrom(SparseTensorProto other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -4584,10 +5310,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -4622,6 +5353,7 @@ public void MergeFrom(pb::CodedInputStream input) { /// or a symbolic variable. A symbolic variable represents an unknown /// dimension. /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class TensorShapeProto : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -4630,19 +5362,23 @@ public sealed partial class TensorShapeProto : pb::IMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TensorShapeProto()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.OnnxReflection.Descriptor.MessageTypes[10]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TensorShapeProto() { OnConstruction(); } @@ -4650,12 +5386,14 @@ public TensorShapeProto() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TensorShapeProto(TensorShapeProto other) : this() { dim_ = other.dim_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TensorShapeProto Clone() { return new TensorShapeProto(this); } @@ -4666,16 +5404,19 @@ public TensorShapeProto Clone() { = pb::FieldCodec.ForMessage(10, global::Onnx.TensorShapeProto.Types.Dimension.Parser); private readonly pbc::RepeatedField dim_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Dim { get { return dim_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as TensorShapeProto); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(TensorShapeProto other) { if (ReferenceEquals(other, null)) { return false; @@ -4688,6 +5429,7 @@ public bool Equals(TensorShapeProto other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= dim_.GetHashCode(); @@ -4698,11 +5440,13 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); @@ -4716,6 +5460,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { dim_.WriteTo(ref output, _repeated_dim_codec); if (_unknownFields != null) { @@ -4725,6 +5470,7 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += dim_.CalculateSize(_repeated_dim_codec); @@ -4735,6 +5481,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(TensorShapeProto other) { if (other == null) { return; @@ -4744,13 +5491,18 @@ public void MergeFrom(TensorShapeProto other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -4765,10 +5517,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -4784,7 +5541,9 @@ public void MergeFrom(pb::CodedInputStream input) { #region Nested types /// Container for nested types declared in the TensorShapeProto message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static partial class Types { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class Dimension : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -4793,19 +5552,23 @@ public sealed partial class Dimension : pb::IMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Dimension()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.TensorShapeProto.Descriptor.NestedTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Dimension() { OnConstruction(); } @@ -4813,6 +5576,7 @@ public Dimension() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Dimension(Dimension other) : this() { denotation_ = other.denotation_; switch (other.ValueCase) { @@ -4828,6 +5592,7 @@ public Dimension(Dimension other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Dimension Clone() { return new Dimension(this); } @@ -4835,13 +5600,28 @@ public Dimension Clone() { /// Field number for the "dim_value" field. public const int DimValueFieldNumber = 1; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long DimValue { - get { return valueCase_ == ValueOneofCase.DimValue ? (long) value_ : 0L; } + get { return HasDimValue ? (long) value_ : 0L; } set { value_ = value; valueCase_ = ValueOneofCase.DimValue; } } + /// Gets whether the "dim_value" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDimValue { + get { return valueCase_ == ValueOneofCase.DimValue; } + } + /// Clears the value of the oneof if it's currently set to "dim_value" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDimValue() { + if (HasDimValue) { + ClearValue(); + } + } /// Field number for the "dim_param" field. public const int DimParamFieldNumber = 2; @@ -4849,13 +5629,28 @@ public long DimValue { /// namespace Shape /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string DimParam { - get { return valueCase_ == ValueOneofCase.DimParam ? (string) value_ : ""; } + get { return HasDimParam ? (string) value_ : ""; } set { value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); valueCase_ = ValueOneofCase.DimParam; } } + /// Gets whether the "dim_param" field is set + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasDimParam { + get { return valueCase_ == ValueOneofCase.DimParam; } + } + /// Clears the value of the oneof if it's currently set to "dim_param" + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void ClearDimParam() { + if (HasDimParam) { + ClearValue(); + } + } /// Field number for the "denotation" field. public const int DenotationFieldNumber = 3; @@ -4864,10 +5659,11 @@ public string DimParam { /// Standard denotation can optionally be used to denote tensor /// dimensions with standard semantic descriptions to ensure /// that operations are applied to the correct axis of a tensor. - /// Refer to https://github.com/onnx/onnx/blob/master/docs/DimensionDenotation.md#denotation-definition + /// Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition /// for pre-defined dimension denotations. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Denotation { get { return denotation_; } set { @@ -4884,22 +5680,26 @@ public enum ValueOneofCase { } private ValueOneofCase valueCase_ = ValueOneofCase.None; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ValueOneofCase ValueCase { get { return valueCase_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void ClearValue() { valueCase_ = ValueOneofCase.None; value_ = null; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as Dimension); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(Dimension other) { if (ReferenceEquals(other, null)) { return false; @@ -4915,10 +5715,11 @@ public bool Equals(Dimension other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (valueCase_ == ValueOneofCase.DimValue) hash ^= DimValue.GetHashCode(); - if (valueCase_ == ValueOneofCase.DimParam) hash ^= DimParam.GetHashCode(); + if (HasDimValue) hash ^= DimValue.GetHashCode(); + if (HasDimParam) hash ^= DimParam.GetHashCode(); if (Denotation.Length != 0) hash ^= Denotation.GetHashCode(); hash ^= (int) valueCase_; if (_unknownFields != null) { @@ -4928,20 +5729,22 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (valueCase_ == ValueOneofCase.DimValue) { + if (HasDimValue) { output.WriteRawTag(8); output.WriteInt64(DimValue); } - if (valueCase_ == ValueOneofCase.DimParam) { + if (HasDimParam) { output.WriteRawTag(18); output.WriteString(DimParam); } @@ -4957,12 +5760,13 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (valueCase_ == ValueOneofCase.DimValue) { + if (HasDimValue) { output.WriteRawTag(8); output.WriteInt64(DimValue); } - if (valueCase_ == ValueOneofCase.DimParam) { + if (HasDimParam) { output.WriteRawTag(18); output.WriteString(DimParam); } @@ -4977,12 +5781,13 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (valueCase_ == ValueOneofCase.DimValue) { + if (HasDimValue) { size += 1 + pb::CodedOutputStream.ComputeInt64Size(DimValue); } - if (valueCase_ == ValueOneofCase.DimParam) { + if (HasDimParam) { size += 1 + pb::CodedOutputStream.ComputeStringSize(DimParam); } if (Denotation.Length != 0) { @@ -4995,6 +5800,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(Dimension other) { if (other == null) { return; @@ -5015,13 +5821,18 @@ public void MergeFrom(Dimension other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -5044,10 +5855,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -5080,6 +5896,7 @@ public void MergeFrom(pb::CodedInputStream input) { /// /// The standard ONNX data types. /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class TypeProto : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -5088,19 +5905,23 @@ public sealed partial class TypeProto : pb::IMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TypeProto()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.OnnxReflection.Descriptor.MessageTypes[11]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TypeProto() { OnConstruction(); } @@ -5108,6 +5929,7 @@ public TypeProto() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TypeProto(TypeProto other) : this() { denotation_ = other.denotation_; switch (other.ValueCase) { @@ -5120,12 +5942,19 @@ public TypeProto(TypeProto other) : this() { case ValueOneofCase.MapType: MapType = other.MapType.Clone(); break; + case ValueOneofCase.OptionalType: + OptionalType = other.OptionalType.Clone(); + break; + case ValueOneofCase.SparseTensorType: + SparseTensorType = other.SparseTensorType.Clone(); + break; } _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TypeProto Clone() { return new TypeProto(this); } @@ -5136,6 +5965,7 @@ public TypeProto Clone() { /// The type of a tensor. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.TypeProto.Types.Tensor TensorType { get { return valueCase_ == ValueOneofCase.TensorType ? (global::Onnx.TypeProto.Types.Tensor) value_ : null; } set { @@ -5150,6 +5980,7 @@ public TypeProto Clone() { /// The type of a sequence. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.TypeProto.Types.Sequence SequenceType { get { return valueCase_ == ValueOneofCase.SequenceType ? (global::Onnx.TypeProto.Types.Sequence) value_ : null; } set { @@ -5164,6 +5995,7 @@ public TypeProto Clone() { /// The type of a map. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.TypeProto.Types.Map MapType { get { return valueCase_ == ValueOneofCase.MapType ? (global::Onnx.TypeProto.Types.Map) value_ : null; } set { @@ -5172,16 +6004,47 @@ public TypeProto Clone() { } } - /// Field number for the "denotation" field. - public const int DenotationFieldNumber = 6; - private string denotation_ = ""; + /// Field number for the "optional_type" field. + public const int OptionalTypeFieldNumber = 9; + /// + /// The type of an optional. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Onnx.TypeProto.Types.Optional OptionalType { + get { return valueCase_ == ValueOneofCase.OptionalType ? (global::Onnx.TypeProto.Types.Optional) value_ : null; } + set { + value_ = value; + valueCase_ = value == null ? ValueOneofCase.None : ValueOneofCase.OptionalType; + } + } + + /// Field number for the "sparse_tensor_type" field. + public const int SparseTensorTypeFieldNumber = 8; + /// + /// Type of the sparse tensor + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Onnx.TypeProto.Types.SparseTensor SparseTensorType { + get { return valueCase_ == ValueOneofCase.SparseTensorType ? (global::Onnx.TypeProto.Types.SparseTensor) value_ : null; } + set { + value_ = value; + valueCase_ = value == null ? ValueOneofCase.None : ValueOneofCase.SparseTensorType; + } + } + + /// Field number for the "denotation" field. + public const int DenotationFieldNumber = 6; + private string denotation_ = ""; /// /// An optional denotation can be used to denote the whole /// type with a standard semantic description as to what is - /// stored inside. Refer to https://github.com/onnx/onnx/blob/master/docs/TypeDenotation.md#type-denotation-definition + /// stored inside. Refer to https://github.com/onnx/onnx/blob/main/docs/TypeDenotation.md#type-denotation-definition /// for pre-defined type denotations. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Denotation { get { return denotation_; } set { @@ -5196,25 +6059,31 @@ public enum ValueOneofCase { TensorType = 1, SequenceType = 4, MapType = 5, + OptionalType = 9, + SparseTensorType = 8, } private ValueOneofCase valueCase_ = ValueOneofCase.None; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ValueOneofCase ValueCase { get { return valueCase_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void ClearValue() { valueCase_ = ValueOneofCase.None; value_ = null; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as TypeProto); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(TypeProto other) { if (ReferenceEquals(other, null)) { return false; @@ -5225,17 +6094,22 @@ public bool Equals(TypeProto other) { if (!object.Equals(TensorType, other.TensorType)) return false; if (!object.Equals(SequenceType, other.SequenceType)) return false; if (!object.Equals(MapType, other.MapType)) return false; + if (!object.Equals(OptionalType, other.OptionalType)) return false; + if (!object.Equals(SparseTensorType, other.SparseTensorType)) return false; if (Denotation != other.Denotation) return false; if (ValueCase != other.ValueCase) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (valueCase_ == ValueOneofCase.TensorType) hash ^= TensorType.GetHashCode(); if (valueCase_ == ValueOneofCase.SequenceType) hash ^= SequenceType.GetHashCode(); if (valueCase_ == ValueOneofCase.MapType) hash ^= MapType.GetHashCode(); + if (valueCase_ == ValueOneofCase.OptionalType) hash ^= OptionalType.GetHashCode(); + if (valueCase_ == ValueOneofCase.SparseTensorType) hash ^= SparseTensorType.GetHashCode(); if (Denotation.Length != 0) hash ^= Denotation.GetHashCode(); hash ^= (int) valueCase_; if (_unknownFields != null) { @@ -5245,11 +6119,13 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); @@ -5270,6 +6146,14 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(50); output.WriteString(Denotation); } + if (valueCase_ == ValueOneofCase.SparseTensorType) { + output.WriteRawTag(66); + output.WriteMessage(SparseTensorType); + } + if (valueCase_ == ValueOneofCase.OptionalType) { + output.WriteRawTag(74); + output.WriteMessage(OptionalType); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -5278,6 +6162,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (valueCase_ == ValueOneofCase.TensorType) { output.WriteRawTag(10); @@ -5295,6 +6180,14 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(50); output.WriteString(Denotation); } + if (valueCase_ == ValueOneofCase.SparseTensorType) { + output.WriteRawTag(66); + output.WriteMessage(SparseTensorType); + } + if (valueCase_ == ValueOneofCase.OptionalType) { + output.WriteRawTag(74); + output.WriteMessage(OptionalType); + } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -5302,6 +6195,7 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (valueCase_ == ValueOneofCase.TensorType) { @@ -5313,6 +6207,12 @@ public int CalculateSize() { if (valueCase_ == ValueOneofCase.MapType) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(MapType); } + if (valueCase_ == ValueOneofCase.OptionalType) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(OptionalType); + } + if (valueCase_ == ValueOneofCase.SparseTensorType) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SparseTensorType); + } if (Denotation.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Denotation); } @@ -5323,6 +6223,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(TypeProto other) { if (other == null) { return; @@ -5349,19 +6250,36 @@ public void MergeFrom(TypeProto other) { } MapType.MergeFrom(other.MapType); break; + case ValueOneofCase.OptionalType: + if (OptionalType == null) { + OptionalType = new global::Onnx.TypeProto.Types.Optional(); + } + OptionalType.MergeFrom(other.OptionalType); + break; + case ValueOneofCase.SparseTensorType: + if (SparseTensorType == null) { + SparseTensorType = new global::Onnx.TypeProto.Types.SparseTensor(); + } + SparseTensorType.MergeFrom(other.SparseTensorType); + break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -5396,6 +6314,24 @@ public void MergeFrom(pb::CodedInputStream input) { Denotation = input.ReadString(); break; } + case 66: { + global::Onnx.TypeProto.Types.SparseTensor subBuilder = new global::Onnx.TypeProto.Types.SparseTensor(); + if (valueCase_ == ValueOneofCase.SparseTensorType) { + subBuilder.MergeFrom(SparseTensorType); + } + input.ReadMessage(subBuilder); + SparseTensorType = subBuilder; + break; + } + case 74: { + global::Onnx.TypeProto.Types.Optional subBuilder = new global::Onnx.TypeProto.Types.Optional(); + if (valueCase_ == ValueOneofCase.OptionalType) { + subBuilder.MergeFrom(OptionalType); + } + input.ReadMessage(subBuilder); + OptionalType = subBuilder; + break; + } } } #endif @@ -5403,10 +6339,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -5441,6 +6382,24 @@ public void MergeFrom(pb::CodedInputStream input) { Denotation = input.ReadString(); break; } + case 66: { + global::Onnx.TypeProto.Types.SparseTensor subBuilder = new global::Onnx.TypeProto.Types.SparseTensor(); + if (valueCase_ == ValueOneofCase.SparseTensorType) { + subBuilder.MergeFrom(SparseTensorType); + } + input.ReadMessage(subBuilder); + SparseTensorType = subBuilder; + break; + } + case 74: { + global::Onnx.TypeProto.Types.Optional subBuilder = new global::Onnx.TypeProto.Types.Optional(); + if (valueCase_ == ValueOneofCase.OptionalType) { + subBuilder.MergeFrom(OptionalType); + } + input.ReadMessage(subBuilder); + OptionalType = subBuilder; + break; + } } } } @@ -5449,7 +6408,9 @@ public void MergeFrom(pb::CodedInputStream input) { #region Nested types /// Container for nested types declared in the TypeProto message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static partial class Types { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class Tensor : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -5458,19 +6419,23 @@ public sealed partial class Tensor : pb::IMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Tensor()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.TypeProto.Descriptor.NestedTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Tensor() { OnConstruction(); } @@ -5478,6 +6443,7 @@ public Tensor() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Tensor(Tensor other) : this() { elemType_ = other.elemType_; shape_ = other.shape_ != null ? other.shape_.Clone() : null; @@ -5485,6 +6451,7 @@ public Tensor(Tensor other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Tensor Clone() { return new Tensor(this); } @@ -5498,6 +6465,7 @@ public Tensor Clone() { /// This field MUST be present for this version of the IR. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int ElemType { get { return elemType_; } set { @@ -5509,6 +6477,7 @@ public int ElemType { public const int ShapeFieldNumber = 2; private global::Onnx.TensorShapeProto shape_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.TensorShapeProto Shape { get { return shape_; } set { @@ -5517,11 +6486,13 @@ public int ElemType { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as Tensor); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(Tensor other) { if (ReferenceEquals(other, null)) { return false; @@ -5535,6 +6506,7 @@ public bool Equals(Tensor other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (ElemType != 0) hash ^= ElemType.GetHashCode(); @@ -5546,11 +6518,13 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); @@ -5571,6 +6545,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (ElemType != 0) { output.WriteRawTag(8); @@ -5587,6 +6562,7 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (ElemType != 0) { @@ -5602,6 +6578,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(Tensor other) { if (other == null) { return; @@ -5619,13 +6596,18 @@ public void MergeFrom(Tensor other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -5647,10 +6629,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -5675,6 +6662,7 @@ public void MergeFrom(pb::CodedInputStream input) { /// /// repeated T /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class Sequence : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -5683,19 +6671,23 @@ public sealed partial class Sequence : pb::IMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Sequence()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.TypeProto.Descriptor.NestedTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Sequence() { OnConstruction(); } @@ -5703,12 +6695,14 @@ public Sequence() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Sequence(Sequence other) : this() { elemType_ = other.elemType_ != null ? other.elemType_.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Sequence Clone() { return new Sequence(this); } @@ -5721,6 +6715,7 @@ public Sequence Clone() { /// This field MUST be present for this version of the IR. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.TypeProto ElemType { get { return elemType_; } set { @@ -5729,11 +6724,13 @@ public Sequence Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as Sequence); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(Sequence other) { if (ReferenceEquals(other, null)) { return false; @@ -5746,6 +6743,7 @@ public bool Equals(Sequence other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (elemType_ != null) hash ^= ElemType.GetHashCode(); @@ -5756,11 +6754,13 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); @@ -5777,6 +6777,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (elemType_ != null) { output.WriteRawTag(10); @@ -5789,6 +6790,7 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (elemType_ != null) { @@ -5801,6 +6803,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(Sequence other) { if (other == null) { return; @@ -5815,13 +6818,18 @@ public void MergeFrom(Sequence other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -5839,10 +6847,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -5863,6 +6876,7 @@ public void MergeFrom(pb::CodedInputStream input) { /// /// map<K,V> /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] public sealed partial class Map : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage @@ -5871,19 +6885,23 @@ public sealed partial class Map : pb::IMessage private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Map()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Onnx.TypeProto.Descriptor.NestedTypes[2]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Map() { OnConstruction(); } @@ -5891,6 +6909,7 @@ public Map() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Map(Map other) : this() { keyType_ = other.keyType_; valueType_ = other.valueType_ != null ? other.valueType_.Clone() : null; @@ -5898,6 +6917,7 @@ public Map(Map other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Map Clone() { return new Map(this); } @@ -5911,6 +6931,7 @@ public Map Clone() { /// This field MUST refer to an integral type ([U]INT{8|16|32|64}) or STRING /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int KeyType { get { return keyType_; } set { @@ -5925,6 +6946,7 @@ public int KeyType { /// This field MUST be present for this version of the IR. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Onnx.TypeProto ValueType { get { return valueType_; } set { @@ -5933,11 +6955,13 @@ public int KeyType { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as Map); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(Map other) { if (ReferenceEquals(other, null)) { return false; @@ -5951,6 +6975,7 @@ public bool Equals(Map other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (KeyType != 0) hash ^= KeyType.GetHashCode(); @@ -5962,11 +6987,13 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); @@ -5987,6 +7014,7 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (KeyType != 0) { output.WriteRawTag(8); @@ -6003,6 +7031,7 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (KeyType != 0) { @@ -6018,6 +7047,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(Map other) { if (other == null) { return; @@ -6035,13 +7065,18 @@ public void MergeFrom(Map other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -6063,10 +7098,15 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; @@ -6088,134 +7128,1045 @@ public void MergeFrom(pb::CodedInputStream input) { } - } - #endregion + /// + /// wrapper for Tensor, Sequence, or Map + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Optional : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Optional()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Onnx.TypeProto.Descriptor.NestedTypes[3]; } + } - /// - /// Operator Sets - /// - /// OperatorSets are uniquely identified by a (domain, opset_version) pair. - /// - public sealed partial class OperatorSetIdProto : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OperatorSetIdProto()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Onnx.OnnxReflection.Descriptor.MessageTypes[12]; } - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Optional() { + OnConstruction(); + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } + partial void OnConstruction(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public OperatorSetIdProto() { - OnConstruction(); - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Optional(Optional other) : this() { + elemType_ = other.elemType_ != null ? other.elemType_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } - partial void OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Optional Clone() { + return new Optional(this); + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public OperatorSetIdProto(OperatorSetIdProto other) : this() { - domain_ = other.domain_; - version_ = other.version_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } + /// Field number for the "elem_type" field. + public const int ElemTypeFieldNumber = 1; + private global::Onnx.TypeProto elemType_; + /// + /// The type and optional shape of the element wrapped. + /// This field MUST be present for this version of the IR. + /// Possible values correspond to OptionalProto.DataType enum + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Onnx.TypeProto ElemType { + get { return elemType_; } + set { + elemType_ = value; + } + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public OperatorSetIdProto Clone() { - return new OperatorSetIdProto(this); - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Optional); + } - /// Field number for the "domain" field. - public const int DomainFieldNumber = 1; - private string domain_ = ""; - /// - /// The domain of the operator set being identified. - /// The empty string ("") or absence of this field implies the operator - /// set that is defined as part of the ONNX specification. - /// This field MUST be present in this version of the IR when referring to any other operator set. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Domain { - get { return domain_; } - set { - domain_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Optional other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ElemType, other.ElemType)) return false; + return Equals(_unknownFields, other._unknownFields); + } - /// Field number for the "version" field. - public const int VersionFieldNumber = 2; - private long version_; - /// - /// The version of the operator set being identified. - /// This field MUST be present in this version of the IR. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Version { - get { return version_; } - set { - version_ = value; - } - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (elemType_ != null) hash ^= ElemType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as OperatorSetIdProto); - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(OperatorSetIdProto other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Domain != other.Domain) return false; - if (Version != other.Version) return false; - return Equals(_unknownFields, other._unknownFields); - } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (elemType_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ElemType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (Domain.Length != 0) hash ^= Domain.GetHashCode(); - if (Version != 0L) hash ^= Version.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (elemType_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ElemType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (elemType_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ElemType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Optional other) { + if (other == null) { + return; + } + if (other.elemType_ != null) { + if (elemType_ == null) { + ElemType = new global::Onnx.TypeProto(); + } + ElemType.MergeFrom(other.ElemType); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (elemType_ == null) { + ElemType = new global::Onnx.TypeProto(); + } + input.ReadMessage(ElemType); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (elemType_ == null) { + ElemType = new global::Onnx.TypeProto(); + } + input.ReadMessage(ElemType); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SparseTensor : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SparseTensor()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Onnx.TypeProto.Descriptor.NestedTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SparseTensor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SparseTensor(SparseTensor other) : this() { + elemType_ = other.elemType_; + shape_ = other.shape_ != null ? other.shape_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SparseTensor Clone() { + return new SparseTensor(this); + } + + /// Field number for the "elem_type" field. + public const int ElemTypeFieldNumber = 1; + private int elemType_; + /// + /// 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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ElemType { + get { return elemType_; } + set { + elemType_ = value; + } + } + + /// Field number for the "shape" field. + public const int ShapeFieldNumber = 2; + private global::Onnx.TensorShapeProto shape_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Onnx.TensorShapeProto Shape { + get { return shape_; } + set { + shape_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SparseTensor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SparseTensor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ElemType != other.ElemType) return false; + if (!object.Equals(Shape, other.Shape)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ElemType != 0) hash ^= ElemType.GetHashCode(); + if (shape_ != null) hash ^= Shape.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ElemType != 0) { + output.WriteRawTag(8); + output.WriteInt32(ElemType); + } + if (shape_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Shape); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ElemType != 0) { + output.WriteRawTag(8); + output.WriteInt32(ElemType); + } + if (shape_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Shape); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ElemType != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ElemType); + } + if (shape_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Shape); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SparseTensor other) { + if (other == null) { + return; + } + if (other.ElemType != 0) { + ElemType = other.ElemType; + } + if (other.shape_ != null) { + if (shape_ == null) { + Shape = new global::Onnx.TensorShapeProto(); + } + Shape.MergeFrom(other.Shape); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + ElemType = input.ReadInt32(); + break; + } + case 18: { + if (shape_ == null) { + Shape = new global::Onnx.TensorShapeProto(); + } + input.ReadMessage(Shape); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + ElemType = input.ReadInt32(); + break; + } + case 18: { + if (shape_ == null) { + Shape = new global::Onnx.TensorShapeProto(); + } + input.ReadMessage(Shape); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// Operator Sets + /// + /// OperatorSets are uniquely identified by a (domain, opset_version) pair. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class OperatorSetIdProto : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OperatorSetIdProto()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Onnx.OnnxReflection.Descriptor.MessageTypes[12]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OperatorSetIdProto() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OperatorSetIdProto(OperatorSetIdProto other) : this() { + domain_ = other.domain_; + version_ = other.version_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OperatorSetIdProto Clone() { + return new OperatorSetIdProto(this); + } + + /// Field number for the "domain" field. + public const int DomainFieldNumber = 1; + private string domain_ = ""; + /// + /// The domain of the operator set being identified. + /// The empty string ("") or absence of this field implies the operator + /// set that is defined as part of the ONNX specification. + /// This field MUST be present in this version of the IR when referring to any other operator set. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Domain { + get { return domain_; } + set { + domain_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "version" field. + public const int VersionFieldNumber = 2; + private long version_; + /// + /// The version of the operator set being identified. + /// This field MUST be present in this version of the IR. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Version { + get { return version_; } + set { + version_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as OperatorSetIdProto); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(OperatorSetIdProto other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Domain != other.Domain) return false; + if (Version != other.Version) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Domain.Length != 0) hash ^= Domain.GetHashCode(); + if (Version != 0L) hash ^= Version.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Domain.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Domain); + } + if (Version != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Version); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Domain.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Domain); + } + if (Version != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Version); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Domain.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Domain); + } + if (Version != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Version); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(OperatorSetIdProto other) { + if (other == null) { + return; + } + if (other.Domain.Length != 0) { + Domain = other.Domain; + } + if (other.Version != 0L) { + Version = other.Version; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Domain = input.ReadString(); + break; + } + case 16: { + Version = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Domain = input.ReadString(); + break; + } + case 16: { + Version = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FunctionProto : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FunctionProto()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Onnx.OnnxReflection.Descriptor.MessageTypes[13]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FunctionProto() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FunctionProto(FunctionProto other) : this() { + name_ = other.name_; + input_ = other.input_.Clone(); + output_ = other.output_.Clone(); + attribute_ = other.attribute_.Clone(); + attributeProto_ = other.attributeProto_.Clone(); + node_ = other.node_.Clone(); + docString_ = other.docString_; + opsetImport_ = other.opsetImport_.Clone(); + domain_ = other.domain_; + overload_ = other.overload_; + valueInfo_ = other.valueInfo_.Clone(); + metadataProps_ = other.metadataProps_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FunctionProto Clone() { + return new FunctionProto(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// The name of the function, similar to op_type in NodeProto. + /// This is part of the unique-id (domain, name, overload) of FunctionProtos in a model. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "input" field. + public const int InputFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_input_codec + = pb::FieldCodec.ForString(34); + private readonly pbc::RepeatedField input_ = new pbc::RepeatedField(); + /// + /// The inputs and outputs of the function. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Input { + get { return input_; } + } + + /// Field number for the "output" field. + public const int OutputFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_output_codec + = pb::FieldCodec.ForString(42); + private readonly pbc::RepeatedField output_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Output { + get { return output_; } + } + + /// Field number for the "attribute" field. + public const int AttributeFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_attribute_codec + = pb::FieldCodec.ForString(50); + private readonly pbc::RepeatedField attribute_ = new pbc::RepeatedField(); + /// + /// The attribute parameters of the function. + /// It is for function parameters without default values. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Attribute { + get { return attribute_; } + } + + /// Field number for the "attribute_proto" field. + public const int AttributeProtoFieldNumber = 11; + private static readonly pb::FieldCodec _repeated_attributeProto_codec + = pb::FieldCodec.ForMessage(90, global::Onnx.AttributeProto.Parser); + private readonly pbc::RepeatedField attributeProto_ = new pbc::RepeatedField(); + /// + /// The attribute protos of the function. + /// It is for function attributes with default values. + /// A function attribute shall be represented either as + /// a string attribute or an AttributeProto, not both. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AttributeProto { + get { return attributeProto_; } + } + + /// Field number for the "node" field. + public const int NodeFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_node_codec + = pb::FieldCodec.ForMessage(58, global::Onnx.NodeProto.Parser); + private readonly pbc::RepeatedField node_ = new pbc::RepeatedField(); + /// + /// The nodes in the function. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Node { + get { return node_; } + } + + /// Field number for the "doc_string" field. + public const int DocStringFieldNumber = 8; + private string docString_ = ""; + /// + /// A human-readable documentation for this function. Markdown is allowed. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DocString { + get { return docString_; } + set { + docString_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "opset_import" field. + public const int OpsetImportFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_opsetImport_codec + = pb::FieldCodec.ForMessage(74, global::Onnx.OperatorSetIdProto.Parser); + private readonly pbc::RepeatedField opsetImport_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField OpsetImport { + get { return opsetImport_; } + } + + /// Field number for the "domain" field. + public const int DomainFieldNumber = 10; + private string domain_ = ""; + /// + /// The domain which this function belongs to. + /// This is part of the unique-id (domain, name, overload) of FunctionProtos in a model. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Domain { + get { return domain_; } + set { + domain_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "overload" field. + public const int OverloadFieldNumber = 13; + private string overload_ = ""; + /// + /// The overload identifier of the function. + /// This is part of the unique-id (domain, name, overload) of FunctionProtos in a model. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Overload { + get { return overload_; } + set { + overload_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "value_info" field. + public const int ValueInfoFieldNumber = 12; + private static readonly pb::FieldCodec _repeated_valueInfo_codec + = pb::FieldCodec.ForMessage(98, global::Onnx.ValueInfoProto.Parser); + private readonly pbc::RepeatedField valueInfo_ = new pbc::RepeatedField(); + /// + /// Information for the values in the function. The ValueInfoProto.name's + /// must be distinct and refer to names in the function (including inputs, + /// outputs, and intermediate values). It is optional for a value to appear + /// in value_info list. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ValueInfo { + get { return valueInfo_; } + } + + /// Field number for the "metadata_props" field. + public const int MetadataPropsFieldNumber = 14; + private static readonly pb::FieldCodec _repeated_metadataProps_codec + = pb::FieldCodec.ForMessage(114, global::Onnx.StringStringEntryProto.Parser); + private readonly pbc::RepeatedField metadataProps_ = new pbc::RepeatedField(); + /// + /// Named metadata values; keys should be distinct. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField MetadataProps { + get { return metadataProps_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FunctionProto); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FunctionProto other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if(!input_.Equals(other.input_)) return false; + if(!output_.Equals(other.output_)) return false; + if(!attribute_.Equals(other.attribute_)) return false; + if(!attributeProto_.Equals(other.attributeProto_)) return false; + if(!node_.Equals(other.node_)) return false; + if (DocString != other.DocString) return false; + if(!opsetImport_.Equals(other.opsetImport_)) return false; + if (Domain != other.Domain) return false; + if (Overload != other.Overload) return false; + if(!valueInfo_.Equals(other.valueInfo_)) return false; + if(!metadataProps_.Equals(other.metadataProps_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + hash ^= input_.GetHashCode(); + hash ^= output_.GetHashCode(); + hash ^= attribute_.GetHashCode(); + hash ^= attributeProto_.GetHashCode(); + hash ^= node_.GetHashCode(); + if (DocString.Length != 0) hash ^= DocString.GetHashCode(); + hash ^= opsetImport_.GetHashCode(); + if (Domain.Length != 0) hash ^= Domain.GetHashCode(); + if (Overload.Length != 0) hash ^= Overload.GetHashCode(); + hash ^= valueInfo_.GetHashCode(); + hash ^= metadataProps_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (Domain.Length != 0) { + if (Name.Length != 0) { output.WriteRawTag(10); + output.WriteString(Name); + } + input_.WriteTo(output, _repeated_input_codec); + output_.WriteTo(output, _repeated_output_codec); + attribute_.WriteTo(output, _repeated_attribute_codec); + node_.WriteTo(output, _repeated_node_codec); + if (DocString.Length != 0) { + output.WriteRawTag(66); + output.WriteString(DocString); + } + opsetImport_.WriteTo(output, _repeated_opsetImport_codec); + if (Domain.Length != 0) { + output.WriteRawTag(82); output.WriteString(Domain); } - if (Version != 0L) { - output.WriteRawTag(16); - output.WriteInt64(Version); + attributeProto_.WriteTo(output, _repeated_attributeProto_codec); + valueInfo_.WriteTo(output, _repeated_valueInfo_codec); + if (Overload.Length != 0) { + output.WriteRawTag(106); + output.WriteString(Overload); } + metadataProps_.WriteTo(output, _repeated_metadataProps_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -6224,15 +8175,32 @@ public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Domain.Length != 0) { + if (Name.Length != 0) { output.WriteRawTag(10); + output.WriteString(Name); + } + input_.WriteTo(ref output, _repeated_input_codec); + output_.WriteTo(ref output, _repeated_output_codec); + attribute_.WriteTo(ref output, _repeated_attribute_codec); + node_.WriteTo(ref output, _repeated_node_codec); + if (DocString.Length != 0) { + output.WriteRawTag(66); + output.WriteString(DocString); + } + opsetImport_.WriteTo(ref output, _repeated_opsetImport_codec); + if (Domain.Length != 0) { + output.WriteRawTag(82); output.WriteString(Domain); } - if (Version != 0L) { - output.WriteRawTag(16); - output.WriteInt64(Version); + attributeProto_.WriteTo(ref output, _repeated_attributeProto_codec); + valueInfo_.WriteTo(ref output, _repeated_valueInfo_codec); + if (Overload.Length != 0) { + output.WriteRawTag(106); + output.WriteString(Overload); } + metadataProps_.WriteTo(ref output, _repeated_metadataProps_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } @@ -6240,14 +8208,29 @@ public void WriteTo(pb::CodedOutputStream output) { #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + size += input_.CalculateSize(_repeated_input_codec); + size += output_.CalculateSize(_repeated_output_codec); + size += attribute_.CalculateSize(_repeated_attribute_codec); + size += attributeProto_.CalculateSize(_repeated_attributeProto_codec); + size += node_.CalculateSize(_repeated_node_codec); + if (DocString.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DocString); + } + size += opsetImport_.CalculateSize(_repeated_opsetImport_codec); if (Domain.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Domain); } - if (Version != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Version); + if (Overload.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Overload); } + size += valueInfo_.CalculateSize(_repeated_valueInfo_codec); + size += metadataProps_.CalculateSize(_repeated_metadataProps_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -6255,36 +8238,96 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(OperatorSetIdProto other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FunctionProto other) { if (other == null) { return; } + if (other.Name.Length != 0) { + Name = other.Name; + } + input_.Add(other.input_); + output_.Add(other.output_); + attribute_.Add(other.attribute_); + attributeProto_.Add(other.attributeProto_); + node_.Add(other.node_); + if (other.DocString.Length != 0) { + DocString = other.DocString; + } + opsetImport_.Add(other.opsetImport_); if (other.Domain.Length != 0) { Domain = other.Domain; } - if (other.Version != 0L) { - Version = other.Version; + if (other.Overload.Length != 0) { + Overload = other.Overload; } + valueInfo_.Add(other.valueInfo_); + metadataProps_.Add(other.metadataProps_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { + Name = input.ReadString(); + break; + } + case 34: { + input_.AddEntriesFrom(input, _repeated_input_codec); + break; + } + case 42: { + output_.AddEntriesFrom(input, _repeated_output_codec); + break; + } + case 50: { + attribute_.AddEntriesFrom(input, _repeated_attribute_codec); + break; + } + case 58: { + node_.AddEntriesFrom(input, _repeated_node_codec); + break; + } + case 66: { + DocString = input.ReadString(); + break; + } + case 74: { + opsetImport_.AddEntriesFrom(input, _repeated_opsetImport_codec); + break; + } + case 82: { Domain = input.ReadString(); break; } - case 16: { - Version = input.ReadInt64(); + case 90: { + attributeProto_.AddEntriesFrom(input, _repeated_attributeProto_codec); + break; + } + case 98: { + valueInfo_.AddEntriesFrom(input, _repeated_valueInfo_codec); + break; + } + case 106: { + Overload = input.ReadString(); + break; + } + case 114: { + metadataProps_.AddEntriesFrom(input, _repeated_metadataProps_codec); break; } } @@ -6294,19 +8337,64 @@ public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { + Name = input.ReadString(); + break; + } + case 34: { + input_.AddEntriesFrom(ref input, _repeated_input_codec); + break; + } + case 42: { + output_.AddEntriesFrom(ref input, _repeated_output_codec); + break; + } + case 50: { + attribute_.AddEntriesFrom(ref input, _repeated_attribute_codec); + break; + } + case 58: { + node_.AddEntriesFrom(ref input, _repeated_node_codec); + break; + } + case 66: { + DocString = input.ReadString(); + break; + } + case 74: { + opsetImport_.AddEntriesFrom(ref input, _repeated_opsetImport_codec); + break; + } + case 82: { Domain = input.ReadString(); break; } - case 16: { - Version = input.ReadInt64(); + case 90: { + attributeProto_.AddEntriesFrom(ref input, _repeated_attributeProto_codec); + break; + } + case 98: { + valueInfo_.AddEntriesFrom(ref input, _repeated_valueInfo_codec); + break; + } + case 106: { + Overload = input.ReadString(); + break; + } + case 114: { + metadataProps_.AddEntriesFrom(ref input, _repeated_metadataProps_codec); break; } } diff --git a/src/OnnxSharp/OnnxSharp.csproj b/src/OnnxSharp/OnnxSharp.csproj index 31b4ac1..80cec38 100644 --- a/src/OnnxSharp/OnnxSharp.csproj +++ b/src/OnnxSharp/OnnxSharp.csproj @@ -29,8 +29,8 @@ - - + + diff --git a/src/OnnxSharp/onnx.proto3 b/src/OnnxSharp/onnx.proto3 index 7abffca..1fa40a0 100644 --- a/src/OnnxSharp/onnx.proto3 +++ b/src/OnnxSharp/onnx.proto3 @@ -27,13 +27,6 @@ package onnx; // Notes // -// Release -// -// We are still in the very early stage of defining ONNX. The current -// version of ONNX is a starting point. While we are actively working -// towards a complete spec, we would like to get the community involved -// by sharing our working version of ONNX. -// // Protobuf compatibility // // To simplify framework compatibility, ONNX is defined using the subset of protobuf @@ -92,7 +85,7 @@ enum Version { // - Add sparse initializers IR_VERSION_2019_9_19 = 0x0000000000000006; - // IR VERSION 7 published on + // IR VERSION 7 published on May 8, 2020 // - Add support to allow function body graph to rely on multiple external opreator sets. // - Add a list to promote inference graph's initializers to global and // mutable variables. Global variables are visible in all graphs of the @@ -101,7 +94,27 @@ enum Version { // method and training algorithm. The execution of TrainingInfoProto // can modify the values of mutable variables. // - Implicitly add inference graph into each TrainingInfoProto's algorithm. - IR_VERSION = 0x0000000000000007; + IR_VERSION_2020_5_8 = 0x0000000000000007; + + // IR VERSION 8 published on July 30, 2021 + // Introduce TypeProto.SparseTensor + // Introduce TypeProto.Optional + // Added a list of FunctionProtos local to the model + // Deprecated since_version and operator status from FunctionProto + IR_VERSION_2021_7_30 = 0x0000000000000008; + + // IR VERSION 9 published on May 5, 2023 + // Added AttributeProto to FunctionProto so that default attribute values can be set. + // Added FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ. + IR_VERSION_2023_5_5 = 0x0000000000000009; + + // IR VERSION 10 published on March 25, 2024 + // Added UINT4, INT4. + IR_VERSION_2024_3_25 = 0x000000000000000A; + + // IR VERSION 11 published on TBD + // Added FLOAT4E2M1. + IR_VERSION = 0x000000000000000B; } // Attributes @@ -111,6 +124,8 @@ enum Version { // An AttributeProto MUST contain the name field, and *only one* of the // following content fields, effectively enforcing a C/C++ union equivalent. message AttributeProto { + reserved 12, 16 to 19; + reserved "v"; // Note: this enum is structurally identical to the OpSchema::AttrType // enum defined in schema.h. If you rev one, you likely need to rev the other. @@ -122,6 +137,7 @@ message AttributeProto { TENSOR = 4; GRAPH = 5; SPARSE_TENSOR = 11; + TYPE_PROTO = 13; FLOATS = 6; INTS = 7; @@ -129,6 +145,7 @@ message AttributeProto { TENSORS = 9; GRAPHS = 10; SPARSE_TENSORS = 12; + TYPE_PROTOS = 14; } // The name field MUST be present for this version of the IR. @@ -160,6 +177,7 @@ message AttributeProto { SparseTensorProto sparse_tensor = 22; // sparse tensor value // Do not use field below, it's deprecated. // optional ValueProto v = 12; // value - subsumes everything but graph + TypeProto tp = 14; // type proto repeated float floats = 7; // list of floats repeated int64 ints = 8; // list of ints @@ -167,6 +185,7 @@ message AttributeProto { repeated TensorProto tensors = 10; // list of tensors repeated GraphProto graphs = 11; // list of graph repeated SparseTensorProto sparse_tensors = 23; // list of sparse tensors + repeated TypeProto type_protos = 15;// list of type protos } // Defines information on value, including the name, the type, and @@ -179,6 +198,8 @@ message ValueInfoProto { TypeProto type = 2; // A human-readable documentation for this value. Markdown is allowed. string doc_string = 3; + // Named metadata values; keys should be distinct. + repeated StringStringEntryProto metadata_props = 4; } // Nodes @@ -193,19 +214,24 @@ message NodeProto { repeated string output = 2; // namespace Value // An optional identifier for this node in a graph. - // This field MAY be absent in ths version of the IR. + // This field MAY be absent in this version of the IR. string name = 3; // namespace Node // The symbolic identifier of the Operator to execute. string op_type = 4; // namespace Operator // The domain of the OperatorSet that specifies the operator named by op_type. string domain = 7; // namespace Domain + // Overload identifier, used only to map this to a model-local function. + string overload = 8; // Additional named attributes. repeated AttributeProto attribute = 5; // A human-readable documentation for this node. Markdown is allowed. string doc_string = 6; + + // Named metadata values; keys should be distinct. + repeated StringStringEntryProto metadata_props = 9; } // Training information @@ -250,7 +276,7 @@ message TrainingInfoProto { // // An execution of the training algorithm step is performed by executing the // graph obtained by combining the inference graph (namely "ModelProto.graph") - // and the "algorithm" graph. That is, the actual the actual + // and the "algorithm" graph. That is, the actual // input/initializer/output/node/value_info/sparse_initializer list of // the training graph is the concatenation of // "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer" @@ -387,13 +413,31 @@ message ModelProto { // // If this field is empty, the training behavior of the model is undefined. repeated TrainingInfoProto training_info = 20; + + // A list of function protos local to the model. + // + // The (domain, name, overload) tuple must be unique across the function protos in this list. + // In case of any conflicts the behavior (whether the model local functions are given higher priority, + // or standard operator sets are given higher priotity or this is treated as error) is defined by + // the runtimes. + // + // The operator sets imported by FunctionProto should be compatible with the ones + // imported by ModelProto and other model local FunctionProtos. + // Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto + // or by 2 FunctionProtos then versions for the operator set may be different but, + // the operator schema returned for op_type, domain, version combination + // for both the versions should be same for every node in the function body. + // + // One FunctionProto can reference other FunctionProto in the model, however, recursive reference + // is not allowed. + repeated FunctionProto functions = 25; }; // StringStringEntryProto follows the pattern for cross-proto-version maps. // See https://developers.google.com/protocol-buffers/docs/proto3#maps message StringStringEntryProto { string key = 1; - string value= 2; + string value = 2; }; message TensorAnnotation { @@ -446,13 +490,11 @@ message GraphProto { // which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model. repeated TensorAnnotation quantization_annotation = 14; - // DO NOT USE the following fields, they were deprecated from earlier versions. - // repeated string input = 3; - // repeated string output = 4; - // optional int64 ir_version = 6; - // optional int64 producer_version = 7; - // optional string producer_tag = 8; - // optional string domain = 9; + // Named metadata values; keys should be distinct. + repeated StringStringEntryProto metadata_props = 16; + + reserved 3, 4, 6 to 9; + reserved "ir_version", "producer_version", "producer_tag", "domain"; } // Tensors @@ -487,6 +529,24 @@ message TensorProto { // This format has 1 sign bit, 8 exponent bits, and 7 mantissa bits. BFLOAT16 = 16; + // Non-IEEE floating-point format based on papers + // FP8 Formats for Deep Learning, https://arxiv.org/abs/2209.05433, + // 8-bit Numerical Formats For Deep Neural Networks, https://arxiv.org/pdf/2206.02915.pdf. + // Operators supported FP8 are Cast, CastLike, QuantizeLinear, DequantizeLinear. + // The computation usually happens inside a block quantize / dequantize + // fused by the runtime. + FLOAT8E4M3FN = 17; // float 8, mostly used for coefficients, supports nan, not inf + FLOAT8E4M3FNUZ = 18; // float 8, mostly used for coefficients, supports nan, not inf, no negative zero + FLOAT8E5M2 = 19; // follows IEEE 754, supports nan, inf, mostly used for gradients + FLOAT8E5M2FNUZ = 20; // follows IEEE 754, supports nan, not inf, mostly used for gradients, no negative zero + + // 4-bit integer data types + UINT4 = 21; // Unsigned integer in range [0, 15] + INT4 = 22; // Signed integer in range [-8, 7], using two's-complement representation + + // 4-bit floating point data types + FLOAT4E2M1 = 23; + // Future extensions go here. } @@ -520,11 +580,13 @@ message TensorProto { // When this field is present, the data_type field MUST be FLOAT or COMPLEX64. repeated float float_data = 4 [packed = true]; - // For int32, uint8, int8, uint16, int16, bool, and float16 values - // float16 values must be bit-wise converted to an uint16_t prior + // For int32, uint8, int8, uint16, int16, uint4, int4, bool, float8 and float16 values + // float16 and float8 values must be bit-wise converted to an uint16_t prior // to writing to the buffer. + // uint4 and int4 values must be packed to 4bitx2 prior to writing to the buffer, the first element is stored in + // the 4 LSB and the second element is stored in the 4 MSB. // When this field is present, the data_type field MUST be - // INT32, INT16, INT8, UINT16, UINT8, BOOL, or FLOAT16 + // INT32, INT16, INT8, INT4, UINT16, UINT8, UINT4, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ repeated int32 int32_data = 5 [packed = true]; // For strings. @@ -554,6 +616,7 @@ message TensorProto { // Complex64 elements must be written as two consecutive FLOAT values, real component first. // Complex128 elements must be written as two consecutive DOUBLE values, real component first. // Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false). + // uint4 and int4 values must be packed to 4bitx2, the first element is stored in the 4 LSB and the second element is stored in the 4 MSB. // // Note: the advantage of specific field rather than the raw_data field is // that in some cases (e.g. int data), protobuf does a better packing via @@ -596,6 +659,9 @@ message TensorProto { // When this field is present, the data_type field MUST be // UINT32 or UINT64 repeated uint64 uint64_data = 11 [packed = true]; + + // Named metadata values; keys should be distinct. + repeated StringStringEntryProto metadata_props = 16; } // A serialized sparse-tensor value @@ -634,7 +700,7 @@ message TensorShapeProto { // Standard denotation can optionally be used to denote tensor // dimensions with standard semantic descriptions to ensure // that operations are applied to the correct axis of a tensor. - // Refer to https://github.com/onnx/onnx/blob/master/docs/DimensionDenotation.md#denotation-definition + // Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition // for pre-defined dimension denotations. string denotation = 3; }; @@ -671,6 +737,23 @@ message TypeProto { TypeProto value_type = 2; }; + // wrapper for Tensor, Sequence, or Map + message Optional { + // The type and optional shape of the element wrapped. + // This field MUST be present for this version of the IR. + // Possible values correspond to OptionalProto.DataType enum + TypeProto elem_type = 1; + }; + + + 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. @@ -687,11 +770,18 @@ message TypeProto { // The type of a map. Map map_type = 5; + // The type of an optional. + Optional optional_type = 9; + + + // Type of the sparse tensor + SparseTensor sparse_tensor_type = 8; + } // An optional denotation can be used to denote the whole // type with a standard semantic description as to what is - // stored inside. Refer to https://github.com/onnx/onnx/blob/master/docs/TypeDenotation.md#type-denotation-definition + // stored inside. Refer to https://github.com/onnx/onnx/blob/main/docs/TypeDenotation.md#type-denotation-definition // for pre-defined type denotations. string denotation = 6; } @@ -711,6 +801,78 @@ message OperatorSetIdProto { int64 version = 2; } +// Operator/function status. +enum OperatorStatus { + EXPERIMENTAL = 0; + STABLE = 1; +} + +message FunctionProto { + // The name of the function, similar to op_type in NodeProto. + // This is part of the unique-id (domain, name, overload) of FunctionProtos in a model. + string name = 1; + + // Deprecated since IR Version 8 + // optional int64 since_version = 2; + reserved 2; + reserved "since_version"; + + // Deprecated since IR Version 8 + // optional OperatorStatus status = 3; + reserved 3; + reserved "status"; + + // The inputs and outputs of the function. + repeated string input = 4; + repeated string output = 5; + + // The attribute parameters of the function. + // It is for function parameters without default values. + repeated string attribute = 6; + + // The attribute protos of the function. + // It is for function attributes with default values. + // A function attribute shall be represented either as + // a string attribute or an AttributeProto, not both. + repeated AttributeProto attribute_proto = 11; + + // The nodes in the function. + repeated NodeProto node = 7; + // A human-readable documentation for this function. Markdown is allowed. + string doc_string = 8; + + // The OperatorSets this function body (graph) relies on. + // + // All nodes in the function body (graph) will bind against the operator + // with the same-domain/same-op_type operator with the HIGHEST version + // in the referenced operator sets. This means at most one version can be relied + // for one domain. + // + // The operator sets imported by FunctionProto should be compatible with the ones + // imported by ModelProto. Example, if same operator set say 'A' is imported by FunctionProto + // and ModelProto then versions for the operator set may be different but, + // the operator schema returned for op_type, domain, version combination + // for both the versions should be same. + + repeated OperatorSetIdProto opset_import = 9; + + // The domain which this function belongs to. + // This is part of the unique-id (domain, name, overload) of FunctionProtos in a model. + string domain = 10; + + // The overload identifier of the function. + // This is part of the unique-id (domain, name, overload) of FunctionProtos in a model. + string overload = 13; + + // Information for the values in the function. The ValueInfoProto.name's + // must be distinct and refer to names in the function (including inputs, + // outputs, and intermediate values). It is optional for a value to appear + // in value_info list. + repeated ValueInfoProto value_info = 12; + + // Named metadata values; keys should be distinct. + repeated StringStringEntryProto metadata_props = 14; +} // For using protobuf-lite option optimize_for = LITE_RUNTIME; diff --git a/src/OnnxSharpConsole/OnnxSharpConsole.csproj b/src/OnnxSharpConsole/OnnxSharpConsole.csproj index 7969b60..989dccc 100644 --- a/src/OnnxSharpConsole/OnnxSharpConsole.csproj +++ b/src/OnnxSharpConsole/OnnxSharpConsole.csproj @@ -19,8 +19,8 @@ - - + + diff --git a/src/dotnet-onnx/dotnet-onnx.csproj b/src/dotnet-onnx/dotnet-onnx.csproj index 4deba77..1eb1e03 100644 --- a/src/dotnet-onnx/dotnet-onnx.csproj +++ b/src/dotnet-onnx/dotnet-onnx.csproj @@ -35,7 +35,7 @@ - +