From f3a51daba4ab7b13d97ef0c8ec5e5dfe6cdbc0ee Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Sun, 5 Sep 2021 16:28:03 -0500 Subject: [PATCH] Update protobuf per tf 2.6. --- src/TensorFlowNET.Core/Protobuf/Config.cs | 393 ++++++++++----- .../Protobuf/CppShapeInference.cs | 84 ++-- src/TensorFlowNET.Core/Protobuf/FullType.cs | 450 ++++++++++++++++++ src/TensorFlowNET.Core/Protobuf/Function.cs | 249 ++++++++-- src/TensorFlowNET.Core/Protobuf/Gen.bat | 2 + .../Protobuf/MemmappedFileSystem.cs | 360 ++++++++++++++ src/TensorFlowNET.Core/Protobuf/OpDef.cs | 135 ++++-- .../Protobuf/RewriterConfig.cs | 4 +- .../Protobuf/SavedObjectGraph.cs | 309 +++++++++--- src/TensorFlowNET.Core/Protobuf/Struct.cs | 31 +- src/TensorFlowNET.Core/Protobuf/Tensor.cs | 2 +- src/TensorFlowNET.Core/Protobuf/Types.cs | 32 +- 12 files changed, 1756 insertions(+), 295 deletions(-) create mode 100644 src/TensorFlowNET.Core/Protobuf/FullType.cs create mode 100644 src/TensorFlowNET.Core/Protobuf/MemmappedFileSystem.cs diff --git a/src/TensorFlowNET.Core/Protobuf/Config.cs b/src/TensorFlowNET.Core/Protobuf/Config.cs index af7391d3..cd34fd78 100644 --- a/src/TensorFlowNET.Core/Protobuf/Config.cs +++ b/src/TensorFlowNET.Core/Protobuf/Config.cs @@ -30,7 +30,7 @@ namespace Tensorflow { "KnRlbnNvcmZsb3cvY29yZS9mcmFtZXdvcmsvc3RlcF9zdGF0cy5wcm90bxom", "dGVuc29yZmxvdy9jb3JlL3Byb3RvYnVmL2NsdXN0ZXIucHJvdG8aJHRlbnNv", "cmZsb3cvY29yZS9wcm90b2J1Zi9kZWJ1Zy5wcm90bxoudGVuc29yZmxvdy9j", - "b3JlL3Byb3RvYnVmL3Jld3JpdGVyX2NvbmZpZy5wcm90byLJBQoKR1BVT3B0", + "b3JlL3Byb3RvYn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XJP", - "cHRpb25zEisKI2RvX2NvbW1vbl9zdWJleHByZXNzaW9uX2VsaW1pbmF0aW9u", - "GAEgASgIEhsKE2RvX2NvbnN0YW50X2ZvbGRpbmcYAiABKAgSJAocbWF4X2Zv", - "bGRlZF9jb25zdGFudF9pbl9ieXRlcxgGIAEoAxIcChRkb19mdW5jdGlvbl9p", - "bmxpbmluZxgEIAEoCBI1CglvcHRfbGV2ZWwYAyABKA4yIi50ZW5zb3JmbG93", - "Lk9wdGltaXplck9wdGlvbnMuTGV2ZWwSRQoQZ2xvYmFsX2ppdF9sZXZlbBgF", - "IAEoDjIrLnRlbnNvcmZsb3cuT3B0aW1pemVyT3B0aW9ucy5HbG9iYWxKaXRM", - "ZXZlbCIgCgVMZXZlbBIGCgJMMRAAEg8KAkwwEP///////////wEiQwoOR2xv", - "YmFsSml0TGV2ZWwSCwoHREVGQVVMVBAAEhAKA09GRhD///////////8BEggK", - "BE9OXzEQARIICgRPTl8yEAIi7gIKDEdyYXBoT3B0aW9ucxIeChZlbmFibGVf", - "cmVjdl9zY2hlZHVsaW5nGAIgASgIEjcKEW9wdGltaXplcl9vcHRpb25zGAMg", - "ASgLMhwudGVuc29yZmxvdy5PcHRpbWl6ZXJPcHRpb25zEhgKEGJ1aWxkX2Nv", - "c3RfbW9kZWwYBCABKAMSHgoWYnVpbGRfY29zdF9tb2RlbF9hZnRlchgJIAEo", - "AxIUCgxpbmZlcl9zaGFwZXMYBSABKAgSGgoScGxhY2VfcHJ1bmVkX2dyYXBo", - "GAYgASgIEiAKGGVuYWJsZV9iZmxvYXQxNl9zZW5kcmVjdhgHIAEoCBIVCg10", - "aW1lbGluZV9zdGVwGAggASgFEjMKD3Jld3JpdGVfb3B0aW9ucxgKIAEoCzIa", - "LnRlbnNvcmZsb3cuUmV3cml0ZXJDb25maWdKBAgBEAJSJXNraXBfY29tbW9u", - "X3N1YmV4cHJlc3Npb25fZWxpbWluYXRpb24iQQoVVGhyZWFkUG9vbE9wdGlv", - "blByb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RmZWVkGAEgAygJ", - "Eg0KBWZldGNoGAIgAygJEg4KBnRhcmdldBgDIAMoCRIrCgtydW5fb3B0aW9u", - "cxgEIAEoCzIWLnRlbnNvcmZsb3cuUnVuT3B0aW9ucxI3ChF0ZW5zb3JfY29u", - "bmVjdGlvbhgFIAMoCzIcLnRlbnNvcmZsb3cuVGVuc29yQ29ubmVjdGlvbhJC", - "CgxmZWVkX2RldmljZXMYBiADKAsyLC50ZW5zb3JmbG93LkNhbGxhYmxlT3B0", - "aW9ucy5GZWVkRGV2aWNlc0VudHJ5EkQKDWZldGNoX2RldmljZXMYByADKAsy", - "LS50ZW5zb3JmbG93LkNhbGxhYmxlT3B0aW9ucy5GZXRjaERldmljZXNFbnRy", - "eRIXCg9mZXRjaF9za2lwX3N5bmMYCCABKAgaMgoQRmVlZERldmljZXNFbnRy", - "eRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBGjMKEUZldGNoRGV2", - "aWNlc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAFChAEK", - "GG9yZy50ZW5zb3JmbG93LmZyYW1ld29ya0IMQ29uZmlnUHJvdG9zUAFaVWdp", - "dGh1Yi5jb20vdGVuc29yZmxvdy90ZW5zb3JmbG93L3RlbnNvcmZsb3cvZ28v", - "Y29yZS9wcm90b2J1Zi9mb3JfY29yZV9wcm90b3NfZ29fcHJvdG/4AQFiBnBy", - "b3RvMw==")); + "X3BlbmRpbmcYCSABKAUSJwofaW50ZXJuYWxfZnJhZ21lbnRhdGlvbl9mcmFj", + "dGlvbhgKIAEoARIdChV1c2VfY3VkYV9tYWxsb2NfYXN5bmMYCyABKAgaOwoO", + "VmlydHVhbERldmljZXMSFwoPbWVtb3J5X2xpbWl0X21iGAEgAygCEhAKCHBy", + "aW9yaXR5GAIgAygFIoUDChBPcHRpbWl6ZXJPcHRpb25zEisKI2RvX2NvbW1v", + "bl9zdWJleHByZXNzaW9uX2VsaW1pbmF0aW9uGAEgASgIEhsKE2RvX2NvbnN0", + "YW50X2ZvbGRpbmcYAiABKAgSJAocbWF4X2ZvbGRlZF9jb25zdGFudF9pbl9i", + "eXRlcxgGIAEoAxIcChRkb19mdW5jdGlvbl9pbmxpbmluZxgEIAEoCBI1Cglv", + "cHRfbGV2ZWwYAyABKA4yIi50ZW5zb3JmbG93Lk9wdGltaXplck9wdGlvbnMu", + "TGV2ZWwSRQoQZ2xvYmFsX2ppdF9sZXZlbBgFIAEoDjIrLnRlbnNvcmZsb3cu", + "T3B0aW1pemVyT3B0aW9ucy5HbG9iYWxKaXRMZXZlbCIgCgVMZXZlbBIGCgJM", + "MRAAEg8KAkwwEP///////////wEiQwoOR2xvYmFsSml0TGV2ZWwSCwoHREVG", + "QVVMVBAAEhAKA09GRhD///////////8BEggKBE9OXzEQARIICgRPTl8yEAIi", + "7gIKDEdyYXBoT3B0aW9ucxIeChZlbmFibGVfcmVjdl9zY2hlZHVsaW5nGAIg", + "ASgIEjcKEW9wdGltaXplcl9vcHRpb25zGAMgASgLMhwudGVuc29yZmxvdy5P", + "cHRpbWl6ZXJPcHRpb25zEhgKEGJ1aWxkX2Nvc3RfbW9kZWwYBCABKAMSHgoW", + "YnVpbGRfY29zdF9tb2RlbF9hZnRlchgJIAEoAxIUCgxpbmZlcl9zaGFwZXMY", + "BSABKAgSGgoScGxhY2VfcHJ1bmVkX2dyYXBoGAYgASgIEiAKGGVuYWJsZV9i", + "ZmxvYXQxNl9zZW5kcmVjdhgHIAEoCBIVCg10aW1lbGluZV9zdGVwGAggASgF", + "EjMKD3Jld3JpdGVfb3B0aW9ucxgKIAEoCzIaLnRlbnNvcmZsb3cuUmV3cml0", + "ZXJDb25maWdKBAgBEAJSJXNraXBfY29tbW9uX3N1YmV4cHJlc3Npb25fZWxp", + "bWluYXRpb24iQQoVVGhyZWFkUG9vbE9wdGlvblByb3RvEhMKC251bV90aHJl", + "YWRzGAEgASgFEhMKC2dsb2JhbF9uYW1lGAIgASgJItUBCgpSUENPc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ZW5zb3IYASABKAkSEQoJdG9f", + "dGVuc29yGAIgASgJIrADCg9DYWxsYWJsZU9wdGlvbnMSDAoEZmVlZBgBIAMo", + "CRINCgVmZXRjaBgCIAMoCRIOCgZ0YXJnZXQYAyADKAkSKwoLcnVuX29wdGlv", + "bnMYBCABKAsyFi50ZW5zb3JmbG93LlJ1bk9wdGlvbnMSNwoRdGVuc29yX2Nv", + "bm5lY3Rpb24YBSADKAsyHC50ZW5zb3JmbG93LlRlbnNvckNvbm5lY3Rpb24S", + "QgoMZmVlZF9kZXZpY2VzGAYgAygLMiwudGVuc29yZmxvdy5DYWxsYWJsZU9w", + "dGlvbnMuRmVlZERldmljZXNFbnRyeRJECg1mZXRjaF9kZXZpY2VzGAcgAygL", + "Mi0udGVuc29yZmxvdy5DYWxsYWJsZU9wdGlvbnMuRmV0Y2hEZXZpY2VzRW50", + "cnkSFwoPZmV0Y2hfc2tpcF9zeW5jGAggASgIGjIKEEZlZWREZXZpY2VzRW50", + "cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ARozChFGZXRjaERl", + "dmljZXNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBQoQB", + "ChhvcmcudGVuc29yZmxvdy5mcmFtZXdvcmtCDENvbmZpZ1Byb3Rvc1ABWlVn", + "aXRodWIuY29tL3RlbnNvcmZsb3cvdGVuc29yZmxvdy90ZW5zb3JmbG93L2dv", + "L2NvcmUvcHJvdG9idWYvZm9yX2NvcmVfcHJvdG9zX2dvX3Byb3Rv+AEBYgZw", + "cm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.CostGraphReflection.Descriptor, global::Tensorflow.GraphReflection.Descriptor, global::Tensorflow.StepStatsReflection.Descriptor, global::Tensorflow.ClusterReflection.Descriptor, global::Tensorflow.DebugReflection.Descriptor, global::Tensorflow.RewriterConfigReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GPUOptions), global::Tensorflow.GPUOptions.Parser, new[]{ "PerProcessGpuMemoryFraction", "AllowGrowth", "AllocatorType", "DeferredDeletionBytes", "VisibleDeviceList", "PollingActiveDelayUsecs", "PollingInactiveDelayMsecs", "ForceGpuCompatible", "Experimental" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GPUOptions.Types.Experimental), global::Tensorflow.GPUOptions.Types.Experimental.Parser, new[]{ "VirtualDevices", "UseUnifiedMemory", "NumDevToDevCopyStreams", "CollectiveRingOrder", "TimestampedAllocator", "KernelTrackerMaxInterval", "KernelTrackerMaxBytes", "KernelTrackerMaxPending" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices), global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices.Parser, new[]{ "MemoryLimitMb", "Priority" }, null, null, null, null)})}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GPUOptions), global::Tensorflow.GPUOptions.Parser, new[]{ "PerProcessGpuMemoryFraction", "AllowGrowth", "AllocatorType", "DeferredDeletionBytes", "VisibleDeviceList", "PollingActiveDelayUsecs", "PollingInactiveDelayMsecs", "ForceGpuCompatible", "Experimental" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GPUOptions.Types.Experimental), global::Tensorflow.GPUOptions.Types.Experimental.Parser, new[]{ "VirtualDevices", "UseUnifiedMemory", "NumDevToDevCopyStreams", "CollectiveRingOrder", "TimestampedAllocator", "KernelTrackerMaxInterval", "KernelTrackerMaxBytes", "KernelTrackerMaxPending", "InternalFragmentationFraction", "UseCudaMallocAsync" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices), global::Tensorflow.GPUOptions.Types.Experimental.Types.VirtualDevices.Parser, new[]{ "MemoryLimitMb", "Priority" }, null, null, null, null)})}), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OptimizerOptions), global::Tensorflow.OptimizerOptions.Parser, new[]{ "DoCommonSubexpressionElimination", "DoConstantFolding", "MaxFoldedConstantInBytes", "DoFunctionInlining", "OptLevel", "GlobalJitLevel" }, null, new[]{ typeof(global::Tensorflow.OptimizerOptions.Types.Level), typeof(global::Tensorflow.OptimizerOptions.Types.GlobalJitLevel) }, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GraphOptions), global::Tensorflow.GraphOptions.Parser, new[]{ "EnableRecvScheduling", "OptimizerOptions", "BuildCostModel", "BuildCostModelAfter", "InferShapes", "PlacePrunedGraph", "EnableBfloat16Sendrecv", "TimelineStep", "RewriteOptions" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ThreadPoolOptionProto), global::Tensorflow.ThreadPoolOptionProto.Parser, new[]{ "NumThreads", "GlobalName" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RPCOptions), global::Tensorflow.RPCOptions.Parser, new[]{ "UseRpcForInprocessMaster", "CompressionAlgorithm", "CompressionLevel", "CacheRpcResponse", "DisableSessionConnectionSharing" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RPCOptions), global::Tensorflow.RPCOptions.Parser, new[]{ "UseRpcForInprocessMaster", "CompressionAlgorithm", "CompressionLevel", "CacheRpcResponse", "DisableSessionConnectionSharing", "NumChannelsPerTarget" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SessionMetadata), global::Tensorflow.SessionMetadata.Parser, new[]{ "Name", "Version" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ConfigProto), global::Tensorflow.ConfigProto.Parser, new[]{ "DeviceCount", "IntraOpParallelismThreads", "InterOpParallelismThreads", "UsePerSessionThreads", "SessionInterOpThreadPool", "PlacementPeriod", "DeviceFilters", "GpuOptions", "AllowSoftPlacement", "LogDevicePlacement", "GraphOptions", "OperationTimeoutInMs", "RpcOptions", "ClusterDef", "IsolateSessionState", "ShareClusterDevicesInSession", "Experimental" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ConfigProto.Types.Experimental), global::Tensorflow.ConfigProto.Types.Experimental.Parser, new[]{ "CollectiveGroupLeader", "ExecutorType", "RecvBufMaxChunk", "UseNumaAffinity", "CollectiveDeterministicSequentialExecution", "CollectiveNccl", "ShareSessionStateInClusterspecPropagation", "DisableThreadSpinning", "ShareClusterDevicesInSession", "SessionMetadata", "OptimizeForStaticGraph", "EnableMlirBridge", "MlirBridgeRollout", "EnableMlirGraphOptimization", "DisableOutputPartitionGraphs", "XlaFusionAutotunerThresh", "UseTfrt" }, null, new[]{ typeof(global::Tensorflow.ConfigProto.Types.Experimental.Types.MlirBridgeRollout) }, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ConfigProto), global::Tensorflow.ConfigProto.Parser, new[]{ "DeviceCount", "IntraOpParallelismThreads", "InterOpParallelismThreads", "UsePerSessionThreads", "SessionInterOpThreadPool", "PlacementPeriod", "DeviceFilters", "GpuOptions", "AllowSoftPlacement", "LogDevicePlacement", "GraphOptions", "OperationTimeoutInMs", "RpcOptions", "ClusterDef", "IsolateSessionState", "ShareClusterDevicesInSession", "Experimental" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ConfigProto.Types.Experimental), global::Tensorflow.ConfigProto.Types.Experimental.Parser, new[]{ "CollectiveGroupLeader", "ExecutorType", "RecvBufMaxChunk", "UseNumaAffinity", "CollectiveDeterministicSequentialExecution", "CollectiveNccl", "ShareSessionStateInClusterspecPropagation", "DisableThreadSpinning", "ShareClusterDevicesInSession", "SessionMetadata", "OptimizeForStaticGraph", "EnableMlirBridge", "MlirBridgeRollout", "EnableMlirGraphOptimization", "DisableOutputPartitionGraphs", "XlaFusionAutotunerThresh", "UseTfrt", "CoordinationService", "FetchRemoteDevicesInMultiClient" }, null, new[]{ typeof(global::Tensorflow.ConfigProto.Types.Experimental.Types.MlirBridgeRollout) }, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunOptions), global::Tensorflow.RunOptions.Parser, new[]{ "TraceLevel", "TimeoutInMs", "InterOpThreadPool", "OutputPartitionGraphs", "DebugOptions", "ReportTensorAllocationsUponOom", "Experimental" }, null, new[]{ typeof(global::Tensorflow.RunOptions.Types.TraceLevel) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunOptions.Types.Experimental), global::Tensorflow.RunOptions.Types.Experimental.Parser, new[]{ "CollectiveGraphKey", "UseRunHandlerPool", "RunHandlerPoolOptions" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunOptions.Types.Experimental.Types.RunHandlerPoolOptions), global::Tensorflow.RunOptions.Types.Experimental.Types.RunHandlerPoolOptions.Parser, new[]{ "Priority" }, null, null, null, null)})}), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunMetadata), global::Tensorflow.RunMetadata.Parser, new[]{ "StepStats", "CostGraph", "PartitionGraphs", "FunctionGraphs" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RunMetadata.Types.FunctionGraphs), global::Tensorflow.RunMetadata.Types.FunctionGraphs.Parser, new[]{ "PartitionGraphs", "PreOptimizationGraph", "PostOptimizationGraph" }, null, null, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.TensorConnection), global::Tensorflow.TensorConnection.Parser, new[]{ "FromTensor", "ToTensor" }, null, null, null, null), @@ -645,6 +649,8 @@ namespace Tensorflow { kernelTrackerMaxInterval_ = other.kernelTrackerMaxInterval_; kernelTrackerMaxBytes_ = other.kernelTrackerMaxBytes_; kernelTrackerMaxPending_ = other.kernelTrackerMaxPending_; + internalFragmentationFraction_ = other.internalFragmentationFraction_; + useCudaMallocAsync_ = other.useCudaMallocAsync_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -814,6 +820,42 @@ namespace Tensorflow { } } + /// Field number for the "internal_fragmentation_fraction" field. + public const int InternalFragmentationFractionFieldNumber = 10; + private double internalFragmentationFraction_; + /// + /// BFC Allocator can return an allocated chunk of memory upto 2x the + /// requested size. For virtual devices with tight memory constraints, and + /// proportionately large allocation requests, this can lead to a significant + /// reduction in available memory. The threshold below controls when a chunk + /// should be split if the chunk size exceeds requested memory size. It is + /// expressed as a fraction of total available memory for the tf device. For + /// example setting it to 0.05 would imply a chunk needs to be split if its + /// size exceeds the requested memory by 5% of the total virtual device/gpu + /// memory size. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public double InternalFragmentationFraction { + get { return internalFragmentationFraction_; } + set { + internalFragmentationFraction_ = value; + } + } + + /// Field number for the "use_cuda_malloc_async" field. + public const int UseCudaMallocAsyncFieldNumber = 11; + private bool useCudaMallocAsync_; + /// + /// When true, use CUDA cudaMallocAsync API instead of TF gpu allocator. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseCudaMallocAsync { + get { return useCudaMallocAsync_; } + set { + useCudaMallocAsync_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Experimental); @@ -835,6 +877,8 @@ namespace Tensorflow { if (KernelTrackerMaxInterval != other.KernelTrackerMaxInterval) return false; if (KernelTrackerMaxBytes != other.KernelTrackerMaxBytes) return false; if (KernelTrackerMaxPending != other.KernelTrackerMaxPending) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(InternalFragmentationFraction, other.InternalFragmentationFraction)) return false; + if (UseCudaMallocAsync != other.UseCudaMallocAsync) return false; return Equals(_unknownFields, other._unknownFields); } @@ -849,6 +893,8 @@ namespace Tensorflow { if (KernelTrackerMaxInterval != 0) hash ^= KernelTrackerMaxInterval.GetHashCode(); if (KernelTrackerMaxBytes != 0) hash ^= KernelTrackerMaxBytes.GetHashCode(); if (KernelTrackerMaxPending != 0) hash ^= KernelTrackerMaxPending.GetHashCode(); + if (InternalFragmentationFraction != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(InternalFragmentationFraction); + if (UseCudaMallocAsync != false) hash ^= UseCudaMallocAsync.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -891,6 +937,14 @@ namespace Tensorflow { output.WriteRawTag(72); output.WriteInt32(KernelTrackerMaxPending); } + if (InternalFragmentationFraction != 0D) { + output.WriteRawTag(81); + output.WriteDouble(InternalFragmentationFraction); + } + if (UseCudaMallocAsync != false) { + output.WriteRawTag(88); + output.WriteBool(UseCudaMallocAsync); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -921,6 +975,12 @@ namespace Tensorflow { if (KernelTrackerMaxPending != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(KernelTrackerMaxPending); } + if (InternalFragmentationFraction != 0D) { + size += 1 + 8; + } + if (UseCudaMallocAsync != false) { + size += 1 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -954,6 +1014,12 @@ namespace Tensorflow { if (other.KernelTrackerMaxPending != 0) { KernelTrackerMaxPending = other.KernelTrackerMaxPending; } + if (other.InternalFragmentationFraction != 0D) { + InternalFragmentationFraction = other.InternalFragmentationFraction; + } + if (other.UseCudaMallocAsync != false) { + UseCudaMallocAsync = other.UseCudaMallocAsync; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -997,6 +1063,14 @@ namespace Tensorflow { KernelTrackerMaxPending = input.ReadInt32(); break; } + case 81: { + InternalFragmentationFraction = input.ReadDouble(); + break; + } + case 88: { + UseCudaMallocAsync = input.ReadBool(); + break; + } } } } @@ -1231,6 +1305,9 @@ namespace Tensorflow { private bool doCommonSubexpressionElimination_; /// /// If true, optimize the graph using common subexpression elimination. + /// Note: the optimization Level L1 will override this setting to true. So in + /// order to disable common subexpression elimination the opt_level has to be + /// set to L0. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool DoCommonSubexpressionElimination { @@ -1245,6 +1322,8 @@ namespace Tensorflow { private bool doConstantFolding_; /// /// If true, perform constant folding optimization on the graph. + /// Note: the optimization Level L1 will override this setting to true. So in + /// order to disable constant folding the opt_level has to be set to L0. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public bool DoConstantFolding { @@ -2135,6 +2214,7 @@ namespace Tensorflow { compressionLevel_ = other.compressionLevel_; cacheRpcResponse_ = other.cacheRpcResponse_; disableSessionConnectionSharing_ = other.disableSessionConnectionSharing_; + numChannelsPerTarget_ = other.numChannelsPerTarget_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -2223,6 +2303,25 @@ namespace Tensorflow { } } + /// Field number for the "num_channels_per_target" field. + public const int NumChannelsPerTargetFieldNumber = 6; + private int numChannelsPerTarget_; + /// + /// Setting num_channels_per_target > 0 allows uses of multiple channels to + /// communicate to the same target. This can be used to improve the aggregate + /// throughput on high speed links (e.g 100G) where single connection is not + /// sufficient to maximize link utilization. Note that a single RPC only goes + /// on a single channel, this only helps in situations where there are multiple + /// transfers to the same target overlapping in time. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NumChannelsPerTarget { + get { return numChannelsPerTarget_; } + set { + numChannelsPerTarget_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as RPCOptions); @@ -2241,6 +2340,7 @@ namespace Tensorflow { if (CompressionLevel != other.CompressionLevel) return false; if (CacheRpcResponse != other.CacheRpcResponse) return false; if (DisableSessionConnectionSharing != other.DisableSessionConnectionSharing) return false; + if (NumChannelsPerTarget != other.NumChannelsPerTarget) return false; return Equals(_unknownFields, other._unknownFields); } @@ -2252,6 +2352,7 @@ namespace Tensorflow { if (CompressionLevel != 0) hash ^= CompressionLevel.GetHashCode(); if (CacheRpcResponse != false) hash ^= CacheRpcResponse.GetHashCode(); if (DisableSessionConnectionSharing != false) hash ^= DisableSessionConnectionSharing.GetHashCode(); + if (NumChannelsPerTarget != 0) hash ^= NumChannelsPerTarget.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -2285,6 +2386,10 @@ namespace Tensorflow { output.WriteRawTag(40); output.WriteBool(DisableSessionConnectionSharing); } + if (NumChannelsPerTarget != 0) { + output.WriteRawTag(48); + output.WriteInt32(NumChannelsPerTarget); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -2308,6 +2413,9 @@ namespace Tensorflow { if (DisableSessionConnectionSharing != false) { size += 1 + 1; } + if (NumChannelsPerTarget != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumChannelsPerTarget); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -2334,6 +2442,9 @@ namespace Tensorflow { if (other.DisableSessionConnectionSharing != false) { DisableSessionConnectionSharing = other.DisableSessionConnectionSharing; } + if (other.NumChannelsPerTarget != 0) { + NumChannelsPerTarget = other.NumChannelsPerTarget; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -2365,6 +2476,10 @@ namespace Tensorflow { DisableSessionConnectionSharing = input.ReadBool(); break; } + case 48: { + NumChannelsPerTarget = input.ReadInt32(); + break; + } } } } @@ -2624,7 +2739,7 @@ namespace Tensorflow { /// The first session created determines the number of threads in this pool. /// All subsequent sessions reuse/share this one global pool. /// - /// There are notable exceptions to the default behavior describe above: + /// There are notable exceptions to the default behavior described above: /// 1. There is an environment variable for overriding this thread pool, /// named TF_OVERRIDE_GLOBAL_THREADPOOL. /// 2. When connecting to a server, such as a remote `tf.train.Server` @@ -3292,6 +3407,8 @@ namespace Tensorflow { disableOutputPartitionGraphs_ = other.disableOutputPartitionGraphs_; xlaFusionAutotunerThresh_ = other.xlaFusionAutotunerThresh_; useTfrt_ = other.useTfrt_; + coordinationService_ = other.coordinationService_; + fetchRemoteDevicesInMultiClient_ = other.fetchRemoteDevicesInMultiClient_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -3606,6 +3723,38 @@ namespace Tensorflow { } } + /// Field number for the "coordination_service" field. + public const int CoordinationServiceFieldNumber = 19; + private string coordinationService_ = ""; + /// + /// Distributed coordination service to be enabled if set. + /// Currently only effective in multi-client setup. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string CoordinationService { + get { return coordinationService_; } + set { + coordinationService_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "fetch_remote_devices_in_multi_client" field. + public const int FetchRemoteDevicesInMultiClientFieldNumber = 20; + private bool fetchRemoteDevicesInMultiClient_; + /// + /// Whether the remote devices in the cluster should be fetched during setup + /// of multi-client cluster. If enabled, the workers will run an extra device + /// information exchange step during startup and the workers' EagerContexts + /// will become aware of remote devices in the cluster as well. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool FetchRemoteDevicesInMultiClient { + get { return fetchRemoteDevicesInMultiClient_; } + set { + fetchRemoteDevicesInMultiClient_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as Experimental); @@ -3636,6 +3785,8 @@ namespace Tensorflow { if (DisableOutputPartitionGraphs != other.DisableOutputPartitionGraphs) return false; if (XlaFusionAutotunerThresh != other.XlaFusionAutotunerThresh) return false; if (UseTfrt != other.UseTfrt) return false; + if (CoordinationService != other.CoordinationService) return false; + if (FetchRemoteDevicesInMultiClient != other.FetchRemoteDevicesInMultiClient) return false; return Equals(_unknownFields, other._unknownFields); } @@ -3659,6 +3810,8 @@ namespace Tensorflow { if (DisableOutputPartitionGraphs != false) hash ^= DisableOutputPartitionGraphs.GetHashCode(); if (XlaFusionAutotunerThresh != 0L) hash ^= XlaFusionAutotunerThresh.GetHashCode(); if (UseTfrt != false) hash ^= UseTfrt.GetHashCode(); + if (CoordinationService.Length != 0) hash ^= CoordinationService.GetHashCode(); + if (FetchRemoteDevicesInMultiClient != false) hash ^= FetchRemoteDevicesInMultiClient.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3740,6 +3893,14 @@ namespace Tensorflow { output.WriteRawTag(144, 1); output.WriteBool(UseTfrt); } + if (CoordinationService.Length != 0) { + output.WriteRawTag(154, 1); + output.WriteString(CoordinationService); + } + if (FetchRemoteDevicesInMultiClient != false) { + output.WriteRawTag(160, 1); + output.WriteBool(FetchRemoteDevicesInMultiClient); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -3799,6 +3960,12 @@ namespace Tensorflow { if (UseTfrt != false) { size += 2 + 1; } + if (CoordinationService.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(CoordinationService); + } + if (FetchRemoteDevicesInMultiClient != false) { + size += 2 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3864,6 +4031,12 @@ namespace Tensorflow { if (other.UseTfrt != false) { UseTfrt = other.UseTfrt; } + if (other.CoordinationService.Length != 0) { + CoordinationService = other.CoordinationService; + } + if (other.FetchRemoteDevicesInMultiClient != false) { + FetchRemoteDevicesInMultiClient = other.FetchRemoteDevicesInMultiClient; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -3946,6 +4119,14 @@ namespace Tensorflow { UseTfrt = input.ReadBool(); break; } + case 154: { + CoordinationService = input.ReadString(); + break; + } + case 160: { + FetchRemoteDevicesInMultiClient = input.ReadBool(); + break; + } } } } diff --git a/src/TensorFlowNET.Core/Protobuf/CppShapeInference.cs b/src/TensorFlowNET.Core/Protobuf/CppShapeInference.cs index 0503e546..f76bf2f0 100644 --- a/src/TensorFlowNET.Core/Protobuf/CppShapeInference.cs +++ b/src/TensorFlowNET.Core/Protobuf/CppShapeInference.cs @@ -25,27 +25,28 @@ namespace Tensorflow { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "CjV0ZW5zb3JmbG93L3B5dGhvbi9mcmFtZXdvcmsvY3BwX3NoYXBlX2luZmVy", - "ZW5jZS5wcm90bxIKdGVuc29yZmxvdxoldGVuc29yZmxvdy9jb3JlL2ZyYW1l", - "d29yay90eXBlcy5wcm90bxosdGVuc29yZmxvdy9jb3JlL2ZyYW1ld29yay90", - "ZW5zb3Jfc2hhcGUucHJvdG8ipQMKF0NwcFNoYXBlSW5mZXJlbmNlUmVzdWx0", + "ZW5jZS5wcm90bxIKdGVuc29yZmxvdxopdGVuc29yZmxvdy9jb3JlL2ZyYW1l", + "d29yay9mdWxsX3R5cGUucHJvdG8aLHRlbnNvcmZsb3cvY29yZS9mcmFtZXdv", + "cmsvdGVuc29yX3NoYXBlLnByb3RvGiV0ZW5zb3JmbG93L2NvcmUvZnJhbWV3", + "b3JrL3R5cGVzLnByb3RvIpsDChdDcHBTaGFwZUluZmVyZW5jZVJlc3VsdBIr", + "CgVzaGFwZRgBIAEoCzIcLnRlbnNvcmZsb3cuVGVuc29yU2hhcGVQcm90bxJD", + "CgtoYW5kbGVfZGF0YRgEIAEoCzIuLnRlbnNvcmZsb3cuQ3BwU2hhcGVJbmZl", + "cmVuY2VSZXN1bHQuSGFuZGxlRGF0YRqTAQoSSGFuZGxlU2hhcGVBbmRUeXBl", "EisKBXNoYXBlGAEgASgLMhwudGVuc29yZmxvdy5UZW5zb3JTaGFwZVByb3Rv", - "EkMKC2hhbmRsZV9kYXRhGAQgASgLMi4udGVuc29yZmxvdy5DcHBTaGFwZUlu", - "ZmVyZW5jZVJlc3VsdC5IYW5kbGVEYXRhGp0BChJIYW5kbGVTaGF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ucHV0X3RlbnNvcnNfYXNfc2hhcGVzX25lZWRlZBgCIAMoBUJhWlxnaXRo", + "dWIuY29tL3RlbnNvcmZsb3cvdGVuc29yZmxvdy90ZW5zb3JmbG93L2dvL3B5", + "dGhvbi9mcmFtZXdvcmsvY3BwX3NoYXBlX2luZmVyZW5jZV9nb19wcm90b/gB", + "AWIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { global::Tensorflow.TypesReflection.Descriptor, global::Tensorflow.TensorShapeReflection.Descriptor, }, + new pbr::FileDescriptor[] { global::Tensorflow.FullTypeReflection.Descriptor, global::Tensorflow.TensorShapeReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CppShapeInferenceResult), global::Tensorflow.CppShapeInferenceResult.Parser, new[]{ "Shape", "HandleData" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CppShapeInferenceResult.Types.HandleShapeAndType), global::Tensorflow.CppShapeInferenceResult.Types.HandleShapeAndType.Parser, new[]{ "Shape", "Dtype", "SpecializedType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CppShapeInferenceResult), global::Tensorflow.CppShapeInferenceResult.Parser, new[]{ "Shape", "HandleData" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CppShapeInferenceResult.Types.HandleShapeAndType), global::Tensorflow.CppShapeInferenceResult.Types.HandleShapeAndType.Parser, new[]{ "Shape", "Dtype", "Type" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CppShapeInferenceResult.Types.HandleData), global::Tensorflow.CppShapeInferenceResult.Types.HandleData.Parser, new[]{ "IsSet", "ShapeAndType" }, null, null, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CppShapeInferenceInputsNeeded), global::Tensorflow.CppShapeInferenceInputsNeeded.Parser, new[]{ "InputTensorsNeeded", "InputTensorsAsShapesNeeded" }, null, null, null, null) })); @@ -252,7 +253,7 @@ namespace Tensorflow { public HandleShapeAndType(HandleShapeAndType other) : this() { shape_ = other.shape_ != null ? other.shape_.Clone() : null; dtype_ = other.dtype_; - specializedType_ = other.specializedType_; + type_ = other.type_ != null ? other.type_.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -283,19 +284,14 @@ namespace Tensorflow { } } - /// Field number for the "specialized_type" field. - public const int SpecializedTypeFieldNumber = 3; - private global::Tensorflow.SpecializedType specializedType_ = global::Tensorflow.SpecializedType.StInvalid; - /// - /// For dtype==DT_VARIANT, specialized_type may indicate a more specific - /// type. For other dtypes or when the information is unavailable it is set - /// to ST_INVALID. - /// + /// Field number for the "type" field. + public const int TypeFieldNumber = 4; + private global::Tensorflow.FullTypeDef type_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Tensorflow.SpecializedType SpecializedType { - get { return specializedType_; } + public global::Tensorflow.FullTypeDef Type { + get { return type_; } set { - specializedType_ = value; + type_ = value; } } @@ -314,7 +310,7 @@ namespace Tensorflow { } if (!object.Equals(Shape, other.Shape)) return false; if (Dtype != other.Dtype) return false; - if (SpecializedType != other.SpecializedType) return false; + if (!object.Equals(Type, other.Type)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -323,7 +319,7 @@ namespace Tensorflow { int hash = 1; if (shape_ != null) hash ^= Shape.GetHashCode(); if (Dtype != global::Tensorflow.DataType.DtInvalid) hash ^= Dtype.GetHashCode(); - if (SpecializedType != global::Tensorflow.SpecializedType.StInvalid) hash ^= SpecializedType.GetHashCode(); + if (type_ != null) hash ^= Type.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -345,9 +341,9 @@ namespace Tensorflow { output.WriteRawTag(16); output.WriteEnum((int) Dtype); } - if (SpecializedType != global::Tensorflow.SpecializedType.StInvalid) { - output.WriteRawTag(24); - output.WriteEnum((int) SpecializedType); + if (type_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Type); } if (_unknownFields != null) { _unknownFields.WriteTo(output); @@ -363,8 +359,8 @@ namespace Tensorflow { if (Dtype != global::Tensorflow.DataType.DtInvalid) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Dtype); } - if (SpecializedType != global::Tensorflow.SpecializedType.StInvalid) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SpecializedType); + if (type_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Type); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -386,8 +382,11 @@ namespace Tensorflow { if (other.Dtype != global::Tensorflow.DataType.DtInvalid) { Dtype = other.Dtype; } - if (other.SpecializedType != global::Tensorflow.SpecializedType.StInvalid) { - SpecializedType = other.SpecializedType; + if (other.type_ != null) { + if (type_ == null) { + Type = new global::Tensorflow.FullTypeDef(); + } + Type.MergeFrom(other.Type); } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -411,8 +410,11 @@ namespace Tensorflow { Dtype = (global::Tensorflow.DataType) input.ReadEnum(); break; } - case 24: { - SpecializedType = (global::Tensorflow.SpecializedType) input.ReadEnum(); + case 34: { + if (type_ == null) { + Type = new global::Tensorflow.FullTypeDef(); + } + input.ReadMessage(Type); break; } } diff --git a/src/TensorFlowNET.Core/Protobuf/FullType.cs b/src/TensorFlowNET.Core/Protobuf/FullType.cs new file mode 100644 index 00000000..a8b54b2a --- /dev/null +++ b/src/TensorFlowNET.Core/Protobuf/FullType.cs @@ -0,0 +1,450 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/framework/full_type.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow { + + /// Holder for reflection information generated from tensorflow/core/framework/full_type.proto + public static partial class FullTypeReflection { + + #region Descriptor + /// File descriptor for tensorflow/core/framework/full_type.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static FullTypeReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Cil0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL2Z1bGxfdHlwZS5wcm90bxIK", + "dGVuc29yZmxvdyJyCgtGdWxsVHlwZURlZhInCgd0eXBlX2lkGAEgASgOMhYu", + "dGVuc29yZmxvdy5GdWxsVHlwZUlkEiUKBGFyZ3MYAiADKAsyFy50ZW5zb3Jm", + "bG93LkZ1bGxUeXBlRGVmEgsKAXMYAyABKAlIAEIGCgRhdHRyKqwDCgpGdWxs", + "VHlwZUlkEg0KCVRGVF9VTlNFVBAAEgsKB1RGVF9WQVIQARILCgdURlRfQU5Z", + "EAISDwoLVEZUX1BST0RVQ1QQAxIQCgxURlRfQ0FMTEFCTEUQZBIPCgpURlRf", + "VEVOU09SEOgHEg4KCVRGVF9BUlJBWRDpBxIRCgxURlRfT1BUSU9OQUwQ6gcS", + "EAoLVEZUX0RBVEFTRVQQ9k4SDQoIVEZUX0JPT0wQyAESDgoJVEZUX1VJTlQ4", + "EMkBEg8KClRGVF9VSU5UMTYQygESDwoKVEZUX1VJTlQzMhDLARIPCgpURlRf", + "VUlOVDY0EMwBEg0KCFRGVF9JTlQ4EM0BEg4KCVRGVF9JTlQxNhDOARIOCglU", + "RlRfSU5UMzIQzwESDgoJVEZUX0lOVDY0ENABEg0KCFRGVF9IQUxGENEBEg4K", + "CVRGVF9GTE9BVBDSARIPCgpURlRfRE9VQkxFENMBEhEKDFRGVF9CRkxPQVQx", + "NhDXARISCg1URlRfQ09NUExFWDY0ENQBEhMKDlRGVF9DT01QTEVYMTI4ENUB", + "Eg8KClRGVF9TVFJJTkcQ1gFCfQoYb3JnLnRlbnNvcmZsb3cuZnJhbWV3b3Jr", + "Qg5GdWxsVHlwZVByb3Rvc1ABWkxnaXRodWIuY29tL3RlbnNvcmZsb3cvdGVu", + "c29yZmxvdy90ZW5zb3JmbG93L2dvL2NvcmUvZnJhbWV3b3JrL3R5cGVzX2dv", + "X3Byb3Rv+AEBYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tensorflow.FullTypeId), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.FullTypeDef), global::Tensorflow.FullTypeDef.Parser, new[]{ "TypeId", "Args", "S" }, new[]{ "Attr" }, null, null, null) + })); + } + #endregion + + } + #region Enums + /// + /// Experimental. Represents the complete type information of a TensorFlow value. + /// + public enum FullTypeId { + /// + /// The default represents an uninitialized values. + /// + [pbr::OriginalName("TFT_UNSET")] TftUnset = 0, + /// + /// Type variables may serve as placeholder for any other type ID in type + /// templates. + /// + /// Examples: + /// TFT_DATASET[TFT_VAR["T"]] is a Dataset returning a type indicated by "T". + /// TFT_TENSOR[TFT_VAR["T"]] is a Tensor of n element type indicated by "T". + /// TFT_TENSOR[TFT_VAR["T"]], TFT_TENSOR[TFT_VAR["T"]] are two tensors of + /// identical element types. + /// TFT_TENSOR[TFT_VAR["P"]], TFT_TENSOR[TFT_VAR["Q"]] are two tensors of + /// potentially different element types. + /// + [pbr::OriginalName("TFT_VAR")] TftVar = 1, + /// + /// Wildcard type. Describes a parameter of unknown type. In TensorFlow, that + /// can mean either a "Top" type (accepts any type), or a dynamically typed + /// object whose type is unknown in context. + /// Important: "unknown" does not necessarily mean undeterminable! + /// + [pbr::OriginalName("TFT_ANY")] TftAny = 2, + /// + /// The algebraic product type. This is an algebraic type that may be used just + /// for logical grouping. Not to confused with TFT_TUPLE which describes a + /// concrete object of several elements. + /// + /// Example: + /// TFT_DATASET[TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_FLOAT64]]] + /// is a Dataset producing two tensors, an integer one and a float one. + /// + [pbr::OriginalName("TFT_PRODUCT")] TftProduct = 3, + /// + /// Callable types describe functions and ops. + /// + /// Parametrization: + /// TFT_CALLABLE[<arg type>, <return type>] + /// * <arg_type> is the type of the arguments; TFT_PRODUCT represents + /// multiple + /// arguments. + /// * <return_type> is the return type; TFT_PRODUCT represents multiple + /// return values (that means that callables returning multiple things + /// don't necessarily return a single tuple). + /// + /// Example: + /// TFT_CALLABLE[ + /// TFT_ANY, + /// TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_FLOAT64]], + /// ] + /// is a callable with unspecified (for now) input arguments, and + /// two return values of type tensor. + /// + [pbr::OriginalName("TFT_CALLABLE")] TftCallable = 100, + /// + /// The usual Tensor. This is a parametric type. + /// + /// Parametrization: + /// TFT_TENSOR[<element type>, <shape type>] + /// * <element_type> is currently limited to one of the element types + /// defined below. + /// * <shape_type> is not yet defined, and may only be TFT_UNKNOWN for now. + /// + /// A TFT_SHAPE type will be defined in the future. + /// + /// Example: + /// TFT_TENSOR[TFT_INT32, TFT_UNKNOWN] + /// is a Tensor of int32 element type and unknown shape. + /// + /// TODO(mdan): Define TFT_SHAPE and add more examples. + /// + [pbr::OriginalName("TFT_TENSOR")] TftTensor = 1000, + /// + /// Array (or tensorflow::TensorList in the variant type registry). + /// Note: this is not to be confused with the deprecated `TensorArray*` ops + /// which are not supported by FullType. + /// This type represents a random-access list whose elements can be + /// described by a single type. Although immutable, Array is expected to + /// support efficient mutation semantics (i.e. element update) in the + /// user-facing API. + /// The element type may be generic or even TFT_ANY for a heterogenous list. + /// + /// Parametrization: + /// TFT_ARRAY[<element type>] + /// * <element_type> may be any concrete type. + /// + /// Examples: + /// TFT_ARRAY[TFT_TENSOR[TFT_INT32]] is a TensorArray holding int32 Tensors + /// of any shape. + /// TFT_ARRAY[TFT_TENSOR[TFT_UNKNOWN]] is a TensorArray holding Tensors of + /// mixed element types. + /// TFT_ARRAY[TFT_UNKNOWN] is a TensorArray holding any element type. + /// TFT_ARRAY[] is equivalent to TFT_ARRAY[TFT_UNKNOWN]. + /// TFT_ARRAY[TFT_ARRAY[]] is an array or arrays (of unknown types). + /// + [pbr::OriginalName("TFT_ARRAY")] TftArray = 1001, + /// + /// Optional (or tensorflow::OptionalVariant in the variant type registry). + /// This type represents a value that may either hold an element of a single + /// specified type, or nothing at all. + /// + /// Parametrization: + /// TFT_OPTIONAL[<element type>] + /// * <element_type> may be any concrete type. + /// + /// Examples: + /// TFT_OPTIONAL[TFT_TENSOR[TFT_INT32]] is an Optional holding an int32 + /// Tensor of any shape. + /// + [pbr::OriginalName("TFT_OPTIONAL")] TftOptional = 1002, + /// + /// Datasets created by tf.data ops and APIs. Datasets have generator/iterable + /// semantics, that is, one can construct an iterator from them. Like + /// Array, they are considered to return elements that can be described + /// by a single type. Unlike Array, they do not support random access or + /// mutation, and can potentially produce an infinite number of elements. + /// A datasets can produce logical structures (e.g. multiple elements). This + /// is expressed using TFT_PRODUCT. + /// + /// Parametrization: TFT_ARRAY[<element type>]. + /// <element_type> may be a concrete type or a type symbol. It represents the + /// data type of the elements produced by the dataset. + /// + /// Examples: + /// TFT_DATSET[TFT_TENSOR[TFT_INT32]] is a Dataset producing single int32 + /// Tensors of unknown shape. + /// TFT_DATSET[TFT_PRODUCT[TFT_TENSOR[TFT_INT32], TFT_TENSOR[TFT_FLOAT32]] is + /// a + /// Dataset producing pairs of Tensors, one integer and one float. + /// Note: The high ID number is to prepare for the eventuality that Datasets + /// will be supported by user types in the future. + /// + [pbr::OriginalName("TFT_DATASET")] TftDataset = 10102, + /// + /// The bool element type. + /// TODO(mdan): Quantized types, legacy representations (e.g. ref) + /// + [pbr::OriginalName("TFT_BOOL")] TftBool = 200, + /// + /// Integer element types. + /// + [pbr::OriginalName("TFT_UINT8")] TftUint8 = 201, + [pbr::OriginalName("TFT_UINT16")] TftUint16 = 202, + [pbr::OriginalName("TFT_UINT32")] TftUint32 = 203, + [pbr::OriginalName("TFT_UINT64")] TftUint64 = 204, + [pbr::OriginalName("TFT_INT8")] TftInt8 = 205, + [pbr::OriginalName("TFT_INT16")] TftInt16 = 206, + [pbr::OriginalName("TFT_INT32")] TftInt32 = 207, + [pbr::OriginalName("TFT_INT64")] TftInt64 = 208, + /// + /// Floating-point element types. + /// + [pbr::OriginalName("TFT_HALF")] TftHalf = 209, + [pbr::OriginalName("TFT_FLOAT")] TftFloat = 210, + [pbr::OriginalName("TFT_DOUBLE")] TftDouble = 211, + [pbr::OriginalName("TFT_BFLOAT16")] TftBfloat16 = 215, + /// + /// Complex element types. + /// TODO(mdan): Represent as TFT_COMPLEX[TFT_DOUBLE] instead? + /// + [pbr::OriginalName("TFT_COMPLEX64")] TftComplex64 = 212, + [pbr::OriginalName("TFT_COMPLEX128")] TftComplex128 = 213, + /// + /// The string element type. + /// + [pbr::OriginalName("TFT_STRING")] TftString = 214, + } + + #endregion + + #region Messages + /// + /// Highly experimental and very likely to change. + /// This encoding uses tags instead of dedicated messages for regularity. In + /// particular the encoding imposes no restrictions on what the parameters of any + /// type should be, which in particular needs to be true for type symbols. + /// + public sealed partial class FullTypeDef : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FullTypeDef()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.FullTypeReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FullTypeDef() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FullTypeDef(FullTypeDef other) : this() { + typeId_ = other.typeId_; + args_ = other.args_.Clone(); + switch (other.AttrCase) { + case AttrOneofCase.S: + S = other.S; + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FullTypeDef Clone() { + return new FullTypeDef(this); + } + + /// Field number for the "type_id" field. + public const int TypeIdFieldNumber = 1; + private global::Tensorflow.FullTypeId typeId_ = global::Tensorflow.FullTypeId.TftUnset; + /// + /// The principal type represented by this object. This may be a concrete type + /// (Tensor, Dataset) a type variable (used for dependent types) a type + /// symbol (Any, Union). See FullTypeId for details. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.FullTypeId TypeId { + get { return typeId_; } + set { + typeId_ = value; + } + } + + /// Field number for the "args" field. + public const int ArgsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_args_codec + = pb::FieldCodec.ForMessage(18, global::Tensorflow.FullTypeDef.Parser); + private readonly pbc::RepeatedField args_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Args { + get { return args_; } + } + + /// Field number for the "s" field. + public const int SFieldNumber = 3; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string S { + get { return attrCase_ == AttrOneofCase.S ? (string) attr_ : ""; } + set { + attr_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + attrCase_ = AttrOneofCase.S; + } + } + + private object attr_; + /// Enum of possible cases for the "attr" oneof. + public enum AttrOneofCase { + None = 0, + S = 3, + } + private AttrOneofCase attrCase_ = AttrOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public AttrOneofCase AttrCase { + get { return attrCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearAttr() { + attrCase_ = AttrOneofCase.None; + attr_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as FullTypeDef); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(FullTypeDef other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TypeId != other.TypeId) return false; + if(!args_.Equals(other.args_)) return false; + if (S != other.S) return false; + if (AttrCase != other.AttrCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (TypeId != global::Tensorflow.FullTypeId.TftUnset) hash ^= TypeId.GetHashCode(); + hash ^= args_.GetHashCode(); + if (attrCase_ == AttrOneofCase.S) hash ^= S.GetHashCode(); + hash ^= (int) attrCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (TypeId != global::Tensorflow.FullTypeId.TftUnset) { + output.WriteRawTag(8); + output.WriteEnum((int) TypeId); + } + args_.WriteTo(output, _repeated_args_codec); + if (attrCase_ == AttrOneofCase.S) { + output.WriteRawTag(26); + output.WriteString(S); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (TypeId != global::Tensorflow.FullTypeId.TftUnset) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TypeId); + } + size += args_.CalculateSize(_repeated_args_codec); + if (attrCase_ == AttrOneofCase.S) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(S); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(FullTypeDef other) { + if (other == null) { + return; + } + if (other.TypeId != global::Tensorflow.FullTypeId.TftUnset) { + TypeId = other.TypeId; + } + args_.Add(other.args_); + switch (other.AttrCase) { + case AttrOneofCase.S: + S = other.S; + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + TypeId = (global::Tensorflow.FullTypeId) input.ReadEnum(); + break; + } + case 18: { + args_.AddEntriesFrom(input, _repeated_args_codec); + break; + } + case 26: { + S = input.ReadString(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Core/Protobuf/Function.cs b/src/TensorFlowNET.Core/Protobuf/Function.cs index 78665f0d..63cdc44f 100644 --- a/src/TensorFlowNET.Core/Protobuf/Function.cs +++ b/src/TensorFlowNET.Core/Protobuf/Function.cs @@ -28,39 +28,43 @@ namespace Tensorflow { "ZW5zb3JmbG93Gip0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL2F0dHJfdmFs", "dWUucHJvdG8aKHRlbnNvcmZsb3cvY29yZS9mcmFtZXdvcmsvbm9kZV9kZWYu", "cHJvdG8aJnRlbnNvcmZsb3cvY29yZS9mcmFtZXdvcmsvb3BfZGVmLnByb3Rv", - "ImoKEkZ1bmN0aW9uRGVmTGlicmFyeRIpCghmdW5jdGlvbhgBIAMoCzIXLnRl", - "bnNvcmZsb3cuRnVuY3Rpb25EZWYSKQoIZ3JhZGllbnQYAiADKAsyFy50ZW5z", - "b3JmbG93LkdyYWRpZW50RGVmIsQGCgtGdW5jdGlvbkRlZhIkCglzaWduYXR1", - "cmUYASABKAsyES50ZW5zb3JmbG93Lk9wRGVmEi8KBGF0dHIYBSADKAsyIS50", - "ZW5zb3JmbG93LkZ1bmN0aW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HJ5EgsKA2tleRgBIAEo", + "CRIkCgV2YWx1ZRgCIAEoCzIVLnRlbnNvcmZsb3cuQXR0clZhbHVlOgI4ARqI", + "AQoIQXJnQXR0cnMSOAoEYXR0chgBIAMoCzIqLnRlbnNvcmZsb3cuRnVuY3Rp", + "b25EZWYuQXJnQXR0cnMuQXR0ckVudHJ5GkIKCUF0dHJFbnRyeRILCgNrZXkY", + "ASABKAkSJAoFdmFsdWUYAiABKAsyFS50ZW5zb3JmbG93LkF0dHJWYWx1ZToC", + "OAEaUAoMQXJnQXR0ckVudHJ5EgsKA2tleRgBIAEoDRIvCgV2YWx1ZRgCIAEo", + "CzIgLnRlbnNvcmZsb3cuRnVuY3Rpb25EZWYuQXJnQXR0cnM6AjgBGjoKGFJl", + "c291cmNlQXJnVW5pcXVlSWRFbnRyeRILCgNrZXkYASABKA0SDQoFdmFsdWUY", + "AiABKA06AjgBGioKCFJldEVudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgC", + "IAEoCToCOAEaMQoPQ29udHJvbFJldEVudHJ5EgsKA2tleRgBIAEoCRINCgV2", + "YWx1ZRgCIAEoCToCOAFKBAgCEAMiOwoLR3JhZGllbnREZWYSFQoNZnVuY3Rp", + "b25fbmFtZRgBIAEoCRIVCg1ncmFkaWVudF9mdW5jGAIgASgJIkcKElJlZ2lz", + "dGVyZWRHcmFkaWVudBIVCg1ncmFkaWVudF9mdW5jGAEgASgJEhoKEnJlZ2lz", + "dGVyZWRfb3BfdHlwZRgCIAEoCUKAAQoYb3JnLnRlbnNvcmZsb3cuZnJhbWV3", + "b3JrQg5GdW5jdGlvblByb3Rvc1ABWk9naXRodWIuY29tL3RlbnNvcmZsb3cv", + "dGVuc29yZmxvdy90ZW5zb3JmbG93L2dvL2NvcmUvZnJhbWV3b3JrL2Z1bmN0", + "aW9uX2dvX3Byb3Rv+AEBYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.AttrValueReflection.Descriptor, global::Tensorflow.NodeDefReflection.Descriptor, global::Tensorflow.OpDefReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.FunctionDefLibrary), global::Tensorflow.FunctionDefLibrary.Parser, new[]{ "Function", "Gradient" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.FunctionDefLibrary), global::Tensorflow.FunctionDefLibrary.Parser, new[]{ "Function", "Gradient", "RegisteredGradients" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.FunctionDef), global::Tensorflow.FunctionDef.Parser, new[]{ "Signature", "Attr", "ArgAttr", "ResourceArgUniqueId", "NodeDef", "Ret", "ControlRet" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.FunctionDef.Types.ArgAttrs), global::Tensorflow.FunctionDef.Types.ArgAttrs.Parser, new[]{ "Attr" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), null, null, null, null, }), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GradientDef), global::Tensorflow.GradientDef.Parser, new[]{ "FunctionName", "GradientFunc" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.GradientDef), global::Tensorflow.GradientDef.Parser, new[]{ "FunctionName", "GradientFunc" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.RegisteredGradient), global::Tensorflow.RegisteredGradient.Parser, new[]{ "GradientFunc", "RegisteredOpType" }, null, null, null, null) })); } #endregion @@ -97,6 +101,7 @@ namespace Tensorflow { public FunctionDefLibrary(FunctionDefLibrary other) : this() { function_ = other.function_.Clone(); gradient_ = other.gradient_.Clone(); + registeredGradients_ = other.registeredGradients_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -125,6 +130,16 @@ namespace Tensorflow { get { return gradient_; } } + /// Field number for the "registered_gradients" field. + public const int RegisteredGradientsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_registeredGradients_codec + = pb::FieldCodec.ForMessage(26, global::Tensorflow.RegisteredGradient.Parser); + private readonly pbc::RepeatedField registeredGradients_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField RegisteredGradients { + get { return registeredGradients_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as FunctionDefLibrary); @@ -140,6 +155,7 @@ namespace Tensorflow { } if(!function_.Equals(other.function_)) return false; if(!gradient_.Equals(other.gradient_)) return false; + if(!registeredGradients_.Equals(other.registeredGradients_)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -148,6 +164,7 @@ namespace Tensorflow { int hash = 1; hash ^= function_.GetHashCode(); hash ^= gradient_.GetHashCode(); + hash ^= registeredGradients_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -163,6 +180,7 @@ namespace Tensorflow { public void WriteTo(pb::CodedOutputStream output) { function_.WriteTo(output, _repeated_function_codec); gradient_.WriteTo(output, _repeated_gradient_codec); + registeredGradients_.WriteTo(output, _repeated_registeredGradients_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -173,6 +191,7 @@ namespace Tensorflow { int size = 0; size += function_.CalculateSize(_repeated_function_codec); size += gradient_.CalculateSize(_repeated_gradient_codec); + size += registeredGradients_.CalculateSize(_repeated_registeredGradients_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -186,6 +205,7 @@ namespace Tensorflow { } function_.Add(other.function_); gradient_.Add(other.gradient_); + registeredGradients_.Add(other.registeredGradients_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -205,6 +225,10 @@ namespace Tensorflow { gradient_.AddEntriesFrom(input, _repeated_gradient_codec); break; } + case 26: { + registeredGradients_.AddEntriesFrom(input, _repeated_registeredGradients_codec); + break; + } } } } @@ -820,6 +844,175 @@ namespace Tensorflow { } + /// + /// RegisteredGradient stores a gradient function that is registered in the + /// gradients library and used in the ops of a function in the function library. + /// Unlike GradientDef, these gradients are identified by op type, and not + /// directly linked to any function. + /// + public sealed partial class RegisteredGradient : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RegisteredGradient()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.FunctionReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RegisteredGradient() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RegisteredGradient(RegisteredGradient other) : this() { + gradientFunc_ = other.gradientFunc_; + registeredOpType_ = other.registeredOpType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RegisteredGradient Clone() { + return new RegisteredGradient(this); + } + + /// Field number for the "gradient_func" field. + public const int GradientFuncFieldNumber = 1; + private string gradientFunc_ = ""; + /// + /// The gradient function's name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string GradientFunc { + get { return gradientFunc_; } + set { + gradientFunc_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "registered_op_type" field. + public const int RegisteredOpTypeFieldNumber = 2; + private string registeredOpType_ = ""; + /// + /// The gradient function's registered op type. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string RegisteredOpType { + get { return registeredOpType_; } + set { + registeredOpType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RegisteredGradient); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RegisteredGradient other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (GradientFunc != other.GradientFunc) return false; + if (RegisteredOpType != other.RegisteredOpType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (GradientFunc.Length != 0) hash ^= GradientFunc.GetHashCode(); + if (RegisteredOpType.Length != 0) hash ^= RegisteredOpType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (GradientFunc.Length != 0) { + output.WriteRawTag(10); + output.WriteString(GradientFunc); + } + if (RegisteredOpType.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RegisteredOpType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (GradientFunc.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GradientFunc); + } + if (RegisteredOpType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RegisteredOpType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RegisteredGradient other) { + if (other == null) { + return; + } + if (other.GradientFunc.Length != 0) { + GradientFunc = other.GradientFunc; + } + if (other.RegisteredOpType.Length != 0) { + RegisteredOpType = other.RegisteredOpType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + GradientFunc = input.ReadString(); + break; + } + case 18: { + RegisteredOpType = input.ReadString(); + break; + } + } + } + } + + } + #endregion } diff --git a/src/TensorFlowNET.Core/Protobuf/Gen.bat b/src/TensorFlowNET.Core/Protobuf/Gen.bat index 165d8a3a..fdb962f8 100644 --- a/src/TensorFlowNET.Core/Protobuf/Gen.bat +++ b/src/TensorFlowNET.Core/Protobuf/Gen.bat @@ -24,6 +24,7 @@ protoc -I=%SRC_DIR% --csharp_out=%DST_DIR% tensorflow/core/framework/kernel_def. protoc -I=%SRC_DIR% --csharp_out=%DST_DIR% tensorflow/core/framework/log_memory.proto protoc -I=%SRC_DIR% --csharp_out=%DST_DIR% tensorflow/core/framework/tensor_slice.proto protoc -I=%SRC_DIR% --csharp_out=%DST_DIR% tensorflow/core/framework/summary.proto +protoc -I=%SRC_DIR% --csharp_out=%DST_DIR% tensorflow/core/framework/full_type.proto protoc -I=%SRC_DIR% --csharp_out=%DST_DIR% tensorflow/core/framework/op_def.proto protoc -I=%SRC_DIR% --csharp_out=%DST_DIR% tensorflow/core/protobuf/saver.proto protoc -I=%SRC_DIR% --csharp_out=%DST_DIR% tensorflow/core/protobuf/saved_object_graph.proto @@ -39,6 +40,7 @@ protoc -I=%SRC_DIR% --csharp_out=%DST_DIR% tensorflow/core/protobuf/trackable_ob protoc -I=%SRC_DIR% --csharp_out=%DST_DIR% tensorflow/core/protobuf/struct.proto protoc -I=%SRC_DIR% --csharp_out=%DST_DIR% tensorflow/core/protobuf/verifier_config.proto protoc -I=%SRC_DIR% --csharp_out=%DST_DIR% tensorflow/core/util/event.proto +protoc -I=%SRC_DIR% --csharp_out=%DST_DIR% tensorflow/core/util/memmapped_file_system.proto protoc -I=%SRC_DIR% --csharp_out=%DST_DIR% tensorflow/python/training/checkpoint_state.proto protoc -I=%SRC_DIR% --csharp_out=%DST_DIR% tensorflow/python/framework/cpp_shape_inference.proto diff --git a/src/TensorFlowNET.Core/Protobuf/MemmappedFileSystem.cs b/src/TensorFlowNET.Core/Protobuf/MemmappedFileSystem.cs new file mode 100644 index 00000000..9a013fd7 --- /dev/null +++ b/src/TensorFlowNET.Core/Protobuf/MemmappedFileSystem.cs @@ -0,0 +1,360 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/core/util/memmapped_file_system.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow { + + /// Holder for reflection information generated from tensorflow/core/util/memmapped_file_system.proto + public static partial class MemmappedFileSystemReflection { + + #region Descriptor + /// File descriptor for tensorflow/core/util/memmapped_file_system.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MemmappedFileSystemReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjB0ZW5zb3JmbG93L2NvcmUvdXRpbC9tZW1tYXBwZWRfZmlsZV9zeXN0ZW0u", + "cHJvdG8SCnRlbnNvcmZsb3ciUwojTWVtbWFwcGVkRmlsZVN5c3RlbURpcmVj", + "dG9yeUVsZW1lbnQSDgoGb2Zmc2V0GAEgASgEEgwKBG5hbWUYAiABKAkSDgoG", + "bGVuZ3RoGAMgASgEImAKHE1lbW1hcHBlZEZpbGVTeXN0ZW1EaXJlY3RvcnkS", + "QAoHZWxlbWVudBgBIAMoCzIvLnRlbnNvcmZsb3cuTWVtbWFwcGVkRmlsZVN5", + "c3RlbURpcmVjdG9yeUVsZW1lbnRCA/gBAWIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemmappedFileSystemDirectoryElement), global::Tensorflow.MemmappedFileSystemDirectoryElement.Parser, new[]{ "Offset", "Name", "Length" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.MemmappedFileSystemDirectory), global::Tensorflow.MemmappedFileSystemDirectory.Parser, new[]{ "Element" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// A message that describes one region of memmapped file. + /// + public sealed partial class MemmappedFileSystemDirectoryElement : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MemmappedFileSystemDirectoryElement()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.MemmappedFileSystemReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MemmappedFileSystemDirectoryElement() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MemmappedFileSystemDirectoryElement(MemmappedFileSystemDirectoryElement other) : this() { + offset_ = other.offset_; + name_ = other.name_; + length_ = other.length_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MemmappedFileSystemDirectoryElement Clone() { + return new MemmappedFileSystemDirectoryElement(this); + } + + /// Field number for the "offset" field. + public const int OffsetFieldNumber = 1; + private ulong offset_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ulong Offset { + get { return offset_; } + set { + offset_ = value; + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 2; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "length" field. + public const int LengthFieldNumber = 3; + private ulong length_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ulong Length { + get { return length_; } + set { + length_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as MemmappedFileSystemDirectoryElement); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(MemmappedFileSystemDirectoryElement other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Offset != other.Offset) return false; + if (Name != other.Name) return false; + if (Length != other.Length) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Offset != 0UL) hash ^= Offset.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Length != 0UL) hash ^= Length.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Offset != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(Offset); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (Length != 0UL) { + output.WriteRawTag(24); + output.WriteUInt64(Length); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Offset != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Offset); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Length != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Length); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(MemmappedFileSystemDirectoryElement other) { + if (other == null) { + return; + } + if (other.Offset != 0UL) { + Offset = other.Offset; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Length != 0UL) { + Length = other.Length; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Offset = input.ReadUInt64(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + case 24: { + Length = input.ReadUInt64(); + break; + } + } + } + } + + } + + /// + /// A directory of regions in a memmapped file. + /// + public sealed partial class MemmappedFileSystemDirectory : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MemmappedFileSystemDirectory()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.MemmappedFileSystemReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MemmappedFileSystemDirectory() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MemmappedFileSystemDirectory(MemmappedFileSystemDirectory other) : this() { + element_ = other.element_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MemmappedFileSystemDirectory Clone() { + return new MemmappedFileSystemDirectory(this); + } + + /// Field number for the "element" field. + public const int ElementFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_element_codec + = pb::FieldCodec.ForMessage(10, global::Tensorflow.MemmappedFileSystemDirectoryElement.Parser); + private readonly pbc::RepeatedField element_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Element { + get { return element_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as MemmappedFileSystemDirectory); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(MemmappedFileSystemDirectory other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!element_.Equals(other.element_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= element_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + element_.WriteTo(output, _repeated_element_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += element_.CalculateSize(_repeated_element_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(MemmappedFileSystemDirectory other) { + if (other == null) { + return; + } + element_.Add(other.element_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + element_.AddEntriesFrom(input, _repeated_element_codec); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Core/Protobuf/OpDef.cs b/src/TensorFlowNET.Core/Protobuf/OpDef.cs index 03c093fb..df26be91 100644 --- a/src/TensorFlowNET.Core/Protobuf/OpDef.cs +++ b/src/TensorFlowNET.Core/Protobuf/OpDef.cs @@ -26,35 +26,38 @@ namespace Tensorflow { string.Concat( "CiZ0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL29wX2RlZi5wcm90bxIKdGVu", "c29yZmxvdxoqdGVuc29yZmxvdy9jb3JlL2ZyYW1ld29yay9hdHRyX3ZhbHVl", - "LnByb3RvGiV0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL3R5cGVzLnByb3Rv", - "Gi90ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL3Jlc291cmNlX2hhbmRsZS5w", - "cm90byKUBgoFT3BEZWYSDAoEbmFtZRgBIAEoCRIrCglpbnB1dF9hcmcYAiAD", - "KAsyGC50ZW5zb3JmbG93Lk9wRGVmLkFyZ0RlZhIsCgpvdXRwdXRfYXJnGAMg", - "AygLMhgudGVuc29yZmxvdy5PcERlZi5BcmdEZWYSFgoOY29udHJvbF9vdXRw", - "dXQYFCADKAkSJwoEYXR0chgEIAMoCzIZLnRlbnNvcmZsb3cuT3BEZWYuQXR0", - "ckRlZhIuCgtkZXByZWNhdGlvbhgIIAEoCzIZLnRlbnNvcmZsb3cuT3BEZ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LMi0udGVuc29y", + "Zmxvdy5SZXNvdXJjZUhhbmRsZVByb3RvLkR0eXBlQW5kU2hhcGUSDgoGaXNf", + "cmVmGBAgASgIEjcKFmV4cGVyaW1lbnRhbF9mdWxsX3R5cGUYESABKAsyFy50", + "ZW5zb3JmbG93LkZ1bGxUeXBlRGVmGr0BCgdBdHRyRGVmEgwKBG5hbWUYASAB", + "KAkSDAoEdHlwZRgCIAEoCRIsCg1kZWZhdWx0X3ZhbHVlGAMgASgLMhUudGVu", + "c29yZmxvdy5BdHRyVmFsdWUSEwoLZGVzY3JpcHRpb24YBCABKAkSEwoLaGFz", + "X21pbmltdW0YBSABKAgSDwoHbWluaW11bRgGIAEoAxItCg5hbGxvd2VkX3Zh", + "bHVlcxgHIAEoCzIVLnRlbnNvcmZsb3cuQXR0clZhbHVlIjUKDU9wRGVwcmVj", + "YXRpb24SDwoHdmVyc2lvbhgBIAEoBRITCgtleHBsYW5hdGlvbhgCIAEoCSIn", + "CgZPcExpc3QSHQoCb3AYASADKAsyES50ZW5zb3JmbG93Lk9wRGVmQnsKGG9y", + "Zy50ZW5zb3JmbG93LmZyYW1ld29ya0ILT3BEZWZQcm90b3NQAVpNZ2l0aHVi", + "LmNvbS90ZW5zb3JmbG93L3RlbnNvcmZsb3cvdGVuc29yZmxvdy9nby9jb3Jl", + "L2ZyYW1ld29yay9vcF9kZWZfZ29fcHJvdG/4AQFiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { global::Tensorflow.AttrValueReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, global::Tensorflow.ResourceHandleReflection.Descriptor, }, + new pbr::FileDescriptor[] { global::Tensorflow.AttrValueReflection.Descriptor, global::Tensorflow.FullTypeReflection.Descriptor, global::Tensorflow.ResourceHandleReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpDef), global::Tensorflow.OpDef.Parser, new[]{ "Name", "InputArg", "OutputArg", "ControlOutput", "Attr", "Deprecation", "Summary", "Description", "IsCommutative", "IsAggregate", "IsStateful", "AllowsUninitializedInput" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpDef.Types.ArgDef), global::Tensorflow.OpDef.Types.ArgDef.Parser, new[]{ "Name", "Description", "Type", "TypeAttr", "NumberAttr", "TypeListAttr", "HandleData", "IsRef" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpDef), global::Tensorflow.OpDef.Parser, new[]{ "Name", "InputArg", "OutputArg", "ControlOutput", "Attr", "Deprecation", "Summary", "Description", "IsCommutative", "IsAggregate", "IsStateful", "AllowsUninitializedInput", "IsDistributedCommunication" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpDef.Types.ArgDef), global::Tensorflow.OpDef.Types.ArgDef.Parser, new[]{ "Name", "Description", "Type", "TypeAttr", "NumberAttr", "TypeListAttr", "HandleData", "IsRef", "ExperimentalFullType" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpDef.Types.AttrDef), global::Tensorflow.OpDef.Types.AttrDef.Parser, new[]{ "Name", "Type", "DefaultValue", "Description", "HasMinimum", "Minimum", "AllowedValues" }, null, null, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpDeprecation), global::Tensorflow.OpDeprecation.Parser, new[]{ "Version", "Explanation" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.OpList), global::Tensorflow.OpList.Parser, new[]{ "Op" }, null, null, null, null) @@ -106,6 +109,7 @@ namespace Tensorflow { isAggregate_ = other.isAggregate_; isStateful_ = other.isStateful_; allowsUninitializedInput_ = other.allowsUninitializedInput_; + isDistributedCommunication_ = other.isDistributedCommunication_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -297,6 +301,22 @@ namespace Tensorflow { } } + /// Field number for the "is_distributed_communication" field. + public const int IsDistributedCommunicationFieldNumber = 21; + private bool isDistributedCommunication_; + /// + /// Indicates whether the op implementation uses distributed communication. + /// If True, the op is allowed to return errors for network disconnection and + /// trigger TF network failure handling logics. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool IsDistributedCommunication { + get { return isDistributedCommunication_; } + set { + isDistributedCommunication_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as OpDef); @@ -322,6 +342,7 @@ namespace Tensorflow { if (IsAggregate != other.IsAggregate) return false; if (IsStateful != other.IsStateful) return false; if (AllowsUninitializedInput != other.AllowsUninitializedInput) return false; + if (IsDistributedCommunication != other.IsDistributedCommunication) return false; return Equals(_unknownFields, other._unknownFields); } @@ -340,6 +361,7 @@ namespace Tensorflow { if (IsAggregate != false) hash ^= IsAggregate.GetHashCode(); if (IsStateful != false) hash ^= IsStateful.GetHashCode(); if (AllowsUninitializedInput != false) hash ^= AllowsUninitializedInput.GetHashCode(); + if (IsDistributedCommunication != false) hash ^= IsDistributedCommunication.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -389,6 +411,10 @@ namespace Tensorflow { output.WriteBool(AllowsUninitializedInput); } controlOutput_.WriteTo(output, _repeated_controlOutput_codec); + if (IsDistributedCommunication != false) { + output.WriteRawTag(168, 1); + output.WriteBool(IsDistributedCommunication); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -425,6 +451,9 @@ namespace Tensorflow { if (AllowsUninitializedInput != false) { size += 2 + 1; } + if (IsDistributedCommunication != false) { + size += 2 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -467,6 +496,9 @@ namespace Tensorflow { if (other.AllowsUninitializedInput != false) { AllowsUninitializedInput = other.AllowsUninitializedInput; } + if (other.IsDistributedCommunication != false) { + IsDistributedCommunication = other.IsDistributedCommunication; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -529,6 +561,10 @@ namespace Tensorflow { controlOutput_.AddEntriesFrom(input, _repeated_controlOutput_codec); break; } + case 168: { + IsDistributedCommunication = input.ReadBool(); + break; + } } } } @@ -573,6 +609,7 @@ namespace Tensorflow { typeListAttr_ = other.typeListAttr_; handleData_ = other.handleData_.Clone(); isRef_ = other.isRef_; + experimentalFullType_ = other.experimentalFullType_ != null ? other.experimentalFullType_.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -704,6 +741,28 @@ namespace Tensorflow { } } + /// Field number for the "experimental_full_type" field. + public const int ExperimentalFullTypeFieldNumber = 17; + private global::Tensorflow.FullTypeDef experimentalFullType_; + /// + /// Experimental. Full type declaration for this argument. + /// The full type specification combines type, type_attr, type_list_attr, + /// etc. into a unified representation. + /// This declaration may contain non-concrete types (for example, + /// Tensor<TypeVar<'T'>> is a valid type declaration. + /// + /// Note: this is a transient field. The long-term aim is to represent the + /// entire OpDef as a single type: a callable. In that context, this field is + /// just the type of a single argument. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.FullTypeDef ExperimentalFullType { + get { return experimentalFullType_; } + set { + experimentalFullType_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as ArgDef); @@ -725,6 +784,7 @@ namespace Tensorflow { if (TypeListAttr != other.TypeListAttr) return false; if(!handleData_.Equals(other.handleData_)) return false; if (IsRef != other.IsRef) return false; + if (!object.Equals(ExperimentalFullType, other.ExperimentalFullType)) return false; return Equals(_unknownFields, other._unknownFields); } @@ -739,6 +799,7 @@ namespace Tensorflow { if (TypeListAttr.Length != 0) hash ^= TypeListAttr.GetHashCode(); hash ^= handleData_.GetHashCode(); if (IsRef != false) hash ^= IsRef.GetHashCode(); + if (experimentalFullType_ != null) hash ^= ExperimentalFullType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -781,6 +842,10 @@ namespace Tensorflow { output.WriteRawTag(128, 1); output.WriteBool(IsRef); } + if (experimentalFullType_ != null) { + output.WriteRawTag(138, 1); + output.WriteMessage(ExperimentalFullType); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -811,6 +876,9 @@ namespace Tensorflow { if (IsRef != false) { size += 2 + 1; } + if (experimentalFullType_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(ExperimentalFullType); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -844,6 +912,12 @@ namespace Tensorflow { if (other.IsRef != false) { IsRef = other.IsRef; } + if (other.experimentalFullType_ != null) { + if (experimentalFullType_ == null) { + ExperimentalFullType = new global::Tensorflow.FullTypeDef(); + } + ExperimentalFullType.MergeFrom(other.ExperimentalFullType); + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -887,6 +961,13 @@ namespace Tensorflow { IsRef = input.ReadBool(); break; } + case 138: { + if (experimentalFullType_ == null) { + ExperimentalFullType = new global::Tensorflow.FullTypeDef(); + } + input.ReadMessage(ExperimentalFullType); + break; + } } } } diff --git a/src/TensorFlowNET.Core/Protobuf/RewriterConfig.cs b/src/TensorFlowNET.Core/Protobuf/RewriterConfig.cs index db8951c5..2804ca26 100644 --- a/src/TensorFlowNET.Core/Protobuf/RewriterConfig.cs +++ b/src/TensorFlowNET.Core/Protobuf/RewriterConfig.cs @@ -842,8 +842,8 @@ namespace Tensorflow { private long metaOptimizerTimeoutMs_; /// /// Maximum number of milliseconds to spend optimizing a single graph before - /// timing out. If equal to 0 the system picks a default (currently 5 minutes). - /// If less than 0 the optimizer will never time out. + /// timing out. If less than or equal to 0 (default value) the optimizer will + /// never time out. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public long MetaOptimizerTimeoutMs { diff --git a/src/TensorFlowNET.Core/Protobuf/SavedObjectGraph.cs b/src/TensorFlowNET.Core/Protobuf/SavedObjectGraph.cs index dc3c5318..9d3e854a 100644 --- a/src/TensorFlowNET.Core/Protobuf/SavedObjectGraph.cs +++ b/src/TensorFlowNET.Core/Protobuf/SavedObjectGraph.cs @@ -36,7 +36,7 @@ namespace Tensorflow { "aW9ucxgCIAMoCzIzLnRlbnNvcmZsb3cuU2F2ZWRPYmplY3RHcmFwaC5Db25j", "cmV0ZUZ1bmN0aW9uc0VudHJ5GlsKFkNvbmNyZXRlRnVuY3Rpb25zRW50cnkS", "CwoDa2V5GAEgASgJEjAKBXZhbHVlGAIgASgLMiEudGVuc29yZmxvdy5TYXZl", - "ZENvbmNyZXRlRnVuY3Rpb246AjgBItkFCgtTYXZlZE9iamVjdBJSCghjaGls", + "ZENvbmNyZXRlRnVuY3Rpb246AjgBIpAGCgtTYXZlZE9iamVjdBJSCghjaGls", "ZHJlbhgBIAMoCzJALnRlbnNvcmZsb3cuVHJhY2thYmxlT2JqZWN0R3JhcGgu", "VHJhY2thYmxlT2JqZWN0Lk9iamVjdFJlZmVyZW5jZRJeCg5zbG90X3Zhcmlh", "YmxlcxgDIAMoCzJGLnRlbnNvcmZsb3cuVHJhY2thYmxlT2JqZWN0R3JhcGgu", @@ -48,51 +48,54 @@ namespace Tensorflow { "RwoWYmFyZV9jb25jcmV0ZV9mdW5jdGlvbhgIIAEoCzIlLnRlbnNvcmZsb3cu", "U2F2ZWRCYXJlQ29uY3JldGVGdW5jdGlvbkgAEi0KCGNvbnN0YW50GAkgASgL", "MhkudGVuc29yZmxvdy5TYXZlZENvbnN0YW50SAASLQoIcmVzb3VyY2UYCiAB", - "KAsyGS50ZW5zb3JmbG93LlNhdmVkUmVzb3VyY2VIABJGChBzYXZlYWJsZV9v", - "YmplY3RzGAsgAygLMiwudGVuc29yZmxvdy5TYXZlZE9iamVjdC5TYXZlYWJs", - "ZU9iamVjdHNFbnRyeRpSChRTYXZlYWJsZU9iamVjdHNFbnRyeR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9OEAES", + "BwoDT0ZGEAJKBAgDEARKBAgEEAUiHwoNU2F2ZWRSZXNvdXJjZRIOCgZkZXZp", + "Y2UYASABKAkiQQoOU2F2ZWFibGVPYmplY3QSFQoNc2F2ZV9mdW5jdGlvbhgC", + "IAEoBRIYChByZXN0b3JlX2Z1bmN0aW9uGAMgASgFQlpaVWdpdGh1Yi5jb20v", + "dGVuc29yZmxvdy90ZW5zb3JmbG93L3RlbnNvcmZsb3cvZ28vY29yZS9wcm90", + "b2J1Zi9mb3JfY29yZV9wcm90b3NfZ29fcHJvdG/4AQFiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.TensorShapeReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, global::Tensorflow.VariableReflection.Descriptor, global::Tensorflow.VersionsReflection.Descriptor, global::Tensorflow.StructReflection.Descriptor, global::Tensorflow.TrackableObjectGraphReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedObjectGraph), global::Tensorflow.SavedObjectGraph.Parser, new[]{ "Nodes", "ConcreteFunctions" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), - new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedObject), global::Tensorflow.SavedObject.Parser, new[]{ "Children", "SlotVariables", "UserObject", "Asset", "Function", "Variable", "BareConcreteFunction", "Constant", "Resource", "SaveableObjects" }, new[]{ "Kind" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedObject), global::Tensorflow.SavedObject.Parser, new[]{ "Children", "SlotVariables", "UserObject", "Asset", "Function", "Variable", "BareConcreteFunction", "Constant", "Resource", "CapturedTensor", "SaveableObjects" }, new[]{ "Kind" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedUserObject), global::Tensorflow.SavedUserObject.Parser, new[]{ "Identifier", "Version", "Metadata" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedAsset), global::Tensorflow.SavedAsset.Parser, new[]{ "AssetFileDefIndex" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedFunction), global::Tensorflow.SavedFunction.Parser, new[]{ "ConcreteFunctions", "FunctionSpec" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CapturedTensor), global::Tensorflow.CapturedTensor.Parser, new[]{ "Name", "ConcreteFunction" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedConcreteFunction), global::Tensorflow.SavedConcreteFunction.Parser, new[]{ "BoundInputs", "CanonicalizedInputSignature", "OutputSignature" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedBareConcreteFunction), global::Tensorflow.SavedBareConcreteFunction.Parser, new[]{ "ConcreteFunctionName", "ArgumentKeywords", "AllowedPositionalArguments", "FunctionSpec" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.SavedConstant), global::Tensorflow.SavedConstant.Parser, new[]{ "Operation" }, null, null, null, null), @@ -307,6 +310,9 @@ namespace Tensorflow { case KindOneofCase.Resource: Resource = other.Resource.Clone(); break; + case KindOneofCase.CapturedTensor: + CapturedTensor = other.CapturedTensor.Clone(); + break; } _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); @@ -427,6 +433,17 @@ namespace Tensorflow { } } + /// Field number for the "captured_tensor" field. + public const int CapturedTensorFieldNumber = 12; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.CapturedTensor CapturedTensor { + get { return kindCase_ == KindOneofCase.CapturedTensor ? (global::Tensorflow.CapturedTensor) kind_ : null; } + set { + kind_ = value; + kindCase_ = value == null ? KindOneofCase.None : KindOneofCase.CapturedTensor; + } + } + /// Field number for the "saveable_objects" field. public const int SaveableObjectsFieldNumber = 11; private static readonly pbc::MapField.Codec _map_saveableObjects_codec @@ -448,6 +465,7 @@ namespace Tensorflow { BareConcreteFunction = 8, Constant = 9, Resource = 10, + CapturedTensor = 12, } private KindOneofCase kindCase_ = KindOneofCase.None; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -483,6 +501,7 @@ namespace Tensorflow { if (!object.Equals(BareConcreteFunction, other.BareConcreteFunction)) return false; if (!object.Equals(Constant, other.Constant)) return false; if (!object.Equals(Resource, other.Resource)) return false; + if (!object.Equals(CapturedTensor, other.CapturedTensor)) return false; if (!SaveableObjects.Equals(other.SaveableObjects)) return false; if (KindCase != other.KindCase) return false; return Equals(_unknownFields, other._unknownFields); @@ -500,6 +519,7 @@ namespace Tensorflow { if (kindCase_ == KindOneofCase.BareConcreteFunction) hash ^= BareConcreteFunction.GetHashCode(); if (kindCase_ == KindOneofCase.Constant) hash ^= Constant.GetHashCode(); if (kindCase_ == KindOneofCase.Resource) hash ^= Resource.GetHashCode(); + if (kindCase_ == KindOneofCase.CapturedTensor) hash ^= CapturedTensor.GetHashCode(); hash ^= SaveableObjects.GetHashCode(); hash ^= (int) kindCase_; if (_unknownFields != null) { @@ -546,6 +566,10 @@ namespace Tensorflow { output.WriteMessage(Resource); } saveableObjects_.WriteTo(output, _map_saveableObjects_codec); + if (kindCase_ == KindOneofCase.CapturedTensor) { + output.WriteRawTag(98); + output.WriteMessage(CapturedTensor); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -577,6 +601,9 @@ namespace Tensorflow { if (kindCase_ == KindOneofCase.Resource) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(Resource); } + if (kindCase_ == KindOneofCase.CapturedTensor) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CapturedTensor); + } size += saveableObjects_.CalculateSize(_map_saveableObjects_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -635,6 +662,12 @@ namespace Tensorflow { } Resource.MergeFrom(other.Resource); break; + case KindOneofCase.CapturedTensor: + if (CapturedTensor == null) { + CapturedTensor = new global::Tensorflow.CapturedTensor(); + } + CapturedTensor.MergeFrom(other.CapturedTensor); + break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); @@ -723,6 +756,15 @@ namespace Tensorflow { saveableObjects_.AddEntriesFrom(input, _map_saveableObjects_codec); break; } + case 98: { + global::Tensorflow.CapturedTensor subBuilder = new global::Tensorflow.CapturedTensor(); + if (kindCase_ == KindOneofCase.CapturedTensor) { + subBuilder.MergeFrom(CapturedTensor); + } + input.ReadMessage(subBuilder); + CapturedTensor = subBuilder; + break; + } } } } @@ -805,11 +847,13 @@ namespace Tensorflow { public const int MetadataFieldNumber = 3; private string metadata_ = ""; /// + /// Metadata for deserializing this object. + /// /// Deprecated! At the time of deprecation, Keras was the only user of this /// field, and its saving and loading code will be updated shortly. - /// Please save your application-specific metadata to separate file - /// Initialization-related metadata. + /// Please save your application-specific metadata to a separate file. /// + [global::System.ObsoleteAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string Metadata { get { return metadata_; } @@ -1240,6 +1284,169 @@ namespace Tensorflow { } + public sealed partial class CapturedTensor : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CapturedTensor()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CapturedTensor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CapturedTensor(CapturedTensor other) : this() { + name_ = other.name_; + concreteFunction_ = other.concreteFunction_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CapturedTensor Clone() { + return new CapturedTensor(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// Name of captured tensor + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "concrete_function" field. + public const int ConcreteFunctionFieldNumber = 2; + private string concreteFunction_ = ""; + /// + /// Name of concrete function which contains the computed graph tensor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string ConcreteFunction { + get { return concreteFunction_; } + set { + concreteFunction_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as CapturedTensor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(CapturedTensor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (ConcreteFunction != other.ConcreteFunction) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (ConcreteFunction.Length != 0) hash ^= ConcreteFunction.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (ConcreteFunction.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ConcreteFunction); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (ConcreteFunction.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ConcreteFunction); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(CapturedTensor other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.ConcreteFunction.Length != 0) { + ConcreteFunction = other.ConcreteFunction; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + ConcreteFunction = input.ReadString(); + break; + } + } + } + } + + } + /// /// Stores low-level information about a concrete function. Referenced in either /// a SavedFunction or a SavedBareConcreteFunction. @@ -1252,7 +1459,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[5]; } + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[6]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1285,12 +1492,6 @@ namespace Tensorflow { private static readonly pb::FieldCodec _repeated_boundInputs_codec = pb::FieldCodec.ForInt32(18); private readonly pbc::RepeatedField boundInputs_ = new pbc::RepeatedField(); - /// - /// Bound inputs to the function. The SavedObjects identified by the node ids - /// given here are appended as extra inputs to the caller-supplied inputs. - /// The only types of SavedObjects valid here are SavedVariable, SavedResource - /// and SavedAsset. - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public pbc::RepeatedField BoundInputs { get { return boundInputs_; } @@ -1457,7 +1658,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[6]; } + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[7]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1685,7 +1886,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[7]; } + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[8]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -1821,7 +2022,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[8]; } + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[9]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2156,7 +2357,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[9]; } + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[10]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2418,7 +2619,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[10]; } + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[11]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] @@ -2552,7 +2753,7 @@ namespace Tensorflow { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public static pbr::MessageDescriptor Descriptor { - get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[11]; } + get { return global::Tensorflow.SavedObjectGraphReflection.Descriptor.MessageTypes[12]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] diff --git a/src/TensorFlowNET.Core/Protobuf/Struct.cs b/src/TensorFlowNET.Core/Protobuf/Struct.cs index c79f468d..c0879bc9 100644 --- a/src/TensorFlowNET.Core/Protobuf/Struct.cs +++ b/src/TensorFlowNET.Core/Protobuf/Struct.cs @@ -58,19 +58,20 @@ namespace Tensorflow { "YW1lGAEgASgJEisKBXNoYXBlGAIgASgLMhwudGVuc29yZmxvdy5UZW5zb3JT", "aGFwZVByb3RvEiMKBWR0eXBlGAMgASgOMhQudGVuc29yZmxvdy5EYXRhVHlw", "ZRIoCgdtaW5pbXVtGAQgASgLMhcudGVuc29yZmxvdy5UZW5zb3JQcm90bxIo", - "CgdtYXhpbXVtGAUgASgLMhcudGVuc29yZmxvdy5UZW5zb3JQcm90byKoAwoN", + "CgdtYXhpbXVtGAUgASgLMhcudGVuc29yZmxvdy5UZW5zb3JQcm90byLbAwoN", "VHlwZVNwZWNQcm90bxJACg90eXBlX3NwZWNfY2xhc3MYASABKA4yJy50ZW5z", "b3JmbG93LlR5cGVTcGVjUHJvdG8uVHlwZVNwZWNDbGFzcxIvCgp0eXBlX3N0", "YXRlGAIgASgLMhsudGVuc29yZmxvdy5TdHJ1Y3R1cmVkVmFsdWUSHAoUdHlw", - "ZV9zcGVjX2NsYXNzX25hbWUYAyABKAkihQIKDVR5cGVTcGVjQ2xhc3MSCwoH", + "ZV9zcGVjX2NsYXNzX25hbWUYAyABKAkiuAIKDVR5cGVTcGVjQ2xhc3MSCwoH", "VU5LTk9XThAAEhYKElNQQVJTRV9URU5TT1JfU1BFQxABEhcKE0lOREVYRURf", "U0xJQ0VTX1NQRUMQAhIWChJSQUdHRURfVEVOU09SX1NQRUMQAxIVChFURU5T", "T1JfQVJSQVlfU1BFQxAEEhUKEURBVEFfREFUQVNFVF9TUEVDEAUSFgoSREFU", "QV9JVEVSQVRPUl9TUEVDEAYSEQoNT1BUSU9OQUxfU1BFQxAHEhQKEFBFUl9S", "RVBMSUNBX1NQRUMQCBIRCg1WQVJJQUJMRV9TUEVDEAkSFgoSUk9XX1BBUlRJ", - "VElPTl9TUEVDEAoiBAgLEAtCV1pVZ2l0aHViLmNvbS90ZW5zb3JmbG93L3Rl", - "bnNvcmZsb3cvdGVuc29yZmxvdy9nby9jb3JlL3Byb3RvYnVmL2Zvcl9jb3Jl", - "X3Byb3Rvc19nb19wcm90b2IGcHJvdG8z")); + "VElPTl9TUEVDEAoSGAoUUkVHSVNURVJFRF9UWVBFX1NQRUMQDBIXChNFWFRF", + "TlNJT05fVFlQRV9TUEVDEA0iBAgLEAtCV1pVZ2l0aHViLmNvbS90ZW5zb3Jm", + "bG93L3RlbnNvcmZsb3cvdGVuc29yZmxvdy9nby9jb3JlL3Byb3RvYnVmL2Zv", + "cl9jb3JlX3Byb3Rvc19nb19wcm90b2IGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Tensorflow.TensorReflection.Descriptor, global::Tensorflow.TensorShapeReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { @@ -2116,10 +2117,14 @@ namespace Tensorflow { public const int TypeSpecClassNameFieldNumber = 3; private string typeSpecClassName_ = ""; /// - /// This is currently redundant with the type_spec_class enum, and is only - /// used for error reporting. In particular, if you use an older binary to - /// load a newer model, and the model uses a TypeSpecClass that the older - /// binary doesn't support, then this lets us display a useful error message. + /// The name of the TypeSpec class. + /// * If type_spec_class == REGISTERED_TYPE_SPEC, the TypeSpec class is + /// the one registered under this name. For types registered outside + /// core TensorFlow by an add-on library, that library must be loaded + /// before this value can be deserialized by StructureCoder. + /// * If type_spec_class specifies a particular TypeSpec class, this field is + /// redundant with the type_spec_class enum, and is only used for error + /// reporting in older binaries that do not know the tupe_spec_class enum. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public string TypeSpecClassName { @@ -2295,6 +2300,14 @@ namespace Tensorflow { /// RowPartitionSpec from ragged/row_partition.py /// [pbr::OriginalName("ROW_PARTITION_SPEC")] RowPartitionSpec = 10, + /// + /// The type registered as type_spec_class_name. + /// + [pbr::OriginalName("REGISTERED_TYPE_SPEC")] RegisteredTypeSpec = 12, + /// + /// Subclasses of tf.ExtensionType + /// + [pbr::OriginalName("EXTENSION_TYPE_SPEC")] ExtensionTypeSpec = 13, } } diff --git a/src/TensorFlowNET.Core/Protobuf/Tensor.cs b/src/TensorFlowNET.Core/Protobuf/Tensor.cs index f7db83e1..1ab87133 100644 --- a/src/TensorFlowNET.Core/Protobuf/Tensor.cs +++ b/src/TensorFlowNET.Core/Protobuf/Tensor.cs @@ -217,7 +217,7 @@ namespace Tensorflow { = pb::FieldCodec.ForInt32(58); private readonly pbc::RepeatedField intVal_ = new pbc::RepeatedField(); /// - /// DT_INT32, DT_INT16, DT_INT8, DT_UINT8. + /// DT_INT32, DT_INT16, DT_UINT16, DT_INT8, DT_UINT8. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public pbc::RepeatedField IntVal { diff --git a/src/TensorFlowNET.Core/Protobuf/Types.cs b/src/TensorFlowNET.Core/Protobuf/Types.cs index 32fa84de..6483cddf 100644 --- a/src/TensorFlowNET.Core/Protobuf/Types.cs +++ b/src/TensorFlowNET.Core/Protobuf/Types.cs @@ -43,14 +43,13 @@ namespace Tensorflow { "X1JFRhB0EhEKDURUX1VJTlQxNl9SRUYQdRIVChFEVF9DT01QTEVYMTI4X1JF", "RhB2Eg8KC0RUX0hBTEZfUkVGEHcSEwoPRFRfUkVTT1VSQ0VfUkVGEHgSEgoO", "RFRfVkFSSUFOVF9SRUYQeRIRCg1EVF9VSU5UMzJfUkVGEHoSEQoNRFRfVUlO", - "VDY0X1JFRhB7KkYKD1NwZWNpYWxpemVkVHlwZRIOCgpTVF9JTlZBTElEEAAS", - "EgoOU1RfVEVOU09SX0xJU1QQARIPCgtTVF9PUFRJT05BTBACQnoKGG9yZy50", - "ZW5zb3JmbG93LmZyYW1ld29ya0ILVHlwZXNQcm90b3NQAVpMZ2l0aHViLmNv", - "bS90ZW5zb3JmbG93L3RlbnNvcmZsb3cvdGVuc29yZmxvdy9nby9jb3JlL2Zy", - "YW1ld29yay90eXBlc19nb19wcm90b/gBAWIGcHJvdG8z")); + "VDY0X1JFRhB7QnoKGG9yZy50ZW5zb3JmbG93LmZyYW1ld29ya0ILVHlwZXNQ", + "cm90b3NQAVpMZ2l0aHViLmNvbS90ZW5zb3JmbG93L3RlbnNvcmZsb3cvdGVu", + "c29yZmxvdy9nby9jb3JlL2ZyYW1ld29yay90eXBlc19nb19wcm90b/gBAWIG", + "cHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tensorflow.DataType), typeof(global::Tensorflow.SpecializedType), }, null, null)); + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tensorflow.DataType), }, null, null)); } #endregion @@ -149,27 +148,6 @@ namespace Tensorflow { [pbr::OriginalName("DT_UINT64_REF")] DtUint64Ref = 123, } - /// - /// For identifying the underlying type of a variant. For variants, the types - /// listed here are a subset of the types in the variant type registry, - /// corresponding to commonly used variants which must occasionally be - /// special-cased. - /// - public enum SpecializedType { - /// - /// Invalid/unknown specialized type. - /// - [pbr::OriginalName("ST_INVALID")] StInvalid = 0, - /// - /// "tensorflow::TensorList" in the variant type registry. - /// - [pbr::OriginalName("ST_TENSOR_LIST")] StTensorList = 1, - /// - /// "tensorflow::data::Optional" in the variant type registry. - /// - [pbr::OriginalName("ST_OPTIONAL")] StOptional = 2, - } - #endregion }