From 3aa53baa72683ec68d109c729e762a37c17354eb Mon Sep 17 00:00:00 2001 From: Liu Liu Date: Thu, 14 Nov 2024 15:55:30 -0500 Subject: [PATCH] Update protobuf for tensorboard that with the newer swift-protobuf. --- WORKSPACE | 4 +- deps.bzl | 4 +- .../allocation_description.pb.swift | 10 +- tensorboard/proto-generated/api_def.pb.swift | 26 ++-- .../proto-generated/attr_value.pb.swift | 19 +-- tensorboard/proto-generated/cluster.pb.swift | 13 +- tensorboard/proto-generated/config.pb.swift | 128 ++++++++++-------- .../coordination_config.pb.swift | 10 +- .../proto-generated/cost_graph.pb.swift | 27 ++-- .../cpp_shape_inference.pb.swift | 19 +-- tensorboard/proto-generated/debug.pb.swift | 19 +-- tensorboard/proto-generated/event.pb.swift | 59 ++++---- .../proto-generated/full_type.pb.swift | 17 +-- tensorboard/proto-generated/function.pb.swift | 32 ++--- tensorboard/proto-generated/graph.pb.swift | 12 +- .../proto-generated/meta_graph.pb.swift | 62 ++++----- tensorboard/proto-generated/node_def.pb.swift | 13 +- tensorboard/proto-generated/op_def.pb.swift | 32 ++--- .../proto-generated/resource_handle.pb.swift | 13 +- .../proto-generated/rewriter_config.pb.swift | 45 +++--- .../saved_object_graph.pb.swift | 55 +++----- tensorboard/proto-generated/saver.pb.swift | 16 +-- .../proto-generated/step_stats.pb.swift | 41 +++--- tensorboard/proto-generated/struct.pb.swift | 68 +++++----- tensorboard/proto-generated/summary.pb.swift | 50 +++---- tensorboard/proto-generated/tensor.pb.swift | 23 ++-- .../tensor_description.pb.swift | 10 +- .../proto-generated/tensor_shape.pb.swift | 13 +- .../proto-generated/tfprof_log.pb.swift | 46 +++---- .../trackable_object_graph.pb.swift | 25 ++-- tensorboard/proto-generated/types.pb.swift | 8 +- tensorboard/proto-generated/variable.pb.swift | 21 ++- .../proto-generated/verifier_config.pb.swift | 14 +- tensorboard/proto-generated/versions.pb.swift | 10 +- 34 files changed, 421 insertions(+), 543 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 0ba119807e1..32fac76628d 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -103,9 +103,9 @@ new_git_repository( new_git_repository( name = "SwiftProtobuf", build_file = "swift-protobuf.BUILD", - commit = "7cbb5279dd7e997c8f0f5537e46d4513be894ff1", + commit = "d57a5aecf24a25b32ec4a74be2f5d0a995a47c4b", remote = "https://github.com/apple/swift-protobuf.git", - shallow_since = "1658527939 -0700", + shallow_since = "1720448759 -0400", ) new_git_repository( diff --git a/deps.bzl b/deps.bzl index 71a570e4088..2f99a68482c 100644 --- a/deps.bzl +++ b/deps.bzl @@ -73,9 +73,9 @@ def s4nnc_extra_deps(): new_git_repository, name = "SwiftProtobuf", build_file = "@s4nnc//:external/swift-protobuf.BUILD", - commit = "7cbb5279dd7e997c8f0f5537e46d4513be894ff1", + commit = "d57a5aecf24a25b32ec4a74be2f5d0a995a47c4b", remote = "https://github.com/apple/swift-protobuf.git", - shallow_since = "1658527939 -0700", + shallow_since = "1720448759 -0400", ) _maybe( diff --git a/tensorboard/proto-generated/allocation_description.pb.swift b/tensorboard/proto-generated/allocation_description.pb.swift index dbbe985b81f..c1adcdd3371 100644 --- a/tensorboard/proto-generated/allocation_description.pb.swift +++ b/tensorboard/proto-generated/allocation_description.pb.swift @@ -16,11 +16,11 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } -struct Tensorboard_AllocationDescription { +struct Tensorboard_AllocationDescription: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -48,10 +48,6 @@ struct Tensorboard_AllocationDescription { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_AllocationDescription: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/api_def.pb.swift b/tensorboard/proto-generated/api_def.pb.swift index 8647da29acf..58eca4d6841 100644 --- a/tensorboard/proto-generated/api_def.pb.swift +++ b/tensorboard/proto-generated/api_def.pb.swift @@ -19,8 +19,8 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// Used to specify and override the default API & behavior in the @@ -39,7 +39,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// you can change the semantics of existing code. These changes may /// need to wait until a major release of TensorFlow to avoid breaking /// our compatibility promises. -struct Tensorboard_ApiDef { +struct Tensorboard_ApiDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -86,7 +86,7 @@ struct Tensorboard_ApiDef { var unknownFields = SwiftProtobuf.UnknownStorage() - enum Visibility: SwiftProtobuf.Enum { + enum Visibility: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int /// Normally this is "VISIBLE" unless you are inheriting a @@ -130,7 +130,7 @@ struct Tensorboard_ApiDef { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_ApiDef.Visibility] = [ + static let allCases: [Tensorboard_ApiDef.Visibility] = [ .defaultVisibility, .visible, .skip, @@ -143,7 +143,7 @@ struct Tensorboard_ApiDef { /// inherited endpoints. The first endpoint should be the /// "canonical" endpoint, and should not be deprecated (unless all /// endpoints are deprecated). - struct Endpoint { + struct Endpoint: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -168,7 +168,7 @@ struct Tensorboard_ApiDef { init() {} } - struct Arg { + struct Arg: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -193,7 +193,7 @@ struct Tensorboard_ApiDef { /// Description of the graph-construction-time configuration of this /// Op. That is to say, this describes the attr fields that will /// be specified in the NodeDef. - struct Attr { + struct Attr: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -232,7 +232,7 @@ struct Tensorboard_ApiDef { init() {} } -struct Tensorboard_ApiDefs { +struct Tensorboard_ApiDefs: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -244,14 +244,6 @@ struct Tensorboard_ApiDefs { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_ApiDef: @unchecked Sendable {} -extension Tensorboard_ApiDef.Endpoint: @unchecked Sendable {} -extension Tensorboard_ApiDef.Arg: @unchecked Sendable {} -extension Tensorboard_ApiDef.Attr: @unchecked Sendable {} -extension Tensorboard_ApiDefs: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/attr_value.pb.swift b/tensorboard/proto-generated/attr_value.pb.swift index e6cb7c77e86..cd3a33a31b9 100644 --- a/tensorboard/proto-generated/attr_value.pb.swift +++ b/tensorboard/proto-generated/attr_value.pb.swift @@ -16,14 +16,14 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// Protocol buffer representing the value for an attr used to configure an Op. /// Comment indicates the corresponding attr type. Only the field matching the /// attr type may be filled. -struct Tensorboard_AttrValue { +struct Tensorboard_AttrValue: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -131,7 +131,7 @@ struct Tensorboard_AttrValue { var unknownFields = SwiftProtobuf.UnknownStorage() - enum OneOf_Value: Equatable { + enum OneOf_Value: Equatable, @unchecked Sendable { /// "string" case s(Data) /// "int" @@ -165,7 +165,7 @@ struct Tensorboard_AttrValue { } /// DISABLED.IfChange - struct ListValue { + struct ListValue: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -204,7 +204,7 @@ struct Tensorboard_AttrValue { /// A list of attr names and their values. The whole list is attached /// with a string name. E.g., MatMul[T=float]. -struct Tensorboard_NameAttrList { +struct Tensorboard_NameAttrList: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -218,13 +218,6 @@ struct Tensorboard_NameAttrList { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_AttrValue: @unchecked Sendable {} -extension Tensorboard_AttrValue.OneOf_Value: @unchecked Sendable {} -extension Tensorboard_AttrValue.ListValue: @unchecked Sendable {} -extension Tensorboard_NameAttrList: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/cluster.pb.swift b/tensorboard/proto-generated/cluster.pb.swift index b493abbc764..5865cf6dcc8 100644 --- a/tensorboard/proto-generated/cluster.pb.swift +++ b/tensorboard/proto-generated/cluster.pb.swift @@ -31,12 +31,12 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// Defines a single job in a TensorFlow cluster. -struct Tensorboard_JobDef { +struct Tensorboard_JobDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -57,7 +57,7 @@ struct Tensorboard_JobDef { } /// Defines a TensorFlow cluster as a set of jobs. -struct Tensorboard_ClusterDef { +struct Tensorboard_ClusterDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -70,11 +70,6 @@ struct Tensorboard_ClusterDef { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_JobDef: @unchecked Sendable {} -extension Tensorboard_ClusterDef: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/config.pb.swift b/tensorboard/proto-generated/config.pb.swift index c9b1f5f5aef..f9325e75eca 100644 --- a/tensorboard/proto-generated/config.pb.swift +++ b/tensorboard/proto-generated/config.pb.swift @@ -16,11 +16,11 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } -struct Tensorboard_GPUOptions { +struct Tensorboard_GPUOptions: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -144,7 +144,7 @@ struct Tensorboard_GPUOptions { var unknownFields = SwiftProtobuf.UnknownStorage() - struct Experimental { + struct Experimental: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -246,7 +246,7 @@ struct Tensorboard_GPUOptions { /// Configuration for breaking down a visible GPU into multiple "virtual" /// devices. - struct VirtualDevices { + struct VirtualDevices: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -287,7 +287,7 @@ struct Tensorboard_GPUOptions { } /// Options passed to the graph optimizer -struct Tensorboard_OptimizerOptions { +struct Tensorboard_OptimizerOptions: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -327,7 +327,7 @@ struct Tensorboard_OptimizerOptions { var unknownFields = SwiftProtobuf.UnknownStorage() /// Optimization level - enum Level: SwiftProtobuf.Enum { + enum Level: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int /// L1 is the default level. @@ -361,7 +361,7 @@ struct Tensorboard_OptimizerOptions { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_OptimizerOptions.Level] = [ + static let allCases: [Tensorboard_OptimizerOptions.Level] = [ .l1, .l0, ] @@ -369,7 +369,7 @@ struct Tensorboard_OptimizerOptions { } /// Control the use of the compiler/jit. Experimental. - enum GlobalJitLevel: SwiftProtobuf.Enum { + enum GlobalJitLevel: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int /// Default setting ("off" now, but later expected to be "on") @@ -409,7 +409,7 @@ struct Tensorboard_OptimizerOptions { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_OptimizerOptions.GlobalJitLevel] = [ + static let allCases: [Tensorboard_OptimizerOptions.GlobalJitLevel] = [ .default, .off, .on1, @@ -421,7 +421,7 @@ struct Tensorboard_OptimizerOptions { init() {} } -struct Tensorboard_GraphOptions { +struct Tensorboard_GraphOptions: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -489,7 +489,7 @@ struct Tensorboard_GraphOptions { fileprivate var _rewriteOptions: Tensorboard_RewriterConfig? = nil } -struct Tensorboard_ThreadPoolOptionProto { +struct Tensorboard_ThreadPoolOptionProto: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -522,7 +522,7 @@ struct Tensorboard_ThreadPoolOptionProto { init() {} } -struct Tensorboard_RPCOptions { +struct Tensorboard_RPCOptions: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -573,7 +573,7 @@ struct Tensorboard_RPCOptions { /// sessions within the same process. /// /// NOTE: This is currently used and propagated only by the direct session. -struct Tensorboard_SessionMetadata { +struct Tensorboard_SessionMetadata: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -590,7 +590,7 @@ struct Tensorboard_SessionMetadata { /// Session configuration parameters. /// The system picks appropriate values for fields that are not set. -struct Tensorboard_ConfigProto { +struct Tensorboard_ConfigProto: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -788,7 +788,7 @@ struct Tensorboard_ConfigProto { /// Everything inside Experimental is subject to change and is not subject /// to API stability guarantees in /// https://www.tensorflow.org/guide/version_compat. - struct Experimental { + struct Experimental: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -995,7 +995,7 @@ struct Tensorboard_ConfigProto { var unknownFields = SwiftProtobuf.UnknownStorage() /// An enum that describes the state of the MLIR bridge rollout. - enum MlirBridgeRollout: SwiftProtobuf.Enum { + enum MlirBridgeRollout: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int /// If this field is left unspecified, the MLIR bridge may be selectively @@ -1050,7 +1050,7 @@ struct Tensorboard_ConfigProto { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_ConfigProto.Experimental.MlirBridgeRollout] = [ + static let allCases: [Tensorboard_ConfigProto.Experimental.MlirBridgeRollout] = [ .unspecified, .enabled, .disabled, @@ -1071,7 +1071,7 @@ struct Tensorboard_ConfigProto { } /// Options for a single Run() call. -struct Tensorboard_RunOptions { +struct Tensorboard_RunOptions: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -1123,7 +1123,7 @@ struct Tensorboard_RunOptions { /// TODO(pbar) Turn this into a TraceOptions proto which allows /// tracing to be controlled in a more orthogonal manner? - enum TraceLevel: SwiftProtobuf.Enum { + enum TraceLevel: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int case noTrace // = 0 case softwareTrace // = 1 @@ -1156,7 +1156,7 @@ struct Tensorboard_RunOptions { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_RunOptions.TraceLevel] = [ + static let allCases: [Tensorboard_RunOptions.TraceLevel] = [ .noTrace, .softwareTrace, .hardwareTrace, @@ -1168,7 +1168,7 @@ struct Tensorboard_RunOptions { /// Everything inside Experimental is subject to change and is not subject /// to API stability guarantees in /// https://www.tensorflow.org/guide/version_compat. - struct Experimental { + struct Experimental: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -1197,7 +1197,7 @@ struct Tensorboard_RunOptions { var unknownFields = SwiftProtobuf.UnknownStorage() /// Options for run handler thread pool. - struct RunHandlerPoolOptions { + struct RunHandlerPoolOptions: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -1223,7 +1223,7 @@ struct Tensorboard_RunOptions { } /// Metadata output (i.e., non-Tensor) for a single Run() call. -struct Tensorboard_RunMetadata { +struct Tensorboard_RunMetadata: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -1267,7 +1267,7 @@ struct Tensorboard_RunMetadata { var unknownFields = SwiftProtobuf.UnknownStorage() - struct FunctionGraphs { + struct FunctionGraphs: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -1310,7 +1310,7 @@ struct Tensorboard_RunMetadata { } /// Defines a connection between two tensors in a `GraphDef`. -struct Tensorboard_TensorConnection { +struct Tensorboard_TensorConnection: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -1332,7 +1332,7 @@ struct Tensorboard_TensorConnection { /// to be fetched or executed. /// /// Compare with the arguments to `Session::Run()`. -struct Tensorboard_CallableOptions { +struct Tensorboard_CallableOptions: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -1455,26 +1455,6 @@ struct Tensorboard_CallableOptions { fileprivate var _storage = _StorageClass.defaultInstance } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_GPUOptions: @unchecked Sendable {} -extension Tensorboard_GPUOptions.Experimental: @unchecked Sendable {} -extension Tensorboard_GPUOptions.Experimental.VirtualDevices: @unchecked Sendable {} -extension Tensorboard_OptimizerOptions: @unchecked Sendable {} -extension Tensorboard_GraphOptions: @unchecked Sendable {} -extension Tensorboard_ThreadPoolOptionProto: @unchecked Sendable {} -extension Tensorboard_RPCOptions: @unchecked Sendable {} -extension Tensorboard_SessionMetadata: @unchecked Sendable {} -extension Tensorboard_ConfigProto: @unchecked Sendable {} -extension Tensorboard_ConfigProto.Experimental: @unchecked Sendable {} -extension Tensorboard_RunOptions: @unchecked Sendable {} -extension Tensorboard_RunOptions.Experimental: @unchecked Sendable {} -extension Tensorboard_RunOptions.Experimental.RunHandlerPoolOptions: @unchecked Sendable {} -extension Tensorboard_RunMetadata: @unchecked Sendable {} -extension Tensorboard_RunMetadata.FunctionGraphs: @unchecked Sendable {} -extension Tensorboard_TensorConnection: @unchecked Sendable {} -extension Tensorboard_CallableOptions: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" @@ -1504,7 +1484,15 @@ extension Tensorboard_GPUOptions: SwiftProtobuf.Message, SwiftProtobuf._MessageI var _forceGpuCompatible: Bool = false var _experimental: Tensorboard_GPUOptions.Experimental? = nil - static let defaultInstance = _StorageClass() + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {} @@ -1557,7 +1545,7 @@ extension Tensorboard_GPUOptions: SwiftProtobuf.Message, SwiftProtobuf._MessageI // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and // https://github.com/apple/swift-protobuf/issues/1182 - if _storage._perProcessGpuMemoryFraction != 0 { + if _storage._perProcessGpuMemoryFraction.bitPattern != 0 { try visitor.visitSingularDoubleField(value: _storage._perProcessGpuMemoryFraction, fieldNumber: 1) } if !_storage._allocatorType.isEmpty { @@ -1674,7 +1662,7 @@ extension Tensorboard_GPUOptions.Experimental: SwiftProtobuf.Message, SwiftProto if self.kernelTrackerMaxPending != 0 { try visitor.visitSingularInt32Field(value: self.kernelTrackerMaxPending, fieldNumber: 9) } - if self.internalFragmentationFraction != 0 { + if self.internalFragmentationFraction.bitPattern != 0 { try visitor.visitSingularDoubleField(value: self.internalFragmentationFraction, fieldNumber: 10) } if self.useCudaMallocAsync != false { @@ -2088,7 +2076,15 @@ extension Tensorboard_ConfigProto: SwiftProtobuf.Message, SwiftProtobuf._Message var _shareClusterDevicesInSession: Bool = false var _experimental: Tensorboard_ConfigProto.Experimental? = nil - static let defaultInstance = _StorageClass() + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {} @@ -2290,7 +2286,15 @@ extension Tensorboard_ConfigProto.Experimental: SwiftProtobuf.Message, SwiftProt var _xlaPreferSingleGraphCluster: Bool = false var _coordinationConfig: Tensorboard_CoordinationServiceConfig? = nil - static let defaultInstance = _StorageClass() + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {} @@ -2701,7 +2705,15 @@ extension Tensorboard_RunMetadata.FunctionGraphs: SwiftProtobuf.Message, SwiftPr var _preOptimizationGraph: Tensorboard_GraphDef? = nil var _postOptimizationGraph: Tensorboard_GraphDef? = nil - static let defaultInstance = _StorageClass() + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {} @@ -2833,7 +2845,15 @@ extension Tensorboard_CallableOptions: SwiftProtobuf.Message, SwiftProtobuf._Mes var _fetchDevices: Dictionary = [:] var _fetchSkipSync: Bool = false - static let defaultInstance = _StorageClass() + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {} diff --git a/tensorboard/proto-generated/coordination_config.pb.swift b/tensorboard/proto-generated/coordination_config.pb.swift index aa6b53968b9..be977c40e55 100644 --- a/tensorboard/proto-generated/coordination_config.pb.swift +++ b/tensorboard/proto-generated/coordination_config.pb.swift @@ -16,13 +16,13 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// Coordination service configuration parameters. /// The system picks appropriate values for fields that are not set. -struct Tensorboard_CoordinationServiceConfig { +struct Tensorboard_CoordinationServiceConfig: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -69,10 +69,6 @@ struct Tensorboard_CoordinationServiceConfig { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_CoordinationServiceConfig: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/cost_graph.pb.swift b/tensorboard/proto-generated/cost_graph.pb.swift index 7b85544f721..3e992ed8ea8 100644 --- a/tensorboard/proto-generated/cost_graph.pb.swift +++ b/tensorboard/proto-generated/cost_graph.pb.swift @@ -16,11 +16,11 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } -struct Tensorboard_CostGraphDef { +struct Tensorboard_CostGraphDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -31,7 +31,7 @@ struct Tensorboard_CostGraphDef { var unknownFields = SwiftProtobuf.UnknownStorage() - struct Node { + struct Node: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -56,10 +56,13 @@ struct Tensorboard_CostGraphDef { /// Persistent memory used by this node. var persistentMemorySize: Int64 = 0 + /// NOTE: This field was marked as deprecated in the .proto file. var hostTempMemorySize: Int64 = 0 + /// NOTE: This field was marked as deprecated in the .proto file. var deviceTempMemorySize: Int64 = 0 + /// NOTE: This field was marked as deprecated in the .proto file. var devicePersistentMemorySize: Int64 = 0 /// Estimate of the computational cost of this node, in microseconds. @@ -88,7 +91,7 @@ struct Tensorboard_CostGraphDef { /// Inputs of this node. They must be executed before this node can be /// executed. An input is a particular output of another node, specified /// by the node id and the output index. - struct InputInfo { + struct InputInfo: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -103,7 +106,7 @@ struct Tensorboard_CostGraphDef { } /// Outputs of this node. - struct OutputInfo { + struct OutputInfo: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -137,7 +140,7 @@ struct Tensorboard_CostGraphDef { } /// Total cost of this graph, typically used for balancing decisions. - struct AggregatedCost { + struct AggregatedCost: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -156,14 +159,6 @@ struct Tensorboard_CostGraphDef { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_CostGraphDef: @unchecked Sendable {} -extension Tensorboard_CostGraphDef.Node: @unchecked Sendable {} -extension Tensorboard_CostGraphDef.Node.InputInfo: @unchecked Sendable {} -extension Tensorboard_CostGraphDef.Node.OutputInfo: @unchecked Sendable {} -extension Tensorboard_CostGraphDef.AggregatedCost: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" @@ -441,7 +436,7 @@ extension Tensorboard_CostGraphDef.AggregatedCost: SwiftProtobuf.Message, SwiftP } func traverse(visitor: inout V) throws { - if self.cost != 0 { + if self.cost.bitPattern != 0 { try visitor.visitSingularFloatField(value: self.cost, fieldNumber: 1) } if !self.dimension.isEmpty { diff --git a/tensorboard/proto-generated/cpp_shape_inference.pb.swift b/tensorboard/proto-generated/cpp_shape_inference.pb.swift index f9b18ce5393..7e41b8a63cd 100644 --- a/tensorboard/proto-generated/cpp_shape_inference.pb.swift +++ b/tensorboard/proto-generated/cpp_shape_inference.pb.swift @@ -16,11 +16,11 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } -struct Tensorboard_CppShapeInferenceResult { +struct Tensorboard_CppShapeInferenceResult: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -45,7 +45,7 @@ struct Tensorboard_CppShapeInferenceResult { var unknownFields = SwiftProtobuf.UnknownStorage() - struct HandleShapeAndType { + struct HandleShapeAndType: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -78,7 +78,7 @@ struct Tensorboard_CppShapeInferenceResult { fileprivate var _type: Tensorboard_FullTypeDef? = nil } - struct HandleData { + struct HandleData: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -99,7 +99,7 @@ struct Tensorboard_CppShapeInferenceResult { fileprivate var _handleData: Tensorboard_CppShapeInferenceResult.HandleData? = nil } -struct Tensorboard_CppShapeInferenceInputsNeeded { +struct Tensorboard_CppShapeInferenceInputsNeeded: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -113,13 +113,6 @@ struct Tensorboard_CppShapeInferenceInputsNeeded { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_CppShapeInferenceResult: @unchecked Sendable {} -extension Tensorboard_CppShapeInferenceResult.HandleShapeAndType: @unchecked Sendable {} -extension Tensorboard_CppShapeInferenceResult.HandleData: @unchecked Sendable {} -extension Tensorboard_CppShapeInferenceInputsNeeded: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/debug.pb.swift b/tensorboard/proto-generated/debug.pb.swift index e6b9ea8cbb3..a7f59714f90 100644 --- a/tensorboard/proto-generated/debug.pb.swift +++ b/tensorboard/proto-generated/debug.pb.swift @@ -16,12 +16,12 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// Option for watching a node in TensorFlow Debugger (tfdbg). -struct Tensorboard_DebugTensorWatch { +struct Tensorboard_DebugTensorWatch: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -75,7 +75,7 @@ struct Tensorboard_DebugTensorWatch { } /// Options for initializing DebuggerState in TensorFlow Debugger (tfdbg). -struct Tensorboard_DebugOptions { +struct Tensorboard_DebugOptions: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -99,7 +99,7 @@ struct Tensorboard_DebugOptions { init() {} } -struct Tensorboard_DebuggedSourceFile { +struct Tensorboard_DebuggedSourceFile: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -124,7 +124,7 @@ struct Tensorboard_DebuggedSourceFile { init() {} } -struct Tensorboard_DebuggedSourceFiles { +struct Tensorboard_DebuggedSourceFiles: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -137,13 +137,6 @@ struct Tensorboard_DebuggedSourceFiles { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_DebugTensorWatch: @unchecked Sendable {} -extension Tensorboard_DebugOptions: @unchecked Sendable {} -extension Tensorboard_DebuggedSourceFile: @unchecked Sendable {} -extension Tensorboard_DebuggedSourceFiles: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/event.pb.swift b/tensorboard/proto-generated/event.pb.swift index aa7bf04bf7f..16e125fe450 100644 --- a/tensorboard/proto-generated/event.pb.swift +++ b/tensorboard/proto-generated/event.pb.swift @@ -16,12 +16,12 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// Current health status of a worker. -enum Tensorboard_WorkerHealth: SwiftProtobuf.Enum { +enum Tensorboard_WorkerHealth: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int /// By default a worker is healthy. @@ -58,7 +58,7 @@ enum Tensorboard_WorkerHealth: SwiftProtobuf.Enum { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_WorkerHealth] = [ + static let allCases: [Tensorboard_WorkerHealth] = [ .ok, .receivedShutdownSignal, .internalError, @@ -69,7 +69,7 @@ enum Tensorboard_WorkerHealth: SwiftProtobuf.Enum { /// Indicates the behavior of the worker when an internal error or shutdown /// signal is received. -enum Tensorboard_WorkerShutdownMode: SwiftProtobuf.Enum { +enum Tensorboard_WorkerShutdownMode: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int case `default` // = 0 case notConfigured // = 1 @@ -102,7 +102,7 @@ enum Tensorboard_WorkerShutdownMode: SwiftProtobuf.Enum { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_WorkerShutdownMode] = [ + static let allCases: [Tensorboard_WorkerShutdownMode] = [ .default, .notConfigured, .waitForCoordinator, @@ -113,7 +113,7 @@ enum Tensorboard_WorkerShutdownMode: SwiftProtobuf.Enum { /// Protocol buffer representing an event that happened during /// the execution of a Brain model. -struct Tensorboard_Event { +struct Tensorboard_Event: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -159,6 +159,8 @@ struct Tensorboard_Event { /// The user output a log message. This was theoretically used by the defunct /// tensorboard_logging module, which has since been removed; this field is /// now deprecated and should not be used. + /// + /// NOTE: This field was marked as deprecated in the .proto file. var logMessage: Tensorboard_LogMessage { get { if case .logMessage(let v)? = what {return v} @@ -196,7 +198,7 @@ struct Tensorboard_Event { var unknownFields = SwiftProtobuf.UnknownStorage() - enum OneOf_What: Equatable { + enum OneOf_What: Equatable, @unchecked Sendable { /// An event file was started, with the specified version. /// This is use to identify the contents of the record IO files /// easily. Current version is "brain.Event:2". All versions @@ -209,6 +211,8 @@ struct Tensorboard_Event { /// The user output a log message. This was theoretically used by the defunct /// tensorboard_logging module, which has since been removed; this field is /// now deprecated and should not be used. + /// + /// NOTE: This field was marked as deprecated in the .proto file. case logMessage(Tensorboard_LogMessage) /// The state of the session which can be used for restarting after crashes. case sessionLog(Tensorboard_SessionLog) @@ -226,7 +230,9 @@ struct Tensorboard_Event { /// /// This was theoretically used by the defunct tensorboard_logging module, which /// has been removed; this message is now deprecated and should not be used. -struct Tensorboard_LogMessage { +/// +/// NOTE: This message was marked as deprecated in the .proto file. +struct Tensorboard_LogMessage: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -237,7 +243,8 @@ struct Tensorboard_LogMessage { var unknownFields = SwiftProtobuf.UnknownStorage() - enum Level: SwiftProtobuf.Enum { + /// NOTE: This enum was marked as deprecated in the .proto file. + enum Level: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int case unknown // = 0 @@ -281,7 +288,7 @@ struct Tensorboard_LogMessage { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_LogMessage.Level] = [ + static let allCases: [Tensorboard_LogMessage.Level] = [ .unknown, .debugging, .info, @@ -296,7 +303,7 @@ struct Tensorboard_LogMessage { } /// Protocol buffer used for logging session state. -struct Tensorboard_SessionLog { +struct Tensorboard_SessionLog: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -310,7 +317,7 @@ struct Tensorboard_SessionLog { var unknownFields = SwiftProtobuf.UnknownStorage() - enum SessionStatus: SwiftProtobuf.Enum { + enum SessionStatus: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int case statusUnspecified // = 0 case start // = 1 @@ -343,7 +350,7 @@ struct Tensorboard_SessionLog { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_SessionLog.SessionStatus] = [ + static let allCases: [Tensorboard_SessionLog.SessionStatus] = [ .statusUnspecified, .start, .stop, @@ -356,7 +363,7 @@ struct Tensorboard_SessionLog { } /// For logging the metadata output for a single session.run() call. -struct Tensorboard_TaggedRunMetadata { +struct Tensorboard_TaggedRunMetadata: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -373,7 +380,7 @@ struct Tensorboard_TaggedRunMetadata { init() {} } -struct Tensorboard_WatchdogConfig { +struct Tensorboard_WatchdogConfig: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -385,7 +392,7 @@ struct Tensorboard_WatchdogConfig { init() {} } -struct Tensorboard_RequestedExitCode { +struct Tensorboard_RequestedExitCode: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -397,7 +404,7 @@ struct Tensorboard_RequestedExitCode { init() {} } -struct Tensorboard_WorkerHeartbeatRequest { +struct Tensorboard_WorkerHeartbeatRequest: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -430,7 +437,7 @@ struct Tensorboard_WorkerHeartbeatRequest { fileprivate var _exitCode: Tensorboard_RequestedExitCode? = nil } -struct Tensorboard_WorkerHeartbeatResponse { +struct Tensorboard_WorkerHeartbeatResponse: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -446,18 +453,6 @@ struct Tensorboard_WorkerHeartbeatResponse { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_Event: @unchecked Sendable {} -extension Tensorboard_Event.OneOf_What: @unchecked Sendable {} -extension Tensorboard_LogMessage: @unchecked Sendable {} -extension Tensorboard_SessionLog: @unchecked Sendable {} -extension Tensorboard_TaggedRunMetadata: @unchecked Sendable {} -extension Tensorboard_WatchdogConfig: @unchecked Sendable {} -extension Tensorboard_RequestedExitCode: @unchecked Sendable {} -extension Tensorboard_WorkerHeartbeatRequest: @unchecked Sendable {} -extension Tensorboard_WorkerHeartbeatResponse: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" @@ -588,7 +583,7 @@ extension Tensorboard_Event: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem // allocates stack space for every if/case branch local when no optimizations // are enabled. https://github.com/apple/swift-protobuf/issues/1034 and // https://github.com/apple/swift-protobuf/issues/1182 - if self.wallTime != 0 { + if self.wallTime.bitPattern != 0 { try visitor.visitSingularDoubleField(value: self.wallTime, fieldNumber: 1) } if self.step != 0 { diff --git a/tensorboard/proto-generated/full_type.pb.swift b/tensorboard/proto-generated/full_type.pb.swift index 08b1f23afba..76f834e7073 100644 --- a/tensorboard/proto-generated/full_type.pb.swift +++ b/tensorboard/proto-generated/full_type.pb.swift @@ -16,13 +16,13 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// DISABLED.IfChange /// Experimental. Represents the complete type information of a TensorFlow value. -enum Tensorboard_FullTypeId: SwiftProtobuf.Enum { +enum Tensorboard_FullTypeId: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int /// The default represents an uninitialized values. @@ -331,7 +331,7 @@ enum Tensorboard_FullTypeId: SwiftProtobuf.Enum { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_FullTypeId] = [ + static let allCases: [Tensorboard_FullTypeId] = [ .tftUnset, .tftVar, .tftAny, @@ -371,7 +371,7 @@ enum Tensorboard_FullTypeId: SwiftProtobuf.Enum { /// 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. -struct Tensorboard_FullTypeDef { +struct Tensorboard_FullTypeDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -412,7 +412,7 @@ struct Tensorboard_FullTypeDef { /// For example, a type variable admits a string attribute - its name. /// Shape-related types may admit int attributes - their static shape values. /// Fields for more data types to be added as needed. - enum OneOf_Attr: Equatable { + enum OneOf_Attr: Equatable, Sendable { case s(String) /// TODO(mdan): list/tensor, map? Need to reconcile with TFT_RECORD, etc. case i(Int64) @@ -422,11 +422,6 @@ struct Tensorboard_FullTypeDef { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_FullTypeDef: @unchecked Sendable {} -extension Tensorboard_FullTypeDef.OneOf_Attr: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/function.pb.swift b/tensorboard/proto-generated/function.pb.swift index d9f207a5903..6030b17b40d 100644 --- a/tensorboard/proto-generated/function.pb.swift +++ b/tensorboard/proto-generated/function.pb.swift @@ -16,12 +16,12 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// A library is a set of named functions. -struct Tensorboard_FunctionDefLibrary { +struct Tensorboard_FunctionDefLibrary: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -43,7 +43,7 @@ struct Tensorboard_FunctionDefLibrary { /// /// TODO(zhifengc): /// * device spec, etc. -struct Tensorboard_FunctionDef { +struct Tensorboard_FunctionDef: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -110,7 +110,7 @@ struct Tensorboard_FunctionDef { /// Attributes for function arguments. These attributes are the same set of /// valid attributes as to _Arg nodes. - struct ArgAttrs { + struct ArgAttrs: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -145,7 +145,7 @@ struct Tensorboard_FunctionDef { /// where L is a scalar-value function of (x1, x2, ..., xN) (e.g., the /// loss function). dL/dx_i is the partial derivative of L with respect /// to x_i. -struct Tensorboard_GradientDef { +struct Tensorboard_GradientDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -165,7 +165,7 @@ struct Tensorboard_GradientDef { /// 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. -struct Tensorboard_RegisteredGradient { +struct Tensorboard_RegisteredGradient: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -181,14 +181,6 @@ struct Tensorboard_RegisteredGradient { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_FunctionDefLibrary: @unchecked Sendable {} -extension Tensorboard_FunctionDef: @unchecked Sendable {} -extension Tensorboard_FunctionDef.ArgAttrs: @unchecked Sendable {} -extension Tensorboard_GradientDef: @unchecked Sendable {} -extension Tensorboard_RegisteredGradient: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" @@ -258,7 +250,15 @@ extension Tensorboard_FunctionDef: SwiftProtobuf.Message, SwiftProtobuf._Message var _ret: Dictionary = [:] var _controlRet: Dictionary = [:] - static let defaultInstance = _StorageClass() + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {} diff --git a/tensorboard/proto-generated/graph.pb.swift b/tensorboard/proto-generated/graph.pb.swift index 79a1342d290..536d74a8e1b 100644 --- a/tensorboard/proto-generated/graph.pb.swift +++ b/tensorboard/proto-generated/graph.pb.swift @@ -16,12 +16,12 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// Represents the graph of operations -struct Tensorboard_GraphDef { +struct Tensorboard_GraphDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -43,6 +43,8 @@ struct Tensorboard_GraphDef { /// Deprecated single version field; use versions above instead. Since all /// GraphDef changes before "versions" was introduced were forward /// compatible, this field is entirely ignored. + /// + /// NOTE: This field was marked as deprecated in the .proto file. var version: Int32 = 0 /// "library" provides user-defined functions. @@ -88,10 +90,6 @@ struct Tensorboard_GraphDef { fileprivate var _library: Tensorboard_FunctionDefLibrary? = nil } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_GraphDef: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/meta_graph.pb.swift b/tensorboard/proto-generated/meta_graph.pb.swift index f056c01c6ef..b8568f49a9b 100644 --- a/tensorboard/proto-generated/meta_graph.pb.swift +++ b/tensorboard/proto-generated/meta_graph.pb.swift @@ -16,8 +16,8 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// NOTE: This protocol buffer is evolving, and will go through revisions in the @@ -34,7 +34,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// CollectionDef /// TensorInfo /// SignatureDef -struct Tensorboard_MetaGraphDef { +struct Tensorboard_MetaGraphDef: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -102,7 +102,7 @@ struct Tensorboard_MetaGraphDef { /// Meta information regarding the graph to be exported. To be used by users /// of this protocol buffer to encode information regarding their meta graph. - struct MetaInfoDef { + struct MetaInfoDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -233,7 +233,7 @@ struct Tensorboard_MetaGraphDef { /// proto_type=variable_pb2.VariableDef, /// to_proto=Variable.to_proto, /// from_proto=Variable.from_proto) -struct Tensorboard_CollectionDef { +struct Tensorboard_CollectionDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -282,7 +282,7 @@ struct Tensorboard_CollectionDef { var unknownFields = SwiftProtobuf.UnknownStorage() - enum OneOf_Kind: Equatable { + enum OneOf_Kind: Equatable, Sendable { case nodeList(Tensorboard_CollectionDef.NodeList) case bytesList(Tensorboard_CollectionDef.BytesList) case int64List(Tensorboard_CollectionDef.Int64List) @@ -301,7 +301,7 @@ struct Tensorboard_CollectionDef { /// value: "ImageSummary:0" /// } /// } - struct NodeList { + struct NodeList: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -326,7 +326,7 @@ struct Tensorboard_CollectionDef { /// } /// } /// } - struct BytesList { + struct BytesList: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -339,7 +339,7 @@ struct Tensorboard_CollectionDef { } /// Int64List is used for collecting int, int64 and long values. - struct Int64List { + struct Int64List: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -352,7 +352,7 @@ struct Tensorboard_CollectionDef { } /// FloatList is used for collecting float values. - struct FloatList { + struct FloatList: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -365,7 +365,7 @@ struct Tensorboard_CollectionDef { } /// AnyList is used for collecting Any protos. - struct AnyList { + struct AnyList: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -381,7 +381,7 @@ struct Tensorboard_CollectionDef { } /// Information about a Tensor necessary for feeding or retrieval. -struct Tensorboard_TensorInfo { +struct Tensorboard_TensorInfo: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -434,7 +434,7 @@ struct Tensorboard_TensorInfo { var unknownFields = SwiftProtobuf.UnknownStorage() - enum OneOf_Encoding: Equatable { + enum OneOf_Encoding: Equatable, Sendable { /// For dense `Tensor`s, the name of the tensor in the graph. case name(String) /// There are many possible encodings of sparse matrices @@ -449,7 +449,7 @@ struct Tensorboard_TensorInfo { /// For sparse tensors, The COO encoding stores a triple of values, indices, /// and shape. - struct CooSparse { + struct CooSparse: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -471,7 +471,7 @@ struct Tensorboard_TensorInfo { } /// Generic encoding for composite tensors. - struct CompositeTensor { + struct CompositeTensor: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -558,7 +558,7 @@ struct Tensorboard_TensorInfo { /// } /// ... /// } -struct Tensorboard_SignatureDef { +struct Tensorboard_SignatureDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -586,7 +586,7 @@ struct Tensorboard_SignatureDef { /// An asset file def for a single file or a set of sharded files with the same /// name. -struct Tensorboard_AssetFileDef { +struct Tensorboard_AssetFileDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -613,24 +613,6 @@ struct Tensorboard_AssetFileDef { fileprivate var _tensorInfo: Tensorboard_TensorInfo? = nil } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_MetaGraphDef: @unchecked Sendable {} -extension Tensorboard_MetaGraphDef.MetaInfoDef: @unchecked Sendable {} -extension Tensorboard_CollectionDef: @unchecked Sendable {} -extension Tensorboard_CollectionDef.OneOf_Kind: @unchecked Sendable {} -extension Tensorboard_CollectionDef.NodeList: @unchecked Sendable {} -extension Tensorboard_CollectionDef.BytesList: @unchecked Sendable {} -extension Tensorboard_CollectionDef.Int64List: @unchecked Sendable {} -extension Tensorboard_CollectionDef.FloatList: @unchecked Sendable {} -extension Tensorboard_CollectionDef.AnyList: @unchecked Sendable {} -extension Tensorboard_TensorInfo: @unchecked Sendable {} -extension Tensorboard_TensorInfo.OneOf_Encoding: @unchecked Sendable {} -extension Tensorboard_TensorInfo.CooSparse: @unchecked Sendable {} -extension Tensorboard_TensorInfo.CompositeTensor: @unchecked Sendable {} -extension Tensorboard_SignatureDef: @unchecked Sendable {} -extension Tensorboard_AssetFileDef: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" @@ -656,7 +638,15 @@ extension Tensorboard_MetaGraphDef: SwiftProtobuf.Message, SwiftProtobuf._Messag var _assetFileDef: [Tensorboard_AssetFileDef] = [] var _objectGraphDef: Tensorboard_SavedObjectGraph? = nil - static let defaultInstance = _StorageClass() + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {} diff --git a/tensorboard/proto-generated/node_def.pb.swift b/tensorboard/proto-generated/node_def.pb.swift index 0af6ad3d37d..c4b78f92cd2 100644 --- a/tensorboard/proto-generated/node_def.pb.swift +++ b/tensorboard/proto-generated/node_def.pb.swift @@ -16,11 +16,11 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } -struct Tensorboard_NodeDef { +struct Tensorboard_NodeDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -102,7 +102,7 @@ struct Tensorboard_NodeDef { var unknownFields = SwiftProtobuf.UnknownStorage() - struct ExperimentalDebugInfo { + struct ExperimentalDebugInfo: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -136,11 +136,6 @@ struct Tensorboard_NodeDef { fileprivate var _experimentalType: Tensorboard_FullTypeDef? = nil } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_NodeDef: @unchecked Sendable {} -extension Tensorboard_NodeDef.ExperimentalDebugInfo: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/op_def.pb.swift b/tensorboard/proto-generated/op_def.pb.swift index 754da507bc8..0aec9df8709 100644 --- a/tensorboard/proto-generated/op_def.pb.swift +++ b/tensorboard/proto-generated/op_def.pb.swift @@ -16,14 +16,14 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// Defines an operation. A NodeDef in a GraphDef specifies an Op by /// using the "op" field which should match the name of a OpDef. /// DISABLED.IfChange -struct Tensorboard_OpDef { +struct Tensorboard_OpDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -100,7 +100,7 @@ struct Tensorboard_OpDef { var unknownFields = SwiftProtobuf.UnknownStorage() /// For describing inputs and outputs. - struct ArgDef { + struct ArgDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -169,7 +169,7 @@ struct Tensorboard_OpDef { /// Description of the graph-construction-time configuration of this /// Op. That is to say, this describes the attr fields that will /// be specified in the NodeDef. - struct AttrDef { + struct AttrDef: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -246,7 +246,7 @@ struct Tensorboard_OpDef { } /// Information about version-dependent deprecation of an op -struct Tensorboard_OpDeprecation { +struct Tensorboard_OpDeprecation: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -263,7 +263,7 @@ struct Tensorboard_OpDeprecation { } /// A collection of OpDefs -struct Tensorboard_OpList { +struct Tensorboard_OpList: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -275,14 +275,6 @@ struct Tensorboard_OpList { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_OpDef: @unchecked Sendable {} -extension Tensorboard_OpDef.ArgDef: @unchecked Sendable {} -extension Tensorboard_OpDef.AttrDef: @unchecked Sendable {} -extension Tensorboard_OpDeprecation: @unchecked Sendable {} -extension Tensorboard_OpList: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" @@ -500,7 +492,15 @@ extension Tensorboard_OpDef.AttrDef: SwiftProtobuf.Message, SwiftProtobuf._Messa var _minimum: Int64 = 0 var _allowedValues: Tensorboard_AttrValue? = nil - static let defaultInstance = _StorageClass() + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {} diff --git a/tensorboard/proto-generated/resource_handle.pb.swift b/tensorboard/proto-generated/resource_handle.pb.swift index d5a215a883c..2b2377b53ec 100644 --- a/tensorboard/proto-generated/resource_handle.pb.swift +++ b/tensorboard/proto-generated/resource_handle.pb.swift @@ -16,14 +16,14 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// Protocol buffer representing a handle to a tensorflow resource. Handles are /// not valid across executions, but can be serialized back and forth from within /// a single run. -struct Tensorboard_ResourceHandleProto { +struct Tensorboard_ResourceHandleProto: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -51,7 +51,7 @@ struct Tensorboard_ResourceHandleProto { var unknownFields = SwiftProtobuf.UnknownStorage() /// Protocol buffer representing a pair of (data type, tensor shape). - struct DtypeAndShape { + struct DtypeAndShape: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -77,11 +77,6 @@ struct Tensorboard_ResourceHandleProto { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_ResourceHandleProto: @unchecked Sendable {} -extension Tensorboard_ResourceHandleProto.DtypeAndShape: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/rewriter_config.pb.swift b/tensorboard/proto-generated/rewriter_config.pb.swift index 40086585e3f..7206a7bab11 100644 --- a/tensorboard/proto-generated/rewriter_config.pb.swift +++ b/tensorboard/proto-generated/rewriter_config.pb.swift @@ -16,11 +16,11 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } -struct Tensorboard_AutoParallelOptions { +struct Tensorboard_AutoParallelOptions: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -34,7 +34,7 @@ struct Tensorboard_AutoParallelOptions { init() {} } -struct Tensorboard_ScopedAllocatorOptions { +struct Tensorboard_ScopedAllocatorOptions: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -49,7 +49,7 @@ struct Tensorboard_ScopedAllocatorOptions { /// Graph rewriting is experimental and subject to change, not covered by any /// API stability guarantees. -struct Tensorboard_RewriterConfig { +struct Tensorboard_RewriterConfig: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -330,7 +330,7 @@ struct Tensorboard_RewriterConfig { var unknownFields = SwiftProtobuf.UnknownStorage() - enum Toggle: SwiftProtobuf.Enum { + enum Toggle: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int case `default` // = 0 case on // = 1 @@ -380,7 +380,7 @@ struct Tensorboard_RewriterConfig { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_RewriterConfig.Toggle] = [ + static let allCases: [Tensorboard_RewriterConfig.Toggle] = [ .default, .on, .off, @@ -392,7 +392,7 @@ struct Tensorboard_RewriterConfig { } /// Enum for layout conversion between NCHW and NHWC on CPU. Default is OFF. - enum CpuLayout: SwiftProtobuf.Enum { + enum CpuLayout: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int case noConversionOnCpu // = 0 case nchwToNhwc // = 1 @@ -422,7 +422,7 @@ struct Tensorboard_RewriterConfig { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_RewriterConfig.CpuLayout] = [ + static let allCases: [Tensorboard_RewriterConfig.CpuLayout] = [ .noConversionOnCpu, .nchwToNhwc, .nhwcToNchw, @@ -432,7 +432,7 @@ struct Tensorboard_RewriterConfig { /// Enum controlling the number of times to run optimizers. The default is to /// run them twice. - enum NumIterationsType: SwiftProtobuf.Enum { + enum NumIterationsType: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int case defaultNumIters // = 0 case one // = 1 @@ -462,7 +462,7 @@ struct Tensorboard_RewriterConfig { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_RewriterConfig.NumIterationsType] = [ + static let allCases: [Tensorboard_RewriterConfig.NumIterationsType] = [ .defaultNumIters, .one, .two, @@ -470,7 +470,7 @@ struct Tensorboard_RewriterConfig { } - enum MemOptType: SwiftProtobuf.Enum { + enum MemOptType: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int /// The default setting (SCHEDULING and SWAPPING HEURISTICS only) @@ -529,7 +529,7 @@ struct Tensorboard_RewriterConfig { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_RewriterConfig.MemOptType] = [ + static let allCases: [Tensorboard_RewriterConfig.MemOptType] = [ .defaultMemOpt, .noMemOpt, .manual, @@ -542,7 +542,7 @@ struct Tensorboard_RewriterConfig { } /// Message to describe custom graph optimizer and its parameters - struct CustomGraphOptimizer { + struct CustomGraphOptimizer: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -561,13 +561,6 @@ struct Tensorboard_RewriterConfig { fileprivate var _storage = _StorageClass.defaultInstance } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_AutoParallelOptions: @unchecked Sendable {} -extension Tensorboard_ScopedAllocatorOptions: @unchecked Sendable {} -extension Tensorboard_RewriterConfig: @unchecked Sendable {} -extension Tensorboard_RewriterConfig.CustomGraphOptimizer: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" @@ -717,7 +710,15 @@ extension Tensorboard_RewriterConfig: SwiftProtobuf.Message, SwiftProtobuf._Mess var _interOptimizerVerifierConfig: Tensorboard_VerifierConfig? = nil var _postOptimizationVerifierConfig: Tensorboard_VerifierConfig? = nil - static let defaultInstance = _StorageClass() + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {} diff --git a/tensorboard/proto-generated/saved_object_graph.pb.swift b/tensorboard/proto-generated/saved_object_graph.pb.swift index 345d9cf8bb2..c25e69eb345 100644 --- a/tensorboard/proto-generated/saved_object_graph.pb.swift +++ b/tensorboard/proto-generated/saved_object_graph.pb.swift @@ -16,11 +16,11 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } -struct Tensorboard_SavedObjectGraph { +struct Tensorboard_SavedObjectGraph: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -40,7 +40,7 @@ struct Tensorboard_SavedObjectGraph { init() {} } -struct Tensorboard_SavedObject { +struct Tensorboard_SavedObject: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -158,7 +158,7 @@ struct Tensorboard_SavedObject { var unknownFields = SwiftProtobuf.UnknownStorage() - enum OneOf_Kind: Equatable { + enum OneOf_Kind: Equatable, Sendable { case userObject(Tensorboard_SavedUserObject) case asset(Tensorboard_SavedAsset) case function(Tensorboard_SavedFunction) @@ -181,7 +181,7 @@ struct Tensorboard_SavedObject { /// /// This object cannot be evaluated as a tensor, and therefore cannot be bound /// to an input of a function. -struct Tensorboard_SavedUserObject { +struct Tensorboard_SavedUserObject: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -204,6 +204,8 @@ struct Tensorboard_SavedUserObject { /// 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 a separate file. + /// + /// NOTE: This field was marked as deprecated in the .proto file. var metadata: String = String() var unknownFields = SwiftProtobuf.UnknownStorage() @@ -218,7 +220,7 @@ struct Tensorboard_SavedUserObject { /// When bound to a function this object evaluates to a tensor with the absolute /// filename. Users should not depend on a particular part of the filename to /// remain stable (e.g. basename could be changed). -struct Tensorboard_SavedAsset { +struct Tensorboard_SavedAsset: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -235,7 +237,7 @@ struct Tensorboard_SavedAsset { } /// A function with multiple signatures, possibly with non-Tensor arguments. -struct Tensorboard_SavedFunction { +struct Tensorboard_SavedFunction: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -258,7 +260,7 @@ struct Tensorboard_SavedFunction { fileprivate var _functionSpec: Tensorboard_FunctionSpec? = nil } -struct Tensorboard_CapturedTensor { +struct Tensorboard_CapturedTensor: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -276,7 +278,7 @@ struct Tensorboard_CapturedTensor { /// Stores low-level information about a concrete function. Referenced in either /// a SavedFunction or a SavedBareConcreteFunction. -struct Tensorboard_SavedConcreteFunction { +struct Tensorboard_SavedConcreteFunction: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -314,7 +316,7 @@ struct Tensorboard_SavedConcreteFunction { fileprivate var _outputSignature: Tensorboard_StructuredValue? = nil } -struct Tensorboard_SavedBareConcreteFunction { +struct Tensorboard_SavedBareConcreteFunction: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -350,7 +352,7 @@ struct Tensorboard_SavedBareConcreteFunction { fileprivate var _functionSpec: Tensorboard_FunctionSpec? = nil } -struct Tensorboard_SavedConstant { +struct Tensorboard_SavedConstant: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -365,7 +367,7 @@ struct Tensorboard_SavedConstant { /// Represents a Variable that is initialized by loading the contents from the /// checkpoint. -struct Tensorboard_SavedVariable { +struct Tensorboard_SavedVariable: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -408,7 +410,7 @@ struct Tensorboard_SavedVariable { /// Represents `FunctionSpec` used in `Function`. This represents a /// function that has been wrapped as a TensorFlow `Function`. -struct Tensorboard_FunctionSpec { +struct Tensorboard_FunctionSpec: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -448,7 +450,7 @@ struct Tensorboard_FunctionSpec { /// field, so we instead map to an enum. /// /// See `tf.function` for details. - enum JitCompile: SwiftProtobuf.Enum { + enum JitCompile: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int case `default` // = 0 case on // = 1 @@ -478,7 +480,7 @@ struct Tensorboard_FunctionSpec { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_FunctionSpec.JitCompile] = [ + static let allCases: [Tensorboard_FunctionSpec.JitCompile] = [ .default, .on, .off, @@ -495,7 +497,7 @@ struct Tensorboard_FunctionSpec { /// A SavedResource represents a TF object that holds state during its lifetime. /// An object of this type can have a reference to a: /// create_resource() and an initialize() function. -struct Tensorboard_SavedResource { +struct Tensorboard_SavedResource: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -510,7 +512,7 @@ struct Tensorboard_SavedResource { init() {} } -struct Tensorboard_SaveableObject { +struct Tensorboard_SaveableObject: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -526,23 +528,6 @@ struct Tensorboard_SaveableObject { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_SavedObjectGraph: @unchecked Sendable {} -extension Tensorboard_SavedObject: @unchecked Sendable {} -extension Tensorboard_SavedObject.OneOf_Kind: @unchecked Sendable {} -extension Tensorboard_SavedUserObject: @unchecked Sendable {} -extension Tensorboard_SavedAsset: @unchecked Sendable {} -extension Tensorboard_SavedFunction: @unchecked Sendable {} -extension Tensorboard_CapturedTensor: @unchecked Sendable {} -extension Tensorboard_SavedConcreteFunction: @unchecked Sendable {} -extension Tensorboard_SavedBareConcreteFunction: @unchecked Sendable {} -extension Tensorboard_SavedConstant: @unchecked Sendable {} -extension Tensorboard_SavedVariable: @unchecked Sendable {} -extension Tensorboard_FunctionSpec: @unchecked Sendable {} -extension Tensorboard_SavedResource: @unchecked Sendable {} -extension Tensorboard_SaveableObject: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/saver.pb.swift b/tensorboard/proto-generated/saver.pb.swift index 14116c95be6..5bc91853df6 100644 --- a/tensorboard/proto-generated/saver.pb.swift +++ b/tensorboard/proto-generated/saver.pb.swift @@ -16,12 +16,12 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// Protocol buffer representing the configuration of a Saver. -struct Tensorboard_SaverDef { +struct Tensorboard_SaverDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -56,7 +56,7 @@ struct Tensorboard_SaverDef { /// Usually, each subclass of BaseSaverBuilder works with a particular /// version/format. However, it is possible that the same builder may be /// upgraded to support a newer checkpoint format in the future. - enum CheckpointFormatVersion: SwiftProtobuf.Enum { + enum CheckpointFormatVersion: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int /// Internal legacy format. @@ -92,7 +92,7 @@ struct Tensorboard_SaverDef { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_SaverDef.CheckpointFormatVersion] = [ + static let allCases: [Tensorboard_SaverDef.CheckpointFormatVersion] = [ .legacy, .v1, .v2, @@ -103,10 +103,6 @@ struct Tensorboard_SaverDef { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_SaverDef: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" @@ -157,7 +153,7 @@ extension Tensorboard_SaverDef: SwiftProtobuf.Message, SwiftProtobuf._MessageImp if self.sharded != false { try visitor.visitSingularBoolField(value: self.sharded, fieldNumber: 5) } - if self.keepCheckpointEveryNHours != 0 { + if self.keepCheckpointEveryNHours.bitPattern != 0 { try visitor.visitSingularFloatField(value: self.keepCheckpointEveryNHours, fieldNumber: 6) } if self.version != .legacy { diff --git a/tensorboard/proto-generated/step_stats.pb.swift b/tensorboard/proto-generated/step_stats.pb.swift index 6270dd82e4a..a5a44cc747f 100644 --- a/tensorboard/proto-generated/step_stats.pb.swift +++ b/tensorboard/proto-generated/step_stats.pb.swift @@ -16,12 +16,12 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// An allocation/de-allocation operation performed by the allocator. -struct Tensorboard_AllocationRecord { +struct Tensorboard_AllocationRecord: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -37,7 +37,7 @@ struct Tensorboard_AllocationRecord { init() {} } -struct Tensorboard_AllocatorMemoryUsed { +struct Tensorboard_AllocatorMemoryUsed: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -65,7 +65,7 @@ struct Tensorboard_AllocatorMemoryUsed { } /// Output sizes recorded for a single execution of a graph node. -struct Tensorboard_NodeOutput { +struct Tensorboard_NodeOutput: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -89,7 +89,7 @@ struct Tensorboard_NodeOutput { } /// For memory tracking. -struct Tensorboard_MemoryStats { +struct Tensorboard_MemoryStats: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -100,10 +100,13 @@ struct Tensorboard_MemoryStats { var persistentTensorAllocIds: [Int64] = [] + /// NOTE: This field was marked as deprecated in the .proto file. var deviceTempMemorySize: Int64 = 0 + /// NOTE: This field was marked as deprecated in the .proto file. var devicePersistentMemorySize: Int64 = 0 + /// NOTE: This field was marked as deprecated in the .proto file. var devicePersistentTensorAllocIds: [Int64] = [] var unknownFields = SwiftProtobuf.UnknownStorage() @@ -112,7 +115,7 @@ struct Tensorboard_MemoryStats { } /// Time/size stats recorded for a single execution of a graph node. -struct Tensorboard_NodeExecStats { +struct Tensorboard_NodeExecStats: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -217,7 +220,7 @@ struct Tensorboard_NodeExecStats { fileprivate var _storage = _StorageClass.defaultInstance } -struct Tensorboard_DeviceStepStats { +struct Tensorboard_DeviceStepStats: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -234,7 +237,7 @@ struct Tensorboard_DeviceStepStats { init() {} } -struct Tensorboard_StepStats { +struct Tensorboard_StepStats: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -246,16 +249,6 @@ struct Tensorboard_StepStats { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_AllocationRecord: @unchecked Sendable {} -extension Tensorboard_AllocatorMemoryUsed: @unchecked Sendable {} -extension Tensorboard_NodeOutput: @unchecked Sendable {} -extension Tensorboard_MemoryStats: @unchecked Sendable {} -extension Tensorboard_NodeExecStats: @unchecked Sendable {} -extension Tensorboard_DeviceStepStats: @unchecked Sendable {} -extension Tensorboard_StepStats: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" @@ -505,7 +498,15 @@ extension Tensorboard_NodeExecStats: SwiftProtobuf.Message, SwiftProtobuf._Messa var _allEndRelNanos: Int64 = 0 var _scheduledNanos: Int64 = 0 - static let defaultInstance = _StorageClass() + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {} diff --git a/tensorboard/proto-generated/struct.pb.swift b/tensorboard/proto-generated/struct.pb.swift index 30abee3ce04..5727b8290f9 100644 --- a/tensorboard/proto-generated/struct.pb.swift +++ b/tensorboard/proto-generated/struct.pb.swift @@ -16,8 +16,8 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// `StructuredValue` represents a dynamically typed value representing various @@ -44,7 +44,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// This is an ergonomic aid for working with loaded SavedModels, not a promise /// to serialize all possible function signatures. For example we do not expect /// to pickle generic Python objects, and ideally we'd stay language-agnostic. -struct Tensorboard_StructuredValue { +struct Tensorboard_StructuredValue: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -190,7 +190,7 @@ struct Tensorboard_StructuredValue { var unknownFields = SwiftProtobuf.UnknownStorage() /// The kind of value. - enum OneOf_Kind: Equatable { + enum OneOf_Kind: Equatable, Sendable { /// Represents None. case noneValue(Tensorboard_NoneValue) /// Represents a double-precision floating-point value (a Python `float`). @@ -234,7 +234,7 @@ struct Tensorboard_StructuredValue { } /// Represents None. -struct Tensorboard_NoneValue { +struct Tensorboard_NoneValue: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -245,7 +245,7 @@ struct Tensorboard_NoneValue { } /// Represents a Python list. -struct Tensorboard_ListValue { +struct Tensorboard_ListValue: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -258,7 +258,7 @@ struct Tensorboard_ListValue { } /// Represents a Python tuple. -struct Tensorboard_TupleValue { +struct Tensorboard_TupleValue: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -272,7 +272,7 @@ struct Tensorboard_TupleValue { /// Represents a Python dict keyed by `str`. /// The comment on Unicode from Value.string_value applies analogously. -struct Tensorboard_DictValue { +struct Tensorboard_DictValue: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -285,7 +285,7 @@ struct Tensorboard_DictValue { } /// Represents a (key, value) pair. -struct Tensorboard_PairValue { +struct Tensorboard_PairValue: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -309,7 +309,7 @@ struct Tensorboard_PairValue { } /// Represents Python's namedtuple. -struct Tensorboard_NamedTupleValue { +struct Tensorboard_NamedTupleValue: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -324,7 +324,7 @@ struct Tensorboard_NamedTupleValue { } /// A protobuf to represent tf.TensorSpec. -struct Tensorboard_TensorSpecProto { +struct Tensorboard_TensorSpecProto: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -350,7 +350,7 @@ struct Tensorboard_TensorSpecProto { } /// A protobuf to represent tf.BoundedTensorSpec. -struct Tensorboard_BoundedTensorSpecProto { +struct Tensorboard_BoundedTensorSpecProto: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -396,7 +396,7 @@ struct Tensorboard_BoundedTensorSpecProto { } /// Represents a tf.TypeSpec -struct Tensorboard_TypeSpecProto { +struct Tensorboard_TypeSpecProto: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -437,7 +437,7 @@ struct Tensorboard_TypeSpecProto { var unknownFields = SwiftProtobuf.UnknownStorage() - enum TypeSpecClass: SwiftProtobuf.Enum { + enum TypeSpecClass: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int case unknown // = 0 @@ -521,7 +521,7 @@ struct Tensorboard_TypeSpecProto { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_TypeSpecProto.TypeSpecClass] = [ + static let allCases: [Tensorboard_TypeSpecProto.TypeSpecClass] = [ .unknown, .sparseTensorSpec, .indexedSlicesSpec, @@ -544,20 +544,6 @@ struct Tensorboard_TypeSpecProto { fileprivate var _storage = _StorageClass.defaultInstance } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_StructuredValue: @unchecked Sendable {} -extension Tensorboard_StructuredValue.OneOf_Kind: @unchecked Sendable {} -extension Tensorboard_NoneValue: @unchecked Sendable {} -extension Tensorboard_ListValue: @unchecked Sendable {} -extension Tensorboard_TupleValue: @unchecked Sendable {} -extension Tensorboard_DictValue: @unchecked Sendable {} -extension Tensorboard_PairValue: @unchecked Sendable {} -extension Tensorboard_NamedTupleValue: @unchecked Sendable {} -extension Tensorboard_TensorSpecProto: @unchecked Sendable {} -extension Tensorboard_BoundedTensorSpecProto: @unchecked Sendable {} -extension Tensorboard_TypeSpecProto: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" @@ -584,7 +570,15 @@ extension Tensorboard_StructuredValue: SwiftProtobuf.Message, SwiftProtobuf._Mes fileprivate class _StorageClass { var _kind: Tensorboard_StructuredValue.OneOf_Kind? - static let defaultInstance = _StorageClass() + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {} @@ -860,8 +854,8 @@ extension Tensorboard_NoneValue: SwiftProtobuf.Message, SwiftProtobuf._MessageIm static let _protobuf_nameMap = SwiftProtobuf._NameMap() mutating func decodeMessage(decoder: inout D) throws { - while let _ = try decoder.nextFieldNumber() { - } + // Load everything into unknown fields + while try decoder.nextFieldNumber() != nil {} } func traverse(visitor: inout V) throws { @@ -1173,7 +1167,15 @@ extension Tensorboard_TypeSpecProto: SwiftProtobuf.Message, SwiftProtobuf._Messa var _typeSpecClassName: String = String() var _numFlatComponents: Int32 = 0 - static let defaultInstance = _StorageClass() + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {} diff --git a/tensorboard/proto-generated/summary.pb.swift b/tensorboard/proto-generated/summary.pb.swift index 919bd7ced88..2b4ca2de1e0 100644 --- a/tensorboard/proto-generated/summary.pb.swift +++ b/tensorboard/proto-generated/summary.pb.swift @@ -16,11 +16,11 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } -enum Tensorboard_DataClass: SwiftProtobuf.Enum { +enum Tensorboard_DataClass: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int /// Unknown data class, used (implicitly) for legacy data. Will not be @@ -67,7 +67,7 @@ enum Tensorboard_DataClass: SwiftProtobuf.Enum { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_DataClass] = [ + static let allCases: [Tensorboard_DataClass] = [ .unknown, .scalar, .tensor, @@ -77,7 +77,7 @@ enum Tensorboard_DataClass: SwiftProtobuf.Enum { } /// Metadata associated with a series of Summary data -struct Tensorboard_SummaryDescription { +struct Tensorboard_SummaryDescription: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -93,7 +93,7 @@ struct Tensorboard_SummaryDescription { /// Serialization format for histogram module in /// core/lib/histogram/histogram.h -struct Tensorboard_HistogramProto { +struct Tensorboard_HistogramProto: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -124,7 +124,7 @@ struct Tensorboard_HistogramProto { /// A SummaryMetadata encapsulates information on which plugins are able to make /// use of a certain summary value. -struct Tensorboard_SummaryMetadata { +struct Tensorboard_SummaryMetadata: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -153,7 +153,7 @@ struct Tensorboard_SummaryMetadata { var unknownFields = SwiftProtobuf.UnknownStorage() - struct PluginData { + struct PluginData: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -181,7 +181,7 @@ struct Tensorboard_SummaryMetadata { /// Summaries are produced regularly during training, as controlled by /// the "summary_interval_secs" attribute of the training operation. /// Summaries are also produced at the end of an evaluation. -struct Tensorboard_Summary { +struct Tensorboard_Summary: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -191,7 +191,7 @@ struct Tensorboard_Summary { var unknownFields = SwiftProtobuf.UnknownStorage() - struct Image { + struct Image: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -219,7 +219,7 @@ struct Tensorboard_Summary { init() {} } - struct Audio { + struct Audio: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -244,7 +244,7 @@ struct Tensorboard_Summary { init() {} } - struct Value { + struct Value: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -325,7 +325,7 @@ struct Tensorboard_Summary { var unknownFields = SwiftProtobuf.UnknownStorage() /// Value associated with the tag. - enum OneOf_Value: Equatable { + enum OneOf_Value: Equatable, @unchecked Sendable { case simpleValue(Float) case obsoleteOldStyleHistogram(Data) case image(Tensorboard_Summary.Image) @@ -343,18 +343,6 @@ struct Tensorboard_Summary { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_SummaryDescription: @unchecked Sendable {} -extension Tensorboard_HistogramProto: @unchecked Sendable {} -extension Tensorboard_SummaryMetadata: @unchecked Sendable {} -extension Tensorboard_SummaryMetadata.PluginData: @unchecked Sendable {} -extension Tensorboard_Summary: @unchecked Sendable {} -extension Tensorboard_Summary.Image: @unchecked Sendable {} -extension Tensorboard_Summary.Audio: @unchecked Sendable {} -extension Tensorboard_Summary.Value: @unchecked Sendable {} -extension Tensorboard_Summary.Value.OneOf_Value: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" @@ -431,19 +419,19 @@ extension Tensorboard_HistogramProto: SwiftProtobuf.Message, SwiftProtobuf._Mess } func traverse(visitor: inout V) throws { - if self.min != 0 { + if self.min.bitPattern != 0 { try visitor.visitSingularDoubleField(value: self.min, fieldNumber: 1) } - if self.max != 0 { + if self.max.bitPattern != 0 { try visitor.visitSingularDoubleField(value: self.max, fieldNumber: 2) } - if self.num != 0 { + if self.num.bitPattern != 0 { try visitor.visitSingularDoubleField(value: self.num, fieldNumber: 3) } - if self.sum != 0 { + if self.sum.bitPattern != 0 { try visitor.visitSingularDoubleField(value: self.sum, fieldNumber: 4) } - if self.sumSquares != 0 { + if self.sumSquares.bitPattern != 0 { try visitor.visitSingularDoubleField(value: self.sumSquares, fieldNumber: 5) } if !self.bucketLimit.isEmpty { @@ -669,7 +657,7 @@ extension Tensorboard_Summary.Audio: SwiftProtobuf.Message, SwiftProtobuf._Messa } func traverse(visitor: inout V) throws { - if self.sampleRate != 0 { + if self.sampleRate.bitPattern != 0 { try visitor.visitSingularFloatField(value: self.sampleRate, fieldNumber: 1) } if self.numChannels != 0 { diff --git a/tensorboard/proto-generated/tensor.pb.swift b/tensorboard/proto-generated/tensor.pb.swift index a068d250daf..6028f849eec 100644 --- a/tensorboard/proto-generated/tensor.pb.swift +++ b/tensorboard/proto-generated/tensor.pb.swift @@ -16,12 +16,12 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// Protocol buffer representing a tensor. -struct Tensorboard_TensorProto { +struct Tensorboard_TensorProto: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -150,7 +150,7 @@ struct Tensorboard_TensorProto { } /// Protocol buffer representing the serialization format of DT_VARIANT tensors. -struct Tensorboard_VariantTensorDataProto { +struct Tensorboard_VariantTensorDataProto: @unchecked Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -169,11 +169,6 @@ struct Tensorboard_VariantTensorDataProto { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_TensorProto: @unchecked Sendable {} -extension Tensorboard_VariantTensorDataProto: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" @@ -219,7 +214,15 @@ extension Tensorboard_TensorProto: SwiftProtobuf.Message, SwiftProtobuf._Message var _uint32Val: [UInt32] = [] var _uint64Val: [UInt64] = [] - static let defaultInstance = _StorageClass() + #if swift(>=5.10) + // This property is used as the initial default value for new instances of the type. + // The type itself is protecting the reference to its storage via CoW semantics. + // This will force a copy to be made of this reference when the first mutation occurs; + // hence, it is safe to mark this as `nonisolated(unsafe)`. + static nonisolated(unsafe) let defaultInstance = _StorageClass() + #else + static let defaultInstance = _StorageClass() + #endif private init() {} diff --git a/tensorboard/proto-generated/tensor_description.pb.swift b/tensorboard/proto-generated/tensor_description.pb.swift index a2c3da5cbed..813e7e80ec2 100644 --- a/tensorboard/proto-generated/tensor_description.pb.swift +++ b/tensorboard/proto-generated/tensor_description.pb.swift @@ -16,11 +16,11 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } -struct Tensorboard_TensorDescription { +struct Tensorboard_TensorDescription: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -56,10 +56,6 @@ struct Tensorboard_TensorDescription { fileprivate var _allocationDescription: Tensorboard_AllocationDescription? = nil } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_TensorDescription: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/tensor_shape.pb.swift b/tensorboard/proto-generated/tensor_shape.pb.swift index ea7560cd802..43df9b12e14 100644 --- a/tensorboard/proto-generated/tensor_shape.pb.swift +++ b/tensorboard/proto-generated/tensor_shape.pb.swift @@ -18,12 +18,12 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// Dimensions of a tensor. -struct Tensorboard_TensorShapeProto { +struct Tensorboard_TensorShapeProto: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -51,7 +51,7 @@ struct Tensorboard_TensorShapeProto { var unknownFields = SwiftProtobuf.UnknownStorage() /// One dimension of the tensor. - struct Dim { + struct Dim: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -74,11 +74,6 @@ struct Tensorboard_TensorShapeProto { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_TensorShapeProto: @unchecked Sendable {} -extension Tensorboard_TensorShapeProto.Dim: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/tfprof_log.pb.swift b/tensorboard/proto-generated/tfprof_log.pb.swift index 44307e59991..edbd00cfcf2 100644 --- a/tensorboard/proto-generated/tfprof_log.pb.swift +++ b/tensorboard/proto-generated/tfprof_log.pb.swift @@ -16,12 +16,12 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// It specifies the Python callstack that creates an op. -struct Tensorboard_CodeDef { +struct Tensorboard_CodeDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -30,12 +30,14 @@ struct Tensorboard_CodeDef { var unknownFields = SwiftProtobuf.UnknownStorage() - struct Trace { + struct Trace: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. /// deprecated by file_id. + /// + /// NOTE: This field was marked as deprecated in the .proto file. var file: String = String() var fileID: Int64 = 0 @@ -43,11 +45,15 @@ struct Tensorboard_CodeDef { var lineno: Int32 = 0 /// deprecated by function_id. + /// + /// NOTE: This field was marked as deprecated in the .proto file. var function: String = String() var functionID: Int64 = 0 /// deprecated line_id. + /// + /// NOTE: This field was marked as deprecated in the .proto file. var line: String = String() var lineID: Int64 = 0 @@ -62,7 +68,7 @@ struct Tensorboard_CodeDef { init() {} } -struct Tensorboard_OpLogEntry { +struct Tensorboard_OpLogEntry: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -96,7 +102,7 @@ struct Tensorboard_OpLogEntry { fileprivate var _codeDef: Tensorboard_CodeDef? = nil } -struct Tensorboard_OpLogProto { +struct Tensorboard_OpLogProto: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -116,7 +122,7 @@ struct Tensorboard_OpLogProto { /// It allows serialization, shipping around and deserialization of the profiles. /// /// Please don't depend on the internals of the profile proto. -struct Tensorboard_ProfileProto { +struct Tensorboard_ProfileProto: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -142,7 +148,7 @@ struct Tensorboard_ProfileProto { init() {} } -struct Tensorboard_ProfileNode { +struct Tensorboard_ProfileNode: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -197,7 +203,7 @@ struct Tensorboard_ProfileNode { fileprivate var _trace: Tensorboard_CodeDef? = nil } -struct Tensorboard_ExecProfile { +struct Tensorboard_ExecProfile: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -235,7 +241,7 @@ struct Tensorboard_ExecProfile { init() {} } -struct Tensorboard_ExecTime { +struct Tensorboard_ExecTime: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -247,7 +253,7 @@ struct Tensorboard_ExecTime { init() {} } -struct Tensorboard_ExecMemory { +struct Tensorboard_ExecMemory: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -289,7 +295,7 @@ struct Tensorboard_ExecMemory { init() {} } -struct Tensorboard_Tuple { +struct Tensorboard_Tuple: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -301,7 +307,7 @@ struct Tensorboard_Tuple { init() {} } -struct Tensorboard_Memory { +struct Tensorboard_Memory: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -315,20 +321,6 @@ struct Tensorboard_Memory { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_CodeDef: @unchecked Sendable {} -extension Tensorboard_CodeDef.Trace: @unchecked Sendable {} -extension Tensorboard_OpLogEntry: @unchecked Sendable {} -extension Tensorboard_OpLogProto: @unchecked Sendable {} -extension Tensorboard_ProfileProto: @unchecked Sendable {} -extension Tensorboard_ProfileNode: @unchecked Sendable {} -extension Tensorboard_ExecProfile: @unchecked Sendable {} -extension Tensorboard_ExecTime: @unchecked Sendable {} -extension Tensorboard_ExecMemory: @unchecked Sendable {} -extension Tensorboard_Tuple: @unchecked Sendable {} -extension Tensorboard_Memory: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/trackable_object_graph.pb.swift b/tensorboard/proto-generated/trackable_object_graph.pb.swift index 340bdaa81af..7ea18dd6cb3 100644 --- a/tensorboard/proto-generated/trackable_object_graph.pb.swift +++ b/tensorboard/proto-generated/trackable_object_graph.pb.swift @@ -16,11 +16,11 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } -struct Tensorboard_TrackableObjectGraph { +struct Tensorboard_TrackableObjectGraph: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -29,7 +29,7 @@ struct Tensorboard_TrackableObjectGraph { var unknownFields = SwiftProtobuf.UnknownStorage() - struct TrackableObject { + struct TrackableObject: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -69,7 +69,7 @@ struct Tensorboard_TrackableObjectGraph { var unknownFields = SwiftProtobuf.UnknownStorage() - struct ObjectReference { + struct ObjectReference: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -86,7 +86,7 @@ struct Tensorboard_TrackableObjectGraph { init() {} } - struct SerializedTensor { + struct SerializedTensor: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -110,7 +110,7 @@ struct Tensorboard_TrackableObjectGraph { init() {} } - struct SlotVariableReference { + struct SlotVariableReference: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -140,7 +140,7 @@ struct Tensorboard_TrackableObjectGraph { init() {} } -struct Tensorboard_RegisteredSaver { +struct Tensorboard_RegisteredSaver: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -156,15 +156,6 @@ struct Tensorboard_RegisteredSaver { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_TrackableObjectGraph: @unchecked Sendable {} -extension Tensorboard_TrackableObjectGraph.TrackableObject: @unchecked Sendable {} -extension Tensorboard_TrackableObjectGraph.TrackableObject.ObjectReference: @unchecked Sendable {} -extension Tensorboard_TrackableObjectGraph.TrackableObject.SerializedTensor: @unchecked Sendable {} -extension Tensorboard_TrackableObjectGraph.TrackableObject.SlotVariableReference: @unchecked Sendable {} -extension Tensorboard_RegisteredSaver: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/types.pb.swift b/tensorboard/proto-generated/types.pb.swift index 68c4d069362..c016359fc05 100644 --- a/tensorboard/proto-generated/types.pb.swift +++ b/tensorboard/proto-generated/types.pb.swift @@ -16,13 +16,13 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// (== suppress_warning documentation-presence ==) /// DISABLED.IfChange -enum Tensorboard_DataType: SwiftProtobuf.Enum { +enum Tensorboard_DataType: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int /// Not a legal value for DataType. Used to indicate a DataType field @@ -211,7 +211,7 @@ enum Tensorboard_DataType: SwiftProtobuf.Enum { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_DataType] = [ + static let allCases: [Tensorboard_DataType] = [ .dtInvalid, .dtFloat, .dtDouble, diff --git a/tensorboard/proto-generated/variable.pb.swift b/tensorboard/proto-generated/variable.pb.swift index 6f3c63842e5..e7b454fac23 100644 --- a/tensorboard/proto-generated/variable.pb.swift +++ b/tensorboard/proto-generated/variable.pb.swift @@ -16,12 +16,12 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// Indicates when a distributed variable will be synced. -enum Tensorboard_VariableSynchronization: SwiftProtobuf.Enum { +enum Tensorboard_VariableSynchronization: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int /// `AUTO`: Indicates that the synchronization will be determined by the @@ -68,7 +68,7 @@ enum Tensorboard_VariableSynchronization: SwiftProtobuf.Enum { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_VariableSynchronization] = [ + static let allCases: [Tensorboard_VariableSynchronization] = [ .auto, .none, .onWrite, @@ -78,7 +78,7 @@ enum Tensorboard_VariableSynchronization: SwiftProtobuf.Enum { } /// Indicates how a distributed variable will be aggregated. -enum Tensorboard_VariableAggregation: SwiftProtobuf.Enum { +enum Tensorboard_VariableAggregation: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int /// `NONE`: This is the default, giving an error if you use a @@ -123,7 +123,7 @@ enum Tensorboard_VariableAggregation: SwiftProtobuf.Enum { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_VariableAggregation] = [ + static let allCases: [Tensorboard_VariableAggregation] = [ .none, .sum, .mean, @@ -133,7 +133,7 @@ enum Tensorboard_VariableAggregation: SwiftProtobuf.Enum { } /// Protocol buffer representing a Variable. -struct Tensorboard_VariableDef { +struct Tensorboard_VariableDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -179,7 +179,7 @@ struct Tensorboard_VariableDef { fileprivate var _saveSliceInfoDef: Tensorboard_SaveSliceInfoDef? = nil } -struct Tensorboard_SaveSliceInfoDef { +struct Tensorboard_SaveSliceInfoDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -201,11 +201,6 @@ struct Tensorboard_SaveSliceInfoDef { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_VariableDef: @unchecked Sendable {} -extension Tensorboard_SaveSliceInfoDef: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/verifier_config.pb.swift b/tensorboard/proto-generated/verifier_config.pb.swift index 2b50f7ed59e..0c8a4a18f51 100644 --- a/tensorboard/proto-generated/verifier_config.pb.swift +++ b/tensorboard/proto-generated/verifier_config.pb.swift @@ -16,12 +16,12 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// The config for graph verifiers. -struct Tensorboard_VerifierConfig { +struct Tensorboard_VerifierConfig: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -35,7 +35,7 @@ struct Tensorboard_VerifierConfig { var unknownFields = SwiftProtobuf.UnknownStorage() - enum Toggle: SwiftProtobuf.Enum { + enum Toggle: SwiftProtobuf.Enum, Swift.CaseIterable { typealias RawValue = Int case `default` // = 0 case on // = 1 @@ -65,7 +65,7 @@ struct Tensorboard_VerifierConfig { } // The compiler won't synthesize support with the UNRECOGNIZED case. - static var allCases: [Tensorboard_VerifierConfig.Toggle] = [ + static let allCases: [Tensorboard_VerifierConfig.Toggle] = [ .default, .on, .off, @@ -76,10 +76,6 @@ struct Tensorboard_VerifierConfig { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_VerifierConfig: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard" diff --git a/tensorboard/proto-generated/versions.pb.swift b/tensorboard/proto-generated/versions.pb.swift index f2e3a35531f..a6bb263b707 100644 --- a/tensorboard/proto-generated/versions.pb.swift +++ b/tensorboard/proto-generated/versions.pb.swift @@ -16,8 +16,8 @@ import SwiftProtobuf // Please ensure that you are building against the same version of the API // that was used to generate this file. fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { - struct _3: SwiftProtobuf.ProtobufAPIVersion_3 {} - typealias Version = _3 + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 } /// Version information for a piece of serialized data @@ -32,7 +32,7 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP /// producer >= min_producer /// consumer >= min_consumer /// consumer not in bad_consumers -struct Tensorboard_VersionDef { +struct Tensorboard_VersionDef: Sendable { // SwiftProtobuf.Message conformance is added in an extension below. See the // `Message` and `Message+*Additions` files in the SwiftProtobuf library for // methods supported on all messages. @@ -51,10 +51,6 @@ struct Tensorboard_VersionDef { init() {} } -#if swift(>=5.5) && canImport(_Concurrency) -extension Tensorboard_VersionDef: @unchecked Sendable {} -#endif // swift(>=5.5) && canImport(_Concurrency) - // MARK: - Code below here is support for the SwiftProtobuf runtime. fileprivate let _protobuf_package = "tensorboard"