// DO NOT EDIT.
//
// Generated by the Swift generator plugin for the protocol buffer compiler.
// Source: framework.proto
//
// For information on using the generated types, please see the documenation:
//   https://github.com/apple/swift-protobuf/

// Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.
//
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License. 

import Foundation

// If the compiler emits an error on this type, it is because this file
// was generated by a version of the `protoc` Swift plug-in that is
// incompatible with the version of SwiftProtobuf to which you are linking.
// Please ensure that your are building against the same version of the API
// that was used to generate this file.
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
  struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
  typealias Version = _2
}

enum PaddleMobile_Framework_Proto_AttrType: SwiftProtobuf.Enum {
  typealias RawValue = Int
  case int // = 0
  case float // = 1
  case string // = 2
  case ints // = 3
  case floats // = 4
  case strings // = 5
  case boolean // = 6
  case booleans // = 7
  case block // = 8
  case long // = 9

  init() {
    self = .int
  }

  init?(rawValue: Int) {
    switch rawValue {
    case 0: self = .int
    case 1: self = .float
    case 2: self = .string
    case 3: self = .ints
    case 4: self = .floats
    case 5: self = .strings
    case 6: self = .boolean
    case 7: self = .booleans
    case 8: self = .block
    case 9: self = .long
    default: return nil
    }
  }

  var rawValue: Int {
    switch self {
    case .int: return 0
    case .float: return 1
    case .string: return 2
    case .ints: return 3
    case .floats: return 4
    case .strings: return 5
    case .boolean: return 6
    case .booleans: return 7
    case .block: return 8
    case .long: return 9
    }
  }

}

/// OpDesc describes an instance of a C++ framework::OperatorBase
/// derived class type.
struct PaddleMobile_Framework_Proto_OpDesc {
  // 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.

  var type: String {
    get {return _type ?? String()}
    set {_type = newValue}
  }
  /// Returns true if `type` has been explicitly set.
  var hasType: Bool {return self._type != nil}
  /// Clears the value of `type`. Subsequent reads from it will return its default value.
  mutating func clearType() {self._type = nil}

  var inputs: [PaddleMobile_Framework_Proto_OpDesc.Var] = []

  var outputs: [PaddleMobile_Framework_Proto_OpDesc.Var] = []

  var attrs: [PaddleMobile_Framework_Proto_OpDesc.Attr] = []

  var isTarget: Bool {
    get {return _isTarget ?? false}
    set {_isTarget = newValue}
  }
  /// Returns true if `isTarget` has been explicitly set.
  var hasIsTarget: Bool {return self._isTarget != nil}
  /// Clears the value of `isTarget`. Subsequent reads from it will return its default value.
  mutating func clearIsTarget() {self._isTarget = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  struct Attr {
    // 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.

    var name: String {
      get {return _name ?? String()}
      set {_name = newValue}
    }
    /// Returns true if `name` has been explicitly set.
    var hasName: Bool {return self._name != nil}
    /// Clears the value of `name`. Subsequent reads from it will return its default value.
    mutating func clearName() {self._name = nil}

    var type: PaddleMobile_Framework_Proto_AttrType {
      get {return _type ?? .int}
      set {_type = newValue}
    }
    /// Returns true if `type` has been explicitly set.
    var hasType: Bool {return self._type != nil}
    /// Clears the value of `type`. Subsequent reads from it will return its default value.
    mutating func clearType() {self._type = nil}

    var i: Int32 {
      get {return _i ?? 0}
      set {_i = newValue}
    }
    /// Returns true if `i` has been explicitly set.
    var hasI: Bool {return self._i != nil}
    /// Clears the value of `i`. Subsequent reads from it will return its default value.
    mutating func clearI() {self._i = nil}

    var f: Float {
      get {return _f ?? 0}
      set {_f = newValue}
    }
    /// Returns true if `f` has been explicitly set.
    var hasF: Bool {return self._f != nil}
    /// Clears the value of `f`. Subsequent reads from it will return its default value.
    mutating func clearF() {self._f = nil}

    var s: String {
      get {return _s ?? String()}
      set {_s = newValue}
    }
    /// Returns true if `s` has been explicitly set.
    var hasS: Bool {return self._s != nil}
    /// Clears the value of `s`. Subsequent reads from it will return its default value.
    mutating func clearS() {self._s = nil}

    var ints: [Int32] = []

    var floats: [Float] = []

    var strings: [String] = []

    var b: Bool {
      get {return _b ?? false}
      set {_b = newValue}
    }
    /// Returns true if `b` has been explicitly set.
    var hasB: Bool {return self._b != nil}
    /// Clears the value of `b`. Subsequent reads from it will return its default value.
    mutating func clearB() {self._b = nil}

    var bools: [Bool] = []

    var blockIdx: Int32 {
      get {return _blockIdx ?? 0}
      set {_blockIdx = newValue}
    }
    /// Returns true if `blockIdx` has been explicitly set.
    var hasBlockIdx: Bool {return self._blockIdx != nil}
    /// Clears the value of `blockIdx`. Subsequent reads from it will return its default value.
    mutating func clearBlockIdx() {self._blockIdx = nil}

    var l: Int64 {
      get {return _l ?? 0}
      set {_l = newValue}
    }
    /// Returns true if `l` has been explicitly set.
    var hasL: Bool {return self._l != nil}
    /// Clears the value of `l`. Subsequent reads from it will return its default value.
    mutating func clearL() {self._l = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _name: String? = nil
    fileprivate var _type: PaddleMobile_Framework_Proto_AttrType? = nil
    fileprivate var _i: Int32? = nil
    fileprivate var _f: Float? = nil
    fileprivate var _s: String? = nil
    fileprivate var _b: Bool? = nil
    fileprivate var _blockIdx: Int32? = nil
    fileprivate var _l: Int64? = nil
  }

  struct Var {
    // 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.

    var parameter: String {
      get {return _parameter ?? String()}
      set {_parameter = newValue}
    }
    /// Returns true if `parameter` has been explicitly set.
    var hasParameter: Bool {return self._parameter != nil}
    /// Clears the value of `parameter`. Subsequent reads from it will return its default value.
    mutating func clearParameter() {self._parameter = nil}

    var arguments: [String] = []

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _parameter: String? = nil
  }

  init() {}

  fileprivate var _type: String? = nil
  fileprivate var _isTarget: Bool? = nil
}

/// OpProto describes a C++ framework::OperatorBase derived class.
struct PaddleMobile_Framework_Proto_OpProto {
  // 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.

  var type: String {
    get {return _type ?? String()}
    set {_type = newValue}
  }
  /// Returns true if `type` has been explicitly set.
  var hasType: Bool {return self._type != nil}
  /// Clears the value of `type`. Subsequent reads from it will return its default value.
  mutating func clearType() {self._type = nil}

  var inputs: [PaddleMobile_Framework_Proto_OpProto.Var] = []

  var outputs: [PaddleMobile_Framework_Proto_OpProto.Var] = []

  var attrs: [PaddleMobile_Framework_Proto_OpProto.Attr] = []

  var comment: String {
    get {return _comment ?? String()}
    set {_comment = newValue}
  }
  /// Returns true if `comment` has been explicitly set.
  var hasComment: Bool {return self._comment != nil}
  /// Clears the value of `comment`. Subsequent reads from it will return its default value.
  mutating func clearComment() {self._comment = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  /// VarProto describes the C++ type framework::Variable.
  struct Var {
    // 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.

    var name: String {
      get {return _name ?? String()}
      set {_name = newValue}
    }
    /// Returns true if `name` has been explicitly set.
    var hasName: Bool {return self._name != nil}
    /// Clears the value of `name`. Subsequent reads from it will return its default value.
    mutating func clearName() {self._name = nil}

    var comment: String {
      get {return _comment ?? String()}
      set {_comment = newValue}
    }
    /// Returns true if `comment` has been explicitly set.
    var hasComment: Bool {return self._comment != nil}
    /// Clears the value of `comment`. Subsequent reads from it will return its default value.
    mutating func clearComment() {self._comment = nil}

    var duplicable: Bool {
      get {return _duplicable ?? false}
      set {_duplicable = newValue}
    }
    /// Returns true if `duplicable` has been explicitly set.
    var hasDuplicable: Bool {return self._duplicable != nil}
    /// Clears the value of `duplicable`. Subsequent reads from it will return its default value.
    mutating func clearDuplicable() {self._duplicable = nil}

    var intermediate: Bool {
      get {return _intermediate ?? false}
      set {_intermediate = newValue}
    }
    /// Returns true if `intermediate` has been explicitly set.
    var hasIntermediate: Bool {return self._intermediate != nil}
    /// Clears the value of `intermediate`. Subsequent reads from it will return its default value.
    mutating func clearIntermediate() {self._intermediate = nil}

    var dispensable: Bool {
      get {return _dispensable ?? false}
      set {_dispensable = newValue}
    }
    /// Returns true if `dispensable` has been explicitly set.
    var hasDispensable: Bool {return self._dispensable != nil}
    /// Clears the value of `dispensable`. Subsequent reads from it will return its default value.
    mutating func clearDispensable() {self._dispensable = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _name: String? = nil
    fileprivate var _comment: String? = nil
    fileprivate var _duplicable: Bool? = nil
    fileprivate var _intermediate: Bool? = nil
    fileprivate var _dispensable: Bool? = nil
  }

  /// AttrProto describes the C++ type Attribute.
  struct Attr {
    // 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.

    var name: String {
      get {return _name ?? String()}
      set {_name = newValue}
    }
    /// Returns true if `name` has been explicitly set.
    var hasName: Bool {return self._name != nil}
    /// Clears the value of `name`. Subsequent reads from it will return its default value.
    mutating func clearName() {self._name = nil}

    var type: PaddleMobile_Framework_Proto_AttrType {
      get {return _type ?? .int}
      set {_type = newValue}
    }
    /// Returns true if `type` has been explicitly set.
    var hasType: Bool {return self._type != nil}
    /// Clears the value of `type`. Subsequent reads from it will return its default value.
    mutating func clearType() {self._type = nil}

    var comment: String {
      get {return _comment ?? String()}
      set {_comment = newValue}
    }
    /// Returns true if `comment` has been explicitly set.
    var hasComment: Bool {return self._comment != nil}
    /// Clears the value of `comment`. Subsequent reads from it will return its default value.
    mutating func clearComment() {self._comment = nil}

    /// If that attribute is generated, it means the Paddle third
    /// language binding has responsibility to fill that
    /// attribute. End-User should not set that attribute.
    var generated: Bool {
      get {return _generated ?? false}
      set {_generated = newValue}
    }
    /// Returns true if `generated` has been explicitly set.
    var hasGenerated: Bool {return self._generated != nil}
    /// Clears the value of `generated`. Subsequent reads from it will return its default value.
    mutating func clearGenerated() {self._generated = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _name: String? = nil
    fileprivate var _type: PaddleMobile_Framework_Proto_AttrType? = nil
    fileprivate var _comment: String? = nil
    fileprivate var _generated: Bool? = nil
  }

  init() {}

  fileprivate var _type: String? = nil
  fileprivate var _comment: String? = nil
}

struct PaddleMobile_Framework_Proto_VarType {
  // 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.

  var type: PaddleMobile_Framework_Proto_VarType.TypeEnum {
    get {return _storage._type ?? .bool}
    set {_uniqueStorage()._type = newValue}
  }
  /// Returns true if `type` has been explicitly set.
  var hasType: Bool {return _storage._type != nil}
  /// Clears the value of `type`. Subsequent reads from it will return its default value.
  mutating func clearType() {_storage._type = nil}

  var selectedRows: PaddleMobile_Framework_Proto_VarType.TensorDesc {
    get {return _storage._selectedRows ?? PaddleMobile_Framework_Proto_VarType.TensorDesc()}
    set {_uniqueStorage()._selectedRows = newValue}
  }
  /// Returns true if `selectedRows` has been explicitly set.
  var hasSelectedRows: Bool {return _storage._selectedRows != nil}
  /// Clears the value of `selectedRows`. Subsequent reads from it will return its default value.
  mutating func clearSelectedRows() {_storage._selectedRows = nil}

  var lodTensor: PaddleMobile_Framework_Proto_VarType.LoDTensorDesc {
    get {return _storage._lodTensor ?? PaddleMobile_Framework_Proto_VarType.LoDTensorDesc()}
    set {_uniqueStorage()._lodTensor = newValue}
  }
  /// Returns true if `lodTensor` has been explicitly set.
  var hasLodTensor: Bool {return _storage._lodTensor != nil}
  /// Clears the value of `lodTensor`. Subsequent reads from it will return its default value.
  mutating func clearLodTensor() {_storage._lodTensor = nil}

  var tensorArray: PaddleMobile_Framework_Proto_VarType.LoDTensorArrayDesc {
    get {return _storage._tensorArray ?? PaddleMobile_Framework_Proto_VarType.LoDTensorArrayDesc()}
    set {_uniqueStorage()._tensorArray = newValue}
  }
  /// Returns true if `tensorArray` has been explicitly set.
  var hasTensorArray: Bool {return _storage._tensorArray != nil}
  /// Clears the value of `tensorArray`. Subsequent reads from it will return its default value.
  mutating func clearTensorArray() {_storage._tensorArray = nil}

  var reader: PaddleMobile_Framework_Proto_VarType.ReaderDesc {
    get {return _storage._reader ?? PaddleMobile_Framework_Proto_VarType.ReaderDesc()}
    set {_uniqueStorage()._reader = newValue}
  }
  /// Returns true if `reader` has been explicitly set.
  var hasReader: Bool {return _storage._reader != nil}
  /// Clears the value of `reader`. Subsequent reads from it will return its default value.
  mutating func clearReader() {_storage._reader = nil}

  var channel: PaddleMobile_Framework_Proto_VarType.ChannelDesc {
    get {return _storage._channel ?? PaddleMobile_Framework_Proto_VarType.ChannelDesc()}
    set {_uniqueStorage()._channel = newValue}
  }
  /// Returns true if `channel` has been explicitly set.
  var hasChannel: Bool {return _storage._channel != nil}
  /// Clears the value of `channel`. Subsequent reads from it will return its default value.
  mutating func clearChannel() {_storage._channel = nil}

  var tuple: PaddleMobile_Framework_Proto_VarType.Tuple {
    get {return _storage._tuple ?? PaddleMobile_Framework_Proto_VarType.Tuple()}
    set {_uniqueStorage()._tuple = newValue}
  }
  /// Returns true if `tuple` has been explicitly set.
  var hasTuple: Bool {return _storage._tuple != nil}
  /// Clears the value of `tuple`. Subsequent reads from it will return its default value.
  mutating func clearTuple() {_storage._tuple = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  enum TypeEnum: SwiftProtobuf.Enum {
    typealias RawValue = Int

    /// Pod Types
    case bool // = 0
    case int16 // = 1
    case int32 // = 2
    case int64 // = 3
    case fp16 // = 4
    case fp32 // = 5
    case fp64 // = 6

    /// Other types that may need additional descriptions
    case lodTensor // = 7
    case selectedRows // = 8
    case feedMinibatch // = 9
    case fetchList // = 10
    case stepScopes // = 11
    case lodRankTable // = 12
    case lodTensorArray // = 13
    case placeList // = 14
    case reader // = 15
    case channel // = 16

    /// Any runtime decided variable type is raw
    /// raw variables should manage their own allocations
    /// in operators like nccl_op
    case raw // = 17
    case tuple // = 18

    init() {
      self = .bool
    }

    init?(rawValue: Int) {
      switch rawValue {
      case 0: self = .bool
      case 1: self = .int16
      case 2: self = .int32
      case 3: self = .int64
      case 4: self = .fp16
      case 5: self = .fp32
      case 6: self = .fp64
      case 7: self = .lodTensor
      case 8: self = .selectedRows
      case 9: self = .feedMinibatch
      case 10: self = .fetchList
      case 11: self = .stepScopes
      case 12: self = .lodRankTable
      case 13: self = .lodTensorArray
      case 14: self = .placeList
      case 15: self = .reader
      case 16: self = .channel
      case 17: self = .raw
      case 18: self = .tuple
      default: return nil
      }
    }

    var rawValue: Int {
      switch self {
      case .bool: return 0
      case .int16: return 1
      case .int32: return 2
      case .int64: return 3
      case .fp16: return 4
      case .fp32: return 5
      case .fp64: return 6
      case .lodTensor: return 7
      case .selectedRows: return 8
      case .feedMinibatch: return 9
      case .fetchList: return 10
      case .stepScopes: return 11
      case .lodRankTable: return 12
      case .lodTensorArray: return 13
      case .placeList: return 14
      case .reader: return 15
      case .channel: return 16
      case .raw: return 17
      case .tuple: return 18
      }
    }

  }

  struct TensorDesc {
    // 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.

    /// Should only be PODType. Is enforced in C++
    var dataType: PaddleMobile_Framework_Proto_VarType.TypeEnum {
      get {return _dataType ?? .bool}
      set {_dataType = newValue}
    }
    /// Returns true if `dataType` has been explicitly set.
    var hasDataType: Bool {return self._dataType != nil}
    /// Clears the value of `dataType`. Subsequent reads from it will return its default value.
    mutating func clearDataType() {self._dataType = nil}

    /// [UNK, 640, 480] is saved as [-1, 640, 480]
    var dims: [Int64] = []

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _dataType: PaddleMobile_Framework_Proto_VarType.TypeEnum? = nil
  }

  struct LoDTensorDesc {
    // 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.

    var tensor: PaddleMobile_Framework_Proto_VarType.TensorDesc {
      get {return _storage._tensor ?? PaddleMobile_Framework_Proto_VarType.TensorDesc()}
      set {_uniqueStorage()._tensor = newValue}
    }
    /// Returns true if `tensor` has been explicitly set.
    var hasTensor: Bool {return _storage._tensor != nil}
    /// Clears the value of `tensor`. Subsequent reads from it will return its default value.
    mutating func clearTensor() {_storage._tensor = nil}

    var lodLevel: Int32 {
      get {return _storage._lodLevel ?? 0}
      set {_uniqueStorage()._lodLevel = newValue}
    }
    /// Returns true if `lodLevel` has been explicitly set.
    var hasLodLevel: Bool {return _storage._lodLevel != nil}
    /// Clears the value of `lodLevel`. Subsequent reads from it will return its default value.
    mutating func clearLodLevel() {_storage._lodLevel = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _storage = _StorageClass.defaultInstance
  }

  struct LoDTensorArrayDesc {
    // 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.

    var tensor: PaddleMobile_Framework_Proto_VarType.TensorDesc {
      get {return _storage._tensor ?? PaddleMobile_Framework_Proto_VarType.TensorDesc()}
      set {_uniqueStorage()._tensor = newValue}
    }
    /// Returns true if `tensor` has been explicitly set.
    var hasTensor: Bool {return _storage._tensor != nil}
    /// Clears the value of `tensor`. Subsequent reads from it will return its default value.
    mutating func clearTensor() {_storage._tensor = nil}

    var lodLevel: Int32 {
      get {return _storage._lodLevel ?? 0}
      set {_uniqueStorage()._lodLevel = newValue}
    }
    /// Returns true if `lodLevel` has been explicitly set.
    var hasLodLevel: Bool {return _storage._lodLevel != nil}
    /// Clears the value of `lodLevel`. Subsequent reads from it will return its default value.
    mutating func clearLodLevel() {_storage._lodLevel = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _storage = _StorageClass.defaultInstance
  }

  struct ReaderDesc {
    // 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.

    var lodTensor: [PaddleMobile_Framework_Proto_VarType.LoDTensorDesc] = []

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}
  }

  struct ChannelDesc {
    // 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.

    var dataType: PaddleMobile_Framework_Proto_VarType.TypeEnum {
      get {return _dataType ?? .bool}
      set {_dataType = newValue}
    }
    /// Returns true if `dataType` has been explicitly set.
    var hasDataType: Bool {return self._dataType != nil}
    /// Clears the value of `dataType`. Subsequent reads from it will return its default value.
    mutating func clearDataType() {self._dataType = nil}

    var capacity: Int64 {
      get {return _capacity ?? 0}
      set {_capacity = newValue}
    }
    /// Returns true if `capacity` has been explicitly set.
    var hasCapacity: Bool {return self._capacity != nil}
    /// Clears the value of `capacity`. Subsequent reads from it will return its default value.
    mutating func clearCapacity() {self._capacity = nil}

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}

    fileprivate var _dataType: PaddleMobile_Framework_Proto_VarType.TypeEnum? = nil
    fileprivate var _capacity: Int64? = nil
  }

  struct Tuple {
    // 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.

    var elementType: [PaddleMobile_Framework_Proto_VarType.TypeEnum] = []

    var unknownFields = SwiftProtobuf.UnknownStorage()

    init() {}
  }

  init() {}

  fileprivate var _storage = _StorageClass.defaultInstance
}

struct PaddleMobile_Framework_Proto_VarDesc {
  // 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.

  var name: String {
    get {return _storage._name ?? String()}
    set {_uniqueStorage()._name = newValue}
  }
  /// Returns true if `name` has been explicitly set.
  var hasName: Bool {return _storage._name != nil}
  /// Clears the value of `name`. Subsequent reads from it will return its default value.
  mutating func clearName() {_storage._name = nil}

  var type: PaddleMobile_Framework_Proto_VarType {
    get {return _storage._type ?? PaddleMobile_Framework_Proto_VarType()}
    set {_uniqueStorage()._type = newValue}
  }
  /// Returns true if `type` has been explicitly set.
  var hasType: Bool {return _storage._type != nil}
  /// Clears the value of `type`. Subsequent reads from it will return its default value.
  mutating func clearType() {_storage._type = nil}

  var persistable: Bool {
    get {return _storage._persistable ?? false}
    set {_uniqueStorage()._persistable = newValue}
  }
  /// Returns true if `persistable` has been explicitly set.
  var hasPersistable: Bool {return _storage._persistable != nil}
  /// Clears the value of `persistable`. Subsequent reads from it will return its default value.
  mutating func clearPersistable() {_storage._persistable = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}

  fileprivate var _storage = _StorageClass.defaultInstance
}

struct PaddleMobile_Framework_Proto_BlockDesc {
  // 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.

  var idx: Int32 {
    get {return _idx ?? 0}
    set {_idx = newValue}
  }
  /// Returns true if `idx` has been explicitly set.
  var hasIdx: Bool {return self._idx != nil}
  /// Clears the value of `idx`. Subsequent reads from it will return its default value.
  mutating func clearIdx() {self._idx = nil}

  var parentIdx: Int32 {
    get {return _parentIdx ?? 0}
    set {_parentIdx = newValue}
  }
  /// Returns true if `parentIdx` has been explicitly set.
  var hasParentIdx: Bool {return self._parentIdx != nil}
  /// Clears the value of `parentIdx`. Subsequent reads from it will return its default value.
  mutating func clearParentIdx() {self._parentIdx = nil}

  var vars: [PaddleMobile_Framework_Proto_VarDesc] = []

  var ops: [PaddleMobile_Framework_Proto_OpDesc] = []

  var forwardBlockIdx: Int32 {
    get {return _forwardBlockIdx ?? -1}
    set {_forwardBlockIdx = newValue}
  }
  /// Returns true if `forwardBlockIdx` has been explicitly set.
  var hasForwardBlockIdx: Bool {return self._forwardBlockIdx != nil}
  /// Clears the value of `forwardBlockIdx`. Subsequent reads from it will return its default value.
  mutating func clearForwardBlockIdx() {self._forwardBlockIdx = nil}

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}

  fileprivate var _idx: Int32? = nil
  fileprivate var _parentIdx: Int32? = nil
  fileprivate var _forwardBlockIdx: Int32? = nil
}

/// Please refer to
/// https://github.com/PaddlePaddle/Paddle/blob/develop/doc/design/program.md
/// for more details.
/// TODO(panyx0718): A model can have multiple programs. Need a
/// way to distinguish them. Maybe ID or name?
struct PaddleMobile_Framework_Proto_ProgramDesc {
  // 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.

  var blocks: [PaddleMobile_Framework_Proto_BlockDesc] = []

  var unknownFields = SwiftProtobuf.UnknownStorage()

  init() {}
}

// MARK: - Code below here is support for the SwiftProtobuf runtime.

fileprivate let _protobuf_package = "paddle_mobile.framework.proto"

extension PaddleMobile_Framework_Proto_AttrType: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "INT"),
    1: .same(proto: "FLOAT"),
    2: .same(proto: "STRING"),
    3: .same(proto: "INTS"),
    4: .same(proto: "FLOATS"),
    5: .same(proto: "STRINGS"),
    6: .same(proto: "BOOLEAN"),
    7: .same(proto: "BOOLEANS"),
    8: .same(proto: "BLOCK"),
    9: .same(proto: "LONG"),
  ]
}

extension PaddleMobile_Framework_Proto_OpDesc: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".OpDesc"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    3: .same(proto: "type"),
    1: .same(proto: "inputs"),
    2: .same(proto: "outputs"),
    4: .same(proto: "attrs"),
    5: .standard(proto: "is_target"),
  ]

  public var isInitialized: Bool {
    if self._type == nil {return false}
    if !SwiftProtobuf.Internal.areAllInitialized(self.inputs) {return false}
    if !SwiftProtobuf.Internal.areAllInitialized(self.outputs) {return false}
    if !SwiftProtobuf.Internal.areAllInitialized(self.attrs) {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeRepeatedMessageField(value: &self.inputs)
      case 2: try decoder.decodeRepeatedMessageField(value: &self.outputs)
      case 3: try decoder.decodeSingularStringField(value: &self._type)
      case 4: try decoder.decodeRepeatedMessageField(value: &self.attrs)
      case 5: try decoder.decodeSingularBoolField(value: &self._isTarget)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if !self.inputs.isEmpty {
      try visitor.visitRepeatedMessageField(value: self.inputs, fieldNumber: 1)
    }
    if !self.outputs.isEmpty {
      try visitor.visitRepeatedMessageField(value: self.outputs, fieldNumber: 2)
    }
    if let v = self._type {
      try visitor.visitSingularStringField(value: v, fieldNumber: 3)
    }
    if !self.attrs.isEmpty {
      try visitor.visitRepeatedMessageField(value: self.attrs, fieldNumber: 4)
    }
    if let v = self._isTarget {
      try visitor.visitSingularBoolField(value: v, fieldNumber: 5)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: PaddleMobile_Framework_Proto_OpDesc) -> Bool {
    if self._type != other._type {return false}
    if self.inputs != other.inputs {return false}
    if self.outputs != other.outputs {return false}
    if self.attrs != other.attrs {return false}
    if self._isTarget != other._isTarget {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension PaddleMobile_Framework_Proto_OpDesc.Attr: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = PaddleMobile_Framework_Proto_OpDesc.protoMessageName + ".Attr"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "name"),
    2: .same(proto: "type"),
    3: .same(proto: "i"),
    4: .same(proto: "f"),
    5: .same(proto: "s"),
    6: .same(proto: "ints"),
    7: .same(proto: "floats"),
    8: .same(proto: "strings"),
    10: .same(proto: "b"),
    11: .same(proto: "bools"),
    12: .standard(proto: "block_idx"),
    13: .same(proto: "l"),
  ]

  public var isInitialized: Bool {
    if self._name == nil {return false}
    if self._type == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularStringField(value: &self._name)
      case 2: try decoder.decodeSingularEnumField(value: &self._type)
      case 3: try decoder.decodeSingularInt32Field(value: &self._i)
      case 4: try decoder.decodeSingularFloatField(value: &self._f)
      case 5: try decoder.decodeSingularStringField(value: &self._s)
      case 6: try decoder.decodeRepeatedInt32Field(value: &self.ints)
      case 7: try decoder.decodeRepeatedFloatField(value: &self.floats)
      case 8: try decoder.decodeRepeatedStringField(value: &self.strings)
      case 10: try decoder.decodeSingularBoolField(value: &self._b)
      case 11: try decoder.decodeRepeatedBoolField(value: &self.bools)
      case 12: try decoder.decodeSingularInt32Field(value: &self._blockIdx)
      case 13: try decoder.decodeSingularInt64Field(value: &self._l)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._name {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1)
    }
    if let v = self._type {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 2)
    }
    if let v = self._i {
      try visitor.visitSingularInt32Field(value: v, fieldNumber: 3)
    }
    if let v = self._f {
      try visitor.visitSingularFloatField(value: v, fieldNumber: 4)
    }
    if let v = self._s {
      try visitor.visitSingularStringField(value: v, fieldNumber: 5)
    }
    if !self.ints.isEmpty {
      try visitor.visitRepeatedInt32Field(value: self.ints, fieldNumber: 6)
    }
    if !self.floats.isEmpty {
      try visitor.visitRepeatedFloatField(value: self.floats, fieldNumber: 7)
    }
    if !self.strings.isEmpty {
      try visitor.visitRepeatedStringField(value: self.strings, fieldNumber: 8)
    }
    if let v = self._b {
      try visitor.visitSingularBoolField(value: v, fieldNumber: 10)
    }
    if !self.bools.isEmpty {
      try visitor.visitRepeatedBoolField(value: self.bools, fieldNumber: 11)
    }
    if let v = self._blockIdx {
      try visitor.visitSingularInt32Field(value: v, fieldNumber: 12)
    }
    if let v = self._l {
      try visitor.visitSingularInt64Field(value: v, fieldNumber: 13)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: PaddleMobile_Framework_Proto_OpDesc.Attr) -> Bool {
    if self._name != other._name {return false}
    if self._type != other._type {return false}
    if self._i != other._i {return false}
    if self._f != other._f {return false}
    if self._s != other._s {return false}
    if self.ints != other.ints {return false}
    if self.floats != other.floats {return false}
    if self.strings != other.strings {return false}
    if self._b != other._b {return false}
    if self.bools != other.bools {return false}
    if self._blockIdx != other._blockIdx {return false}
    if self._l != other._l {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension PaddleMobile_Framework_Proto_OpDesc.Var: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = PaddleMobile_Framework_Proto_OpDesc.protoMessageName + ".Var"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "parameter"),
    2: .same(proto: "arguments"),
  ]

  public var isInitialized: Bool {
    if self._parameter == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularStringField(value: &self._parameter)
      case 2: try decoder.decodeRepeatedStringField(value: &self.arguments)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._parameter {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1)
    }
    if !self.arguments.isEmpty {
      try visitor.visitRepeatedStringField(value: self.arguments, fieldNumber: 2)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: PaddleMobile_Framework_Proto_OpDesc.Var) -> Bool {
    if self._parameter != other._parameter {return false}
    if self.arguments != other.arguments {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension PaddleMobile_Framework_Proto_OpProto: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".OpProto"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "type"),
    2: .same(proto: "inputs"),
    3: .same(proto: "outputs"),
    4: .same(proto: "attrs"),
    5: .same(proto: "comment"),
  ]

  public var isInitialized: Bool {
    if self._type == nil {return false}
    if self._comment == nil {return false}
    if !SwiftProtobuf.Internal.areAllInitialized(self.inputs) {return false}
    if !SwiftProtobuf.Internal.areAllInitialized(self.outputs) {return false}
    if !SwiftProtobuf.Internal.areAllInitialized(self.attrs) {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularStringField(value: &self._type)
      case 2: try decoder.decodeRepeatedMessageField(value: &self.inputs)
      case 3: try decoder.decodeRepeatedMessageField(value: &self.outputs)
      case 4: try decoder.decodeRepeatedMessageField(value: &self.attrs)
      case 5: try decoder.decodeSingularStringField(value: &self._comment)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._type {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1)
    }
    if !self.inputs.isEmpty {
      try visitor.visitRepeatedMessageField(value: self.inputs, fieldNumber: 2)
    }
    if !self.outputs.isEmpty {
      try visitor.visitRepeatedMessageField(value: self.outputs, fieldNumber: 3)
    }
    if !self.attrs.isEmpty {
      try visitor.visitRepeatedMessageField(value: self.attrs, fieldNumber: 4)
    }
    if let v = self._comment {
      try visitor.visitSingularStringField(value: v, fieldNumber: 5)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: PaddleMobile_Framework_Proto_OpProto) -> Bool {
    if self._type != other._type {return false}
    if self.inputs != other.inputs {return false}
    if self.outputs != other.outputs {return false}
    if self.attrs != other.attrs {return false}
    if self._comment != other._comment {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension PaddleMobile_Framework_Proto_OpProto.Var: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = PaddleMobile_Framework_Proto_OpProto.protoMessageName + ".Var"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "name"),
    2: .same(proto: "comment"),
    3: .same(proto: "duplicable"),
    4: .same(proto: "intermediate"),
    5: .same(proto: "dispensable"),
  ]

  public var isInitialized: Bool {
    if self._name == nil {return false}
    if self._comment == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularStringField(value: &self._name)
      case 2: try decoder.decodeSingularStringField(value: &self._comment)
      case 3: try decoder.decodeSingularBoolField(value: &self._duplicable)
      case 4: try decoder.decodeSingularBoolField(value: &self._intermediate)
      case 5: try decoder.decodeSingularBoolField(value: &self._dispensable)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._name {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1)
    }
    if let v = self._comment {
      try visitor.visitSingularStringField(value: v, fieldNumber: 2)
    }
    if let v = self._duplicable {
      try visitor.visitSingularBoolField(value: v, fieldNumber: 3)
    }
    if let v = self._intermediate {
      try visitor.visitSingularBoolField(value: v, fieldNumber: 4)
    }
    if let v = self._dispensable {
      try visitor.visitSingularBoolField(value: v, fieldNumber: 5)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: PaddleMobile_Framework_Proto_OpProto.Var) -> Bool {
    if self._name != other._name {return false}
    if self._comment != other._comment {return false}
    if self._duplicable != other._duplicable {return false}
    if self._intermediate != other._intermediate {return false}
    if self._dispensable != other._dispensable {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension PaddleMobile_Framework_Proto_OpProto.Attr: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = PaddleMobile_Framework_Proto_OpProto.protoMessageName + ".Attr"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "name"),
    2: .same(proto: "type"),
    3: .same(proto: "comment"),
    4: .same(proto: "generated"),
  ]

  public var isInitialized: Bool {
    if self._name == nil {return false}
    if self._type == nil {return false}
    if self._comment == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularStringField(value: &self._name)
      case 2: try decoder.decodeSingularEnumField(value: &self._type)
      case 3: try decoder.decodeSingularStringField(value: &self._comment)
      case 4: try decoder.decodeSingularBoolField(value: &self._generated)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._name {
      try visitor.visitSingularStringField(value: v, fieldNumber: 1)
    }
    if let v = self._type {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 2)
    }
    if let v = self._comment {
      try visitor.visitSingularStringField(value: v, fieldNumber: 3)
    }
    if let v = self._generated {
      try visitor.visitSingularBoolField(value: v, fieldNumber: 4)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: PaddleMobile_Framework_Proto_OpProto.Attr) -> Bool {
    if self._name != other._name {return false}
    if self._type != other._type {return false}
    if self._comment != other._comment {return false}
    if self._generated != other._generated {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension PaddleMobile_Framework_Proto_VarType: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".VarType"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "type"),
    2: .standard(proto: "selected_rows"),
    3: .standard(proto: "lod_tensor"),
    4: .standard(proto: "tensor_array"),
    5: .same(proto: "reader"),
    6: .same(proto: "channel"),
    7: .same(proto: "tuple"),
  ]

  fileprivate class _StorageClass {
    var _type: PaddleMobile_Framework_Proto_VarType.TypeEnum? = nil
    var _selectedRows: PaddleMobile_Framework_Proto_VarType.TensorDesc? = nil
    var _lodTensor: PaddleMobile_Framework_Proto_VarType.LoDTensorDesc? = nil
    var _tensorArray: PaddleMobile_Framework_Proto_VarType.LoDTensorArrayDesc? = nil
    var _reader: PaddleMobile_Framework_Proto_VarType.ReaderDesc? = nil
    var _channel: PaddleMobile_Framework_Proto_VarType.ChannelDesc? = nil
    var _tuple: PaddleMobile_Framework_Proto_VarType.Tuple? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _type = source._type
      _selectedRows = source._selectedRows
      _lodTensor = source._lodTensor
      _tensorArray = source._tensorArray
      _reader = source._reader
      _channel = source._channel
      _tuple = source._tuple
    }
  }

  fileprivate mutating func _uniqueStorage() -> _StorageClass {
    if !isKnownUniquelyReferenced(&_storage) {
      _storage = _StorageClass(copying: _storage)
    }
    return _storage
  }

  public var isInitialized: Bool {
    return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if _storage._type == nil {return false}
      if let v = _storage._selectedRows, !v.isInitialized {return false}
      if let v = _storage._lodTensor, !v.isInitialized {return false}
      if let v = _storage._tensorArray, !v.isInitialized {return false}
      if let v = _storage._reader, !v.isInitialized {return false}
      if let v = _storage._channel, !v.isInitialized {return false}
      return true
    }
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularEnumField(value: &_storage._type)
        case 2: try decoder.decodeSingularMessageField(value: &_storage._selectedRows)
        case 3: try decoder.decodeSingularMessageField(value: &_storage._lodTensor)
        case 4: try decoder.decodeSingularMessageField(value: &_storage._tensorArray)
        case 5: try decoder.decodeSingularMessageField(value: &_storage._reader)
        case 6: try decoder.decodeSingularMessageField(value: &_storage._channel)
        case 7: try decoder.decodeSingularMessageField(value: &_storage._tuple)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._type {
        try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
      }
      if let v = _storage._selectedRows {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
      }
      if let v = _storage._lodTensor {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
      }
      if let v = _storage._tensorArray {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
      }
      if let v = _storage._reader {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
      }
      if let v = _storage._channel {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
      }
      if let v = _storage._tuple {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: PaddleMobile_Framework_Proto_VarType) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._type != other_storage._type {return false}
        if _storage._selectedRows != other_storage._selectedRows {return false}
        if _storage._lodTensor != other_storage._lodTensor {return false}
        if _storage._tensorArray != other_storage._tensorArray {return false}
        if _storage._reader != other_storage._reader {return false}
        if _storage._channel != other_storage._channel {return false}
        if _storage._tuple != other_storage._tuple {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension PaddleMobile_Framework_Proto_VarType.TypeEnum: SwiftProtobuf._ProtoNameProviding {
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    0: .same(proto: "BOOL"),
    1: .same(proto: "INT16"),
    2: .same(proto: "INT32"),
    3: .same(proto: "INT64"),
    4: .same(proto: "FP16"),
    5: .same(proto: "FP32"),
    6: .same(proto: "FP64"),
    7: .same(proto: "LOD_TENSOR"),
    8: .same(proto: "SELECTED_ROWS"),
    9: .same(proto: "FEED_MINIBATCH"),
    10: .same(proto: "FETCH_LIST"),
    11: .same(proto: "STEP_SCOPES"),
    12: .same(proto: "LOD_RANK_TABLE"),
    13: .same(proto: "LOD_TENSOR_ARRAY"),
    14: .same(proto: "PLACE_LIST"),
    15: .same(proto: "READER"),
    16: .same(proto: "CHANNEL"),
    17: .same(proto: "RAW"),
    18: .same(proto: "TUPLE"),
  ]
}

extension PaddleMobile_Framework_Proto_VarType.TensorDesc: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = PaddleMobile_Framework_Proto_VarType.protoMessageName + ".TensorDesc"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .standard(proto: "data_type"),
    2: .same(proto: "dims"),
  ]

  public var isInitialized: Bool {
    if self._dataType == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularEnumField(value: &self._dataType)
      case 2: try decoder.decodeRepeatedInt64Field(value: &self.dims)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._dataType {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
    }
    if !self.dims.isEmpty {
      try visitor.visitRepeatedInt64Field(value: self.dims, fieldNumber: 2)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: PaddleMobile_Framework_Proto_VarType.TensorDesc) -> Bool {
    if self._dataType != other._dataType {return false}
    if self.dims != other.dims {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension PaddleMobile_Framework_Proto_VarType.LoDTensorDesc: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = PaddleMobile_Framework_Proto_VarType.protoMessageName + ".LoDTensorDesc"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "tensor"),
    2: .standard(proto: "lod_level"),
  ]

  fileprivate class _StorageClass {
    var _tensor: PaddleMobile_Framework_Proto_VarType.TensorDesc? = nil
    var _lodLevel: Int32? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _tensor = source._tensor
      _lodLevel = source._lodLevel
    }
  }

  fileprivate mutating func _uniqueStorage() -> _StorageClass {
    if !isKnownUniquelyReferenced(&_storage) {
      _storage = _StorageClass(copying: _storage)
    }
    return _storage
  }

  public var isInitialized: Bool {
    return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if _storage._tensor == nil {return false}
      if let v = _storage._tensor, !v.isInitialized {return false}
      return true
    }
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularMessageField(value: &_storage._tensor)
        case 2: try decoder.decodeSingularInt32Field(value: &_storage._lodLevel)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._tensor {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
      }
      if let v = _storage._lodLevel {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: PaddleMobile_Framework_Proto_VarType.LoDTensorDesc) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._tensor != other_storage._tensor {return false}
        if _storage._lodLevel != other_storage._lodLevel {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension PaddleMobile_Framework_Proto_VarType.LoDTensorArrayDesc: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = PaddleMobile_Framework_Proto_VarType.protoMessageName + ".LoDTensorArrayDesc"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "tensor"),
    2: .standard(proto: "lod_level"),
  ]

  fileprivate class _StorageClass {
    var _tensor: PaddleMobile_Framework_Proto_VarType.TensorDesc? = nil
    var _lodLevel: Int32? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _tensor = source._tensor
      _lodLevel = source._lodLevel
    }
  }

  fileprivate mutating func _uniqueStorage() -> _StorageClass {
    if !isKnownUniquelyReferenced(&_storage) {
      _storage = _StorageClass(copying: _storage)
    }
    return _storage
  }

  public var isInitialized: Bool {
    return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if _storage._tensor == nil {return false}
      if let v = _storage._tensor, !v.isInitialized {return false}
      return true
    }
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularMessageField(value: &_storage._tensor)
        case 2: try decoder.decodeSingularInt32Field(value: &_storage._lodLevel)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._tensor {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
      }
      if let v = _storage._lodLevel {
        try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: PaddleMobile_Framework_Proto_VarType.LoDTensorArrayDesc) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._tensor != other_storage._tensor {return false}
        if _storage._lodLevel != other_storage._lodLevel {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension PaddleMobile_Framework_Proto_VarType.ReaderDesc: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = PaddleMobile_Framework_Proto_VarType.protoMessageName + ".ReaderDesc"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .standard(proto: "lod_tensor"),
  ]

  public var isInitialized: Bool {
    if !SwiftProtobuf.Internal.areAllInitialized(self.lodTensor) {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeRepeatedMessageField(value: &self.lodTensor)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if !self.lodTensor.isEmpty {
      try visitor.visitRepeatedMessageField(value: self.lodTensor, fieldNumber: 1)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: PaddleMobile_Framework_Proto_VarType.ReaderDesc) -> Bool {
    if self.lodTensor != other.lodTensor {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension PaddleMobile_Framework_Proto_VarType.ChannelDesc: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = PaddleMobile_Framework_Proto_VarType.protoMessageName + ".ChannelDesc"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .standard(proto: "data_type"),
    2: .same(proto: "capacity"),
  ]

  public var isInitialized: Bool {
    if self._dataType == nil {return false}
    if self._capacity == nil {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularEnumField(value: &self._dataType)
      case 2: try decoder.decodeSingularInt64Field(value: &self._capacity)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._dataType {
      try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
    }
    if let v = self._capacity {
      try visitor.visitSingularInt64Field(value: v, fieldNumber: 2)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: PaddleMobile_Framework_Proto_VarType.ChannelDesc) -> Bool {
    if self._dataType != other._dataType {return false}
    if self._capacity != other._capacity {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension PaddleMobile_Framework_Proto_VarType.Tuple: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = PaddleMobile_Framework_Proto_VarType.protoMessageName + ".Tuple"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .standard(proto: "element_type"),
  ]

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeRepeatedEnumField(value: &self.elementType)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if !self.elementType.isEmpty {
      try visitor.visitRepeatedEnumField(value: self.elementType, fieldNumber: 1)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: PaddleMobile_Framework_Proto_VarType.Tuple) -> Bool {
    if self.elementType != other.elementType {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension PaddleMobile_Framework_Proto_VarDesc: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".VarDesc"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "name"),
    2: .same(proto: "type"),
    3: .same(proto: "persistable"),
  ]

  fileprivate class _StorageClass {
    var _name: String? = nil
    var _type: PaddleMobile_Framework_Proto_VarType? = nil
    var _persistable: Bool? = nil

    static let defaultInstance = _StorageClass()

    private init() {}

    init(copying source: _StorageClass) {
      _name = source._name
      _type = source._type
      _persistable = source._persistable
    }
  }

  fileprivate mutating func _uniqueStorage() -> _StorageClass {
    if !isKnownUniquelyReferenced(&_storage) {
      _storage = _StorageClass(copying: _storage)
    }
    return _storage
  }

  public var isInitialized: Bool {
    return withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if _storage._name == nil {return false}
      if _storage._type == nil {return false}
      if let v = _storage._type, !v.isInitialized {return false}
      return true
    }
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    _ = _uniqueStorage()
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      while let fieldNumber = try decoder.nextFieldNumber() {
        switch fieldNumber {
        case 1: try decoder.decodeSingularStringField(value: &_storage._name)
        case 2: try decoder.decodeSingularMessageField(value: &_storage._type)
        case 3: try decoder.decodeSingularBoolField(value: &_storage._persistable)
        default: break
        }
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
      if let v = _storage._name {
        try visitor.visitSingularStringField(value: v, fieldNumber: 1)
      }
      if let v = _storage._type {
        try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
      }
      if let v = _storage._persistable {
        try visitor.visitSingularBoolField(value: v, fieldNumber: 3)
      }
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: PaddleMobile_Framework_Proto_VarDesc) -> Bool {
    if _storage !== other._storage {
      let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in
        let _storage = _args.0
        let other_storage = _args.1
        if _storage._name != other_storage._name {return false}
        if _storage._type != other_storage._type {return false}
        if _storage._persistable != other_storage._persistable {return false}
        return true
      }
      if !storagesAreEqual {return false}
    }
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension PaddleMobile_Framework_Proto_BlockDesc: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".BlockDesc"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "idx"),
    2: .standard(proto: "parent_idx"),
    3: .same(proto: "vars"),
    4: .same(proto: "ops"),
    5: .standard(proto: "forward_block_idx"),
  ]

  public var isInitialized: Bool {
    if self._idx == nil {return false}
    if self._parentIdx == nil {return false}
    if !SwiftProtobuf.Internal.areAllInitialized(self.vars) {return false}
    if !SwiftProtobuf.Internal.areAllInitialized(self.ops) {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeSingularInt32Field(value: &self._idx)
      case 2: try decoder.decodeSingularInt32Field(value: &self._parentIdx)
      case 3: try decoder.decodeRepeatedMessageField(value: &self.vars)
      case 4: try decoder.decodeRepeatedMessageField(value: &self.ops)
      case 5: try decoder.decodeSingularInt32Field(value: &self._forwardBlockIdx)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if let v = self._idx {
      try visitor.visitSingularInt32Field(value: v, fieldNumber: 1)
    }
    if let v = self._parentIdx {
      try visitor.visitSingularInt32Field(value: v, fieldNumber: 2)
    }
    if !self.vars.isEmpty {
      try visitor.visitRepeatedMessageField(value: self.vars, fieldNumber: 3)
    }
    if !self.ops.isEmpty {
      try visitor.visitRepeatedMessageField(value: self.ops, fieldNumber: 4)
    }
    if let v = self._forwardBlockIdx {
      try visitor.visitSingularInt32Field(value: v, fieldNumber: 5)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: PaddleMobile_Framework_Proto_BlockDesc) -> Bool {
    if self._idx != other._idx {return false}
    if self._parentIdx != other._parentIdx {return false}
    if self.vars != other.vars {return false}
    if self.ops != other.ops {return false}
    if self._forwardBlockIdx != other._forwardBlockIdx {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}

extension PaddleMobile_Framework_Proto_ProgramDesc: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
  static let protoMessageName: String = _protobuf_package + ".ProgramDesc"
  static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
    1: .same(proto: "blocks"),
  ]

  public var isInitialized: Bool {
    if !SwiftProtobuf.Internal.areAllInitialized(self.blocks) {return false}
    return true
  }

  mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
    while let fieldNumber = try decoder.nextFieldNumber() {
      switch fieldNumber {
      case 1: try decoder.decodeRepeatedMessageField(value: &self.blocks)
      default: break
      }
    }
  }

  func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
    if !self.blocks.isEmpty {
      try visitor.visitRepeatedMessageField(value: self.blocks, fieldNumber: 1)
    }
    try unknownFields.traverse(visitor: &visitor)
  }

  func _protobuf_generated_isEqualTo(other: PaddleMobile_Framework_Proto_ProgramDesc) -> Bool {
    if self.blocks != other.blocks {return false}
    if unknownFields != other.unknownFields {return false}
    return true
  }
}
