#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BytesList {
#[prost(bytes = "vec", repeated, tag = "1")]
pub value: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FloatList {
#[prost(float, repeated, tag = "1")]
pub value: ::prost::alloc::vec::Vec<f32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Int64List {
#[prost(int64, repeated, tag = "1")]
pub value: ::prost::alloc::vec::Vec<i64>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Feature {
#[prost(oneof = "feature::Kind", tags = "1, 2, 3")]
pub kind: ::core::option::Option<feature::Kind>,
}
pub mod feature {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(message, tag = "1")]
BytesList(super::BytesList),
#[prost(message, tag = "2")]
FloatList(super::FloatList),
#[prost(message, tag = "3")]
Int64List(super::Int64List),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Features {
#[prost(map = "string, message", tag = "1")]
pub feature: ::std::collections::HashMap<::prost::alloc::string::String, Feature>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeatureList {
#[prost(message, repeated, tag = "1")]
pub feature: ::prost::alloc::vec::Vec<Feature>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeatureLists {
#[prost(map = "string, message", tag = "1")]
pub feature_list: ::std::collections::HashMap<
::prost::alloc::string::String,
FeatureList,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Example {
#[prost(message, optional, tag = "1")]
pub features: ::core::option::Option<Features>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SequenceExample {
#[prost(message, optional, tag = "1")]
pub context: ::core::option::Option<Features>,
#[prost(message, optional, tag = "2")]
pub feature_lists: ::core::option::Option<FeatureLists>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TensorShapeProto {
#[prost(message, repeated, tag = "2")]
pub dim: ::prost::alloc::vec::Vec<tensor_shape_proto::Dim>,
#[prost(bool, tag = "3")]
pub unknown_rank: bool,
}
pub mod tensor_shape_proto {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Dim {
#[prost(int64, tag = "1")]
pub size: i64,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SerializedDType {
#[prost(enumeration = "DataType", tag = "1")]
pub datatype: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DataType {
DtInvalid = 0,
DtFloat = 1,
DtDouble = 2,
DtInt32 = 3,
DtUint8 = 4,
DtInt16 = 5,
DtInt8 = 6,
DtString = 7,
DtComplex64 = 8,
DtInt64 = 9,
DtBool = 10,
DtQint8 = 11,
DtQuint8 = 12,
DtQint32 = 13,
DtBfloat16 = 14,
DtQint16 = 15,
DtQuint16 = 16,
DtUint16 = 17,
DtComplex128 = 18,
DtHalf = 19,
DtResource = 20,
DtVariant = 21,
DtUint32 = 22,
DtUint64 = 23,
DtFloat8E5m2 = 24,
DtFloat8E4m3fn = 25,
DtFloatRef = 101,
DtDoubleRef = 102,
DtInt32Ref = 103,
DtUint8Ref = 104,
DtInt16Ref = 105,
DtInt8Ref = 106,
DtStringRef = 107,
DtComplex64Ref = 108,
DtInt64Ref = 109,
DtBoolRef = 110,
DtQint8Ref = 111,
DtQuint8Ref = 112,
DtQint32Ref = 113,
DtBfloat16Ref = 114,
DtQint16Ref = 115,
DtQuint16Ref = 116,
DtUint16Ref = 117,
DtComplex128Ref = 118,
DtHalfRef = 119,
DtResourceRef = 120,
DtVariantRef = 121,
DtUint32Ref = 122,
DtUint64Ref = 123,
DtFloat8E5m2Ref = 124,
DtFloat8E4m3fnRef = 125,
}
impl DataType {
pub fn as_str_name(&self) -> &'static str {
match self {
DataType::DtInvalid => "DT_INVALID",
DataType::DtFloat => "DT_FLOAT",
DataType::DtDouble => "DT_DOUBLE",
DataType::DtInt32 => "DT_INT32",
DataType::DtUint8 => "DT_UINT8",
DataType::DtInt16 => "DT_INT16",
DataType::DtInt8 => "DT_INT8",
DataType::DtString => "DT_STRING",
DataType::DtComplex64 => "DT_COMPLEX64",
DataType::DtInt64 => "DT_INT64",
DataType::DtBool => "DT_BOOL",
DataType::DtQint8 => "DT_QINT8",
DataType::DtQuint8 => "DT_QUINT8",
DataType::DtQint32 => "DT_QINT32",
DataType::DtBfloat16 => "DT_BFLOAT16",
DataType::DtQint16 => "DT_QINT16",
DataType::DtQuint16 => "DT_QUINT16",
DataType::DtUint16 => "DT_UINT16",
DataType::DtComplex128 => "DT_COMPLEX128",
DataType::DtHalf => "DT_HALF",
DataType::DtResource => "DT_RESOURCE",
DataType::DtVariant => "DT_VARIANT",
DataType::DtUint32 => "DT_UINT32",
DataType::DtUint64 => "DT_UINT64",
DataType::DtFloat8E5m2 => "DT_FLOAT8_E5M2",
DataType::DtFloat8E4m3fn => "DT_FLOAT8_E4M3FN",
DataType::DtFloatRef => "DT_FLOAT_REF",
DataType::DtDoubleRef => "DT_DOUBLE_REF",
DataType::DtInt32Ref => "DT_INT32_REF",
DataType::DtUint8Ref => "DT_UINT8_REF",
DataType::DtInt16Ref => "DT_INT16_REF",
DataType::DtInt8Ref => "DT_INT8_REF",
DataType::DtStringRef => "DT_STRING_REF",
DataType::DtComplex64Ref => "DT_COMPLEX64_REF",
DataType::DtInt64Ref => "DT_INT64_REF",
DataType::DtBoolRef => "DT_BOOL_REF",
DataType::DtQint8Ref => "DT_QINT8_REF",
DataType::DtQuint8Ref => "DT_QUINT8_REF",
DataType::DtQint32Ref => "DT_QINT32_REF",
DataType::DtBfloat16Ref => "DT_BFLOAT16_REF",
DataType::DtQint16Ref => "DT_QINT16_REF",
DataType::DtQuint16Ref => "DT_QUINT16_REF",
DataType::DtUint16Ref => "DT_UINT16_REF",
DataType::DtComplex128Ref => "DT_COMPLEX128_REF",
DataType::DtHalfRef => "DT_HALF_REF",
DataType::DtResourceRef => "DT_RESOURCE_REF",
DataType::DtVariantRef => "DT_VARIANT_REF",
DataType::DtUint32Ref => "DT_UINT32_REF",
DataType::DtUint64Ref => "DT_UINT64_REF",
DataType::DtFloat8E5m2Ref => "DT_FLOAT8_E5M2_REF",
DataType::DtFloat8E4m3fnRef => "DT_FLOAT8_E4M3FN_REF",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DT_INVALID" => Some(Self::DtInvalid),
"DT_FLOAT" => Some(Self::DtFloat),
"DT_DOUBLE" => Some(Self::DtDouble),
"DT_INT32" => Some(Self::DtInt32),
"DT_UINT8" => Some(Self::DtUint8),
"DT_INT16" => Some(Self::DtInt16),
"DT_INT8" => Some(Self::DtInt8),
"DT_STRING" => Some(Self::DtString),
"DT_COMPLEX64" => Some(Self::DtComplex64),
"DT_INT64" => Some(Self::DtInt64),
"DT_BOOL" => Some(Self::DtBool),
"DT_QINT8" => Some(Self::DtQint8),
"DT_QUINT8" => Some(Self::DtQuint8),
"DT_QINT32" => Some(Self::DtQint32),
"DT_BFLOAT16" => Some(Self::DtBfloat16),
"DT_QINT16" => Some(Self::DtQint16),
"DT_QUINT16" => Some(Self::DtQuint16),
"DT_UINT16" => Some(Self::DtUint16),
"DT_COMPLEX128" => Some(Self::DtComplex128),
"DT_HALF" => Some(Self::DtHalf),
"DT_RESOURCE" => Some(Self::DtResource),
"DT_VARIANT" => Some(Self::DtVariant),
"DT_UINT32" => Some(Self::DtUint32),
"DT_UINT64" => Some(Self::DtUint64),
"DT_FLOAT8_E5M2" => Some(Self::DtFloat8E5m2),
"DT_FLOAT8_E4M3FN" => Some(Self::DtFloat8E4m3fn),
"DT_FLOAT_REF" => Some(Self::DtFloatRef),
"DT_DOUBLE_REF" => Some(Self::DtDoubleRef),
"DT_INT32_REF" => Some(Self::DtInt32Ref),
"DT_UINT8_REF" => Some(Self::DtUint8Ref),
"DT_INT16_REF" => Some(Self::DtInt16Ref),
"DT_INT8_REF" => Some(Self::DtInt8Ref),
"DT_STRING_REF" => Some(Self::DtStringRef),
"DT_COMPLEX64_REF" => Some(Self::DtComplex64Ref),
"DT_INT64_REF" => Some(Self::DtInt64Ref),
"DT_BOOL_REF" => Some(Self::DtBoolRef),
"DT_QINT8_REF" => Some(Self::DtQint8Ref),
"DT_QUINT8_REF" => Some(Self::DtQuint8Ref),
"DT_QINT32_REF" => Some(Self::DtQint32Ref),
"DT_BFLOAT16_REF" => Some(Self::DtBfloat16Ref),
"DT_QINT16_REF" => Some(Self::DtQint16Ref),
"DT_QUINT16_REF" => Some(Self::DtQuint16Ref),
"DT_UINT16_REF" => Some(Self::DtUint16Ref),
"DT_COMPLEX128_REF" => Some(Self::DtComplex128Ref),
"DT_HALF_REF" => Some(Self::DtHalfRef),
"DT_RESOURCE_REF" => Some(Self::DtResourceRef),
"DT_VARIANT_REF" => Some(Self::DtVariantRef),
"DT_UINT32_REF" => Some(Self::DtUint32Ref),
"DT_UINT64_REF" => Some(Self::DtUint64Ref),
"DT_FLOAT8_E5M2_REF" => Some(Self::DtFloat8E5m2Ref),
"DT_FLOAT8_E4M3FN_REF" => Some(Self::DtFloat8E4m3fnRef),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceHandleProto {
#[prost(string, tag = "1")]
pub device: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub container: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(uint64, tag = "4")]
pub hash_code: u64,
#[prost(string, tag = "5")]
pub maybe_type_name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "6")]
pub dtypes_and_shapes: ::prost::alloc::vec::Vec<
resource_handle_proto::DtypeAndShape,
>,
}
pub mod resource_handle_proto {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DtypeAndShape {
#[prost(enumeration = "super::DataType", tag = "1")]
pub dtype: i32,
#[prost(message, optional, tag = "2")]
pub shape: ::core::option::Option<super::TensorShapeProto>,
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TensorProto {
#[prost(enumeration = "DataType", tag = "1")]
pub dtype: i32,
#[prost(message, optional, tag = "2")]
pub tensor_shape: ::core::option::Option<TensorShapeProto>,
#[prost(int32, tag = "3")]
pub version_number: i32,
#[prost(bytes = "vec", tag = "4")]
pub tensor_content: ::prost::alloc::vec::Vec<u8>,
#[prost(int32, repeated, tag = "13")]
pub half_val: ::prost::alloc::vec::Vec<i32>,
#[prost(float, repeated, tag = "5")]
pub float_val: ::prost::alloc::vec::Vec<f32>,
#[prost(double, repeated, tag = "6")]
pub double_val: ::prost::alloc::vec::Vec<f64>,
#[prost(int32, repeated, tag = "7")]
pub int_val: ::prost::alloc::vec::Vec<i32>,
#[prost(bytes = "vec", repeated, tag = "8")]
pub string_val: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(float, repeated, tag = "9")]
pub scomplex_val: ::prost::alloc::vec::Vec<f32>,
#[prost(int64, repeated, tag = "10")]
pub int64_val: ::prost::alloc::vec::Vec<i64>,
#[prost(bool, repeated, tag = "11")]
pub bool_val: ::prost::alloc::vec::Vec<bool>,
#[prost(double, repeated, tag = "12")]
pub dcomplex_val: ::prost::alloc::vec::Vec<f64>,
#[prost(message, repeated, tag = "14")]
pub resource_handle_val: ::prost::alloc::vec::Vec<ResourceHandleProto>,
#[prost(message, repeated, tag = "15")]
pub variant_val: ::prost::alloc::vec::Vec<VariantTensorDataProto>,
#[prost(uint32, repeated, tag = "16")]
pub uint32_val: ::prost::alloc::vec::Vec<u32>,
#[prost(uint64, repeated, tag = "17")]
pub uint64_val: ::prost::alloc::vec::Vec<u64>,
#[prost(bytes = "vec", tag = "18")]
pub float8_val: ::prost::alloc::vec::Vec<u8>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VariantTensorDataProto {
#[prost(string, tag = "1")]
pub type_name: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub metadata: ::prost::alloc::vec::Vec<u8>,
#[prost(message, repeated, tag = "3")]
pub tensors: ::prost::alloc::vec::Vec<TensorProto>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VarLenFeatureProto {
#[prost(enumeration = "DataType", tag = "1")]
pub dtype: i32,
#[prost(string, tag = "2")]
pub values_output_tensor_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub indices_output_tensor_name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub shapes_output_tensor_name: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FixedLenFeatureProto {
#[prost(enumeration = "DataType", tag = "1")]
pub dtype: i32,
#[prost(message, optional, tag = "2")]
pub shape: ::core::option::Option<TensorShapeProto>,
#[prost(message, optional, tag = "3")]
pub default_value: ::core::option::Option<TensorProto>,
#[prost(string, tag = "4")]
pub values_output_tensor_name: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FeatureConfiguration {
#[prost(oneof = "feature_configuration::Config", tags = "1, 2")]
pub config: ::core::option::Option<feature_configuration::Config>,
}
pub mod feature_configuration {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Config {
#[prost(message, tag = "1")]
FixedLenFeature(super::FixedLenFeatureProto),
#[prost(message, tag = "2")]
VarLenFeature(super::VarLenFeatureProto),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExampleParserConfiguration {
#[prost(map = "string, message", tag = "1")]
pub feature_map: ::std::collections::HashMap<
::prost::alloc::string::String,
FeatureConfiguration,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AllocationDescription {
#[prost(int64, tag = "1")]
pub requested_bytes: i64,
#[prost(int64, tag = "2")]
pub allocated_bytes: i64,
#[prost(string, tag = "3")]
pub allocator_name: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub allocation_id: i64,
#[prost(bool, tag = "5")]
pub has_single_reference: bool,
#[prost(uint64, tag = "6")]
pub ptr: u64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttrValue {
#[prost(oneof = "attr_value::Value", tags = "2, 3, 4, 5, 6, 7, 8, 1, 10, 9")]
pub value: ::core::option::Option<attr_value::Value>,
}
pub mod attr_value {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListValue {
#[prost(bytes = "vec", repeated, tag = "2")]
pub s: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
#[prost(int64, repeated, tag = "3")]
pub i: ::prost::alloc::vec::Vec<i64>,
#[prost(float, repeated, tag = "4")]
pub f: ::prost::alloc::vec::Vec<f32>,
#[prost(bool, repeated, tag = "5")]
pub b: ::prost::alloc::vec::Vec<bool>,
#[prost(enumeration = "super::DataType", repeated, tag = "6")]
pub r#type: ::prost::alloc::vec::Vec<i32>,
#[prost(message, repeated, tag = "7")]
pub shape: ::prost::alloc::vec::Vec<super::TensorShapeProto>,
#[prost(message, repeated, tag = "8")]
pub tensor: ::prost::alloc::vec::Vec<super::TensorProto>,
#[prost(message, repeated, tag = "9")]
pub func: ::prost::alloc::vec::Vec<super::NameAttrList>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
#[prost(bytes, tag = "2")]
S(::prost::alloc::vec::Vec<u8>),
#[prost(int64, tag = "3")]
I(i64),
#[prost(float, tag = "4")]
F(f32),
#[prost(bool, tag = "5")]
B(bool),
#[prost(enumeration = "super::DataType", tag = "6")]
Type(i32),
#[prost(message, tag = "7")]
Shape(super::TensorShapeProto),
#[prost(message, tag = "8")]
Tensor(super::TensorProto),
#[prost(message, tag = "1")]
List(ListValue),
#[prost(message, tag = "10")]
Func(super::NameAttrList),
#[prost(string, tag = "9")]
Placeholder(::prost::alloc::string::String),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NameAttrList {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "2")]
pub attr: ::std::collections::HashMap<::prost::alloc::string::String, AttrValue>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApiDef {
#[prost(string, tag = "1")]
pub graph_op_name: ::prost::alloc::string::String,
#[prost(string, tag = "12")]
pub deprecation_message: ::prost::alloc::string::String,
#[prost(int32, tag = "13")]
pub deprecation_version: i32,
#[prost(enumeration = "api_def::Visibility", tag = "2")]
pub visibility: i32,
#[prost(message, repeated, tag = "3")]
pub endpoint: ::prost::alloc::vec::Vec<api_def::Endpoint>,
#[prost(message, repeated, tag = "4")]
pub in_arg: ::prost::alloc::vec::Vec<api_def::Arg>,
#[prost(message, repeated, tag = "5")]
pub out_arg: ::prost::alloc::vec::Vec<api_def::Arg>,
#[prost(string, repeated, tag = "11")]
pub arg_order: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "6")]
pub attr: ::prost::alloc::vec::Vec<api_def::Attr>,
#[prost(string, tag = "7")]
pub summary: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub description_prefix: ::prost::alloc::string::String,
#[prost(string, tag = "10")]
pub description_suffix: ::prost::alloc::string::String,
}
pub mod api_def {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Endpoint {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(bool, tag = "3")]
pub deprecated: bool,
#[prost(int32, tag = "4")]
pub deprecation_version: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Arg {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub rename_to: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Attr {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub rename_to: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub default_value: ::core::option::Option<super::AttrValue>,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Visibility {
DefaultVisibility = 0,
Visible = 1,
Skip = 2,
Hidden = 3,
}
impl Visibility {
pub fn as_str_name(&self) -> &'static str {
match self {
Visibility::DefaultVisibility => "DEFAULT_VISIBILITY",
Visibility::Visible => "VISIBLE",
Visibility::Skip => "SKIP",
Visibility::Hidden => "HIDDEN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DEFAULT_VISIBILITY" => Some(Self::DefaultVisibility),
"VISIBLE" => Some(Self::Visible),
"SKIP" => Some(Self::Skip),
"HIDDEN" => Some(Self::Hidden),
_ => None,
}
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApiDefs {
#[prost(message, repeated, tag = "1")]
pub op: ::prost::alloc::vec::Vec<ApiDef>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CostGraphDef {
#[prost(message, repeated, tag = "1")]
pub node: ::prost::alloc::vec::Vec<cost_graph_def::Node>,
#[prost(message, repeated, tag = "2")]
pub cost: ::prost::alloc::vec::Vec<cost_graph_def::AggregatedCost>,
}
pub mod cost_graph_def {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Node {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub device: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub id: i32,
#[prost(message, repeated, tag = "4")]
pub input_info: ::prost::alloc::vec::Vec<node::InputInfo>,
#[prost(message, repeated, tag = "5")]
pub output_info: ::prost::alloc::vec::Vec<node::OutputInfo>,
#[prost(int64, tag = "6")]
pub temporary_memory_size: i64,
#[prost(int64, tag = "12")]
pub persistent_memory_size: i64,
#[deprecated]
#[prost(int64, tag = "10")]
pub host_temp_memory_size: i64,
#[deprecated]
#[prost(int64, tag = "11")]
pub device_temp_memory_size: i64,
#[deprecated]
#[prost(int64, tag = "16")]
pub device_persistent_memory_size: i64,
#[prost(int64, tag = "9")]
pub compute_cost: i64,
#[prost(int64, tag = "14")]
pub compute_time: i64,
#[prost(int64, tag = "15")]
pub memory_time: i64,
#[prost(bool, tag = "7")]
pub is_final: bool,
#[prost(int32, repeated, tag = "8")]
pub control_input: ::prost::alloc::vec::Vec<i32>,
#[prost(bool, tag = "17")]
pub inaccurate: bool,
}
pub mod node {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InputInfo {
#[prost(int32, tag = "1")]
pub preceding_node: i32,
#[prost(int32, tag = "2")]
pub preceding_port: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutputInfo {
#[prost(int64, tag = "1")]
pub size: i64,
#[prost(int64, tag = "2")]
pub alias_input_port: i64,
#[prost(message, optional, tag = "3")]
pub shape: ::core::option::Option<super::super::TensorShapeProto>,
#[prost(enumeration = "super::super::DataType", tag = "4")]
pub dtype: i32,
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AggregatedCost {
#[prost(float, tag = "1")]
pub cost: f32,
#[prost(string, tag = "2")]
pub dimension: ::prost::alloc::string::String,
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InterconnectLink {
#[prost(int32, tag = "1")]
pub device_id: i32,
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub strength: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocalLinks {
#[prost(message, repeated, tag = "1")]
pub link: ::prost::alloc::vec::Vec<InterconnectLink>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceLocality {
#[prost(int32, tag = "1")]
pub bus_id: i32,
#[prost(int32, tag = "2")]
pub numa_node: i32,
#[prost(message, optional, tag = "3")]
pub links: ::core::option::Option<LocalLinks>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceAttributes {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub device_type: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub memory_limit: i64,
#[prost(message, optional, tag = "5")]
pub locality: ::core::option::Option<DeviceLocality>,
#[prost(fixed64, tag = "6")]
pub incarnation: u64,
#[prost(string, tag = "7")]
pub physical_device_desc: ::prost::alloc::string::String,
#[prost(int64, tag = "8")]
pub xla_global_id: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FullTypeDef {
#[prost(enumeration = "FullTypeId", tag = "1")]
pub type_id: i32,
#[prost(message, repeated, tag = "2")]
pub args: ::prost::alloc::vec::Vec<FullTypeDef>,
#[prost(oneof = "full_type_def::Attr", tags = "3, 4")]
pub attr: ::core::option::Option<full_type_def::Attr>,
}
pub mod full_type_def {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Attr {
#[prost(string, tag = "3")]
S(::prost::alloc::string::String),
#[prost(int64, tag = "4")]
I(i64),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FullTypeId {
TftUnset = 0,
TftVar = 1,
TftAny = 2,
TftProduct = 3,
TftNamed = 4,
TftForEach = 20,
TftCallable = 100,
TftTensor = 1000,
TftArray = 1001,
TftOptional = 1002,
TftLiteral = 1003,
TftEncoded = 1004,
TftShapeTensor = 1005,
TftBool = 200,
TftUint8 = 201,
TftUint16 = 202,
TftUint32 = 203,
TftUint64 = 204,
TftInt8 = 205,
TftInt16 = 206,
TftInt32 = 207,
TftInt64 = 208,
TftHalf = 209,
TftFloat = 210,
TftDouble = 211,
TftBfloat16 = 215,
TftComplex64 = 212,
TftComplex128 = 213,
TftString = 214,
TftDataset = 10102,
TftRagged = 10103,
TftIterator = 10104,
TftMutexLock = 10202,
TftLegacyVariant = 10203,
}
impl FullTypeId {
pub fn as_str_name(&self) -> &'static str {
match self {
FullTypeId::TftUnset => "TFT_UNSET",
FullTypeId::TftVar => "TFT_VAR",
FullTypeId::TftAny => "TFT_ANY",
FullTypeId::TftProduct => "TFT_PRODUCT",
FullTypeId::TftNamed => "TFT_NAMED",
FullTypeId::TftForEach => "TFT_FOR_EACH",
FullTypeId::TftCallable => "TFT_CALLABLE",
FullTypeId::TftTensor => "TFT_TENSOR",
FullTypeId::TftArray => "TFT_ARRAY",
FullTypeId::TftOptional => "TFT_OPTIONAL",
FullTypeId::TftLiteral => "TFT_LITERAL",
FullTypeId::TftEncoded => "TFT_ENCODED",
FullTypeId::TftShapeTensor => "TFT_SHAPE_TENSOR",
FullTypeId::TftBool => "TFT_BOOL",
FullTypeId::TftUint8 => "TFT_UINT8",
FullTypeId::TftUint16 => "TFT_UINT16",
FullTypeId::TftUint32 => "TFT_UINT32",
FullTypeId::TftUint64 => "TFT_UINT64",
FullTypeId::TftInt8 => "TFT_INT8",
FullTypeId::TftInt16 => "TFT_INT16",
FullTypeId::TftInt32 => "TFT_INT32",
FullTypeId::TftInt64 => "TFT_INT64",
FullTypeId::TftHalf => "TFT_HALF",
FullTypeId::TftFloat => "TFT_FLOAT",
FullTypeId::TftDouble => "TFT_DOUBLE",
FullTypeId::TftBfloat16 => "TFT_BFLOAT16",
FullTypeId::TftComplex64 => "TFT_COMPLEX64",
FullTypeId::TftComplex128 => "TFT_COMPLEX128",
FullTypeId::TftString => "TFT_STRING",
FullTypeId::TftDataset => "TFT_DATASET",
FullTypeId::TftRagged => "TFT_RAGGED",
FullTypeId::TftIterator => "TFT_ITERATOR",
FullTypeId::TftMutexLock => "TFT_MUTEX_LOCK",
FullTypeId::TftLegacyVariant => "TFT_LEGACY_VARIANT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TFT_UNSET" => Some(Self::TftUnset),
"TFT_VAR" => Some(Self::TftVar),
"TFT_ANY" => Some(Self::TftAny),
"TFT_PRODUCT" => Some(Self::TftProduct),
"TFT_NAMED" => Some(Self::TftNamed),
"TFT_FOR_EACH" => Some(Self::TftForEach),
"TFT_CALLABLE" => Some(Self::TftCallable),
"TFT_TENSOR" => Some(Self::TftTensor),
"TFT_ARRAY" => Some(Self::TftArray),
"TFT_OPTIONAL" => Some(Self::TftOptional),
"TFT_LITERAL" => Some(Self::TftLiteral),
"TFT_ENCODED" => Some(Self::TftEncoded),
"TFT_SHAPE_TENSOR" => Some(Self::TftShapeTensor),
"TFT_BOOL" => Some(Self::TftBool),
"TFT_UINT8" => Some(Self::TftUint8),
"TFT_UINT16" => Some(Self::TftUint16),
"TFT_UINT32" => Some(Self::TftUint32),
"TFT_UINT64" => Some(Self::TftUint64),
"TFT_INT8" => Some(Self::TftInt8),
"TFT_INT16" => Some(Self::TftInt16),
"TFT_INT32" => Some(Self::TftInt32),
"TFT_INT64" => Some(Self::TftInt64),
"TFT_HALF" => Some(Self::TftHalf),
"TFT_FLOAT" => Some(Self::TftFloat),
"TFT_DOUBLE" => Some(Self::TftDouble),
"TFT_BFLOAT16" => Some(Self::TftBfloat16),
"TFT_COMPLEX64" => Some(Self::TftComplex64),
"TFT_COMPLEX128" => Some(Self::TftComplex128),
"TFT_STRING" => Some(Self::TftString),
"TFT_DATASET" => Some(Self::TftDataset),
"TFT_RAGGED" => Some(Self::TftRagged),
"TFT_ITERATOR" => Some(Self::TftIterator),
"TFT_MUTEX_LOCK" => Some(Self::TftMutexLock),
"TFT_LEGACY_VARIANT" => Some(Self::TftLegacyVariant),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeDef {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub op: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub input: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "4")]
pub device: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "5")]
pub attr: ::std::collections::HashMap<::prost::alloc::string::String, AttrValue>,
#[prost(message, optional, tag = "6")]
pub experimental_debug_info: ::core::option::Option<node_def::ExperimentalDebugInfo>,
#[prost(message, optional, tag = "7")]
pub experimental_type: ::core::option::Option<FullTypeDef>,
}
pub mod node_def {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExperimentalDebugInfo {
#[prost(string, repeated, tag = "1")]
pub original_node_names: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(string, repeated, tag = "2")]
pub original_func_names: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpDef {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub input_arg: ::prost::alloc::vec::Vec<op_def::ArgDef>,
#[prost(message, repeated, tag = "3")]
pub output_arg: ::prost::alloc::vec::Vec<op_def::ArgDef>,
#[prost(string, repeated, tag = "20")]
pub control_output: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "4")]
pub attr: ::prost::alloc::vec::Vec<op_def::AttrDef>,
#[prost(message, optional, tag = "8")]
pub deprecation: ::core::option::Option<OpDeprecation>,
#[prost(string, tag = "5")]
pub summary: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub description: ::prost::alloc::string::String,
#[prost(bool, tag = "18")]
pub is_commutative: bool,
#[prost(bool, tag = "16")]
pub is_aggregate: bool,
#[prost(bool, tag = "17")]
pub is_stateful: bool,
#[prost(bool, tag = "19")]
pub allows_uninitialized_input: bool,
#[prost(bool, tag = "21")]
pub is_distributed_communication: bool,
}
pub mod op_def {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArgDef {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(enumeration = "super::DataType", tag = "3")]
pub r#type: i32,
#[prost(string, tag = "4")]
pub type_attr: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub number_attr: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub type_list_attr: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "7")]
pub handle_data: ::prost::alloc::vec::Vec<
super::resource_handle_proto::DtypeAndShape,
>,
#[prost(bool, tag = "16")]
pub is_ref: bool,
#[prost(message, optional, tag = "17")]
pub experimental_full_type: ::core::option::Option<super::FullTypeDef>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttrDef {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub r#type: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub default_value: ::core::option::Option<super::AttrValue>,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(bool, tag = "5")]
pub has_minimum: bool,
#[prost(int64, tag = "6")]
pub minimum: i64,
#[prost(message, optional, tag = "7")]
pub allowed_values: ::core::option::Option<super::AttrValue>,
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpDeprecation {
#[prost(int32, tag = "1")]
pub version: i32,
#[prost(string, tag = "2")]
pub explanation: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpList {
#[prost(message, repeated, tag = "1")]
pub op: ::prost::alloc::vec::Vec<OpDef>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FunctionDefLibrary {
#[prost(message, repeated, tag = "1")]
pub function: ::prost::alloc::vec::Vec<FunctionDef>,
#[prost(message, repeated, tag = "2")]
pub gradient: ::prost::alloc::vec::Vec<GradientDef>,
#[prost(message, repeated, tag = "3")]
pub registered_gradients: ::prost::alloc::vec::Vec<RegisteredGradient>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FunctionDef {
#[prost(message, optional, tag = "1")]
pub signature: ::core::option::Option<OpDef>,
#[prost(map = "string, message", tag = "5")]
pub attr: ::std::collections::HashMap<::prost::alloc::string::String, AttrValue>,
#[prost(map = "uint32, message", tag = "7")]
pub arg_attr: ::std::collections::HashMap<u32, function_def::ArgAttrs>,
#[prost(map = "uint32, uint32", tag = "8")]
pub resource_arg_unique_id: ::std::collections::HashMap<u32, u32>,
#[prost(message, repeated, tag = "3")]
pub node_def: ::prost::alloc::vec::Vec<NodeDef>,
#[prost(map = "string, string", tag = "4")]
pub ret: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(map = "string, string", tag = "6")]
pub control_ret: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
pub mod function_def {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArgAttrs {
#[prost(map = "string, message", tag = "1")]
pub attr: ::std::collections::HashMap<
::prost::alloc::string::String,
super::AttrValue,
>,
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GradientDef {
#[prost(string, tag = "1")]
pub function_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub gradient_func: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisteredGradient {
#[prost(string, tag = "1")]
pub gradient_func: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub registered_op_type: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GraphDebugInfo {
#[prost(string, repeated, tag = "1")]
pub files: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, message", tag = "2")]
pub traces: ::std::collections::HashMap<
::prost::alloc::string::String,
graph_debug_info::StackTrace,
>,
}
pub mod graph_debug_info {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileLineCol {
#[prost(int32, tag = "1")]
pub file_index: i32,
#[prost(int32, tag = "2")]
pub line: i32,
#[prost(int32, tag = "3")]
pub col: i32,
#[prost(string, tag = "4")]
pub func: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub code: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StackTrace {
#[prost(message, repeated, tag = "1")]
pub file_line_cols: ::prost::alloc::vec::Vec<FileLineCol>,
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VersionDef {
#[prost(int32, tag = "1")]
pub producer: i32,
#[prost(int32, tag = "2")]
pub min_consumer: i32,
#[prost(int32, repeated, tag = "3")]
pub bad_consumers: ::prost::alloc::vec::Vec<i32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GraphDef {
#[prost(message, repeated, tag = "1")]
pub node: ::prost::alloc::vec::Vec<NodeDef>,
#[prost(message, optional, tag = "4")]
pub versions: ::core::option::Option<VersionDef>,
#[deprecated]
#[prost(int32, tag = "3")]
pub version: i32,
#[prost(message, optional, tag = "2")]
pub library: ::core::option::Option<FunctionDefLibrary>,
#[prost(message, optional, tag = "5")]
pub debug_info: ::core::option::Option<GraphDebugInfo>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GraphTransferNodeInput {
#[prost(int32, tag = "1")]
pub node_id: i32,
#[prost(int32, tag = "2")]
pub output_port: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GraphTransferNodeInfo {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub node_id: i32,
#[prost(string, tag = "3")]
pub type_name: ::prost::alloc::string::String,
#[prost(int32, tag = "4")]
pub soc_op_id: i32,
#[prost(int32, tag = "5")]
pub padding_id: i32,
#[prost(int32, tag = "6")]
pub input_count: i32,
#[prost(int32, tag = "7")]
pub output_count: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GraphTransferConstNodeInfo {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub node_id: i32,
#[prost(int64, repeated, tag = "3")]
pub shape: ::prost::alloc::vec::Vec<i64>,
#[prost(bytes = "vec", tag = "4")]
pub data: ::prost::alloc::vec::Vec<u8>,
#[prost(enumeration = "DataType", tag = "5")]
pub dtype: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GraphTransferNodeInputInfo {
#[prost(int32, tag = "1")]
pub node_id: i32,
#[prost(message, repeated, tag = "2")]
pub node_input: ::prost::alloc::vec::Vec<GraphTransferNodeInput>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GraphTransferNodeOutputInfo {
#[prost(int32, tag = "1")]
pub node_id: i32,
#[prost(int32, repeated, tag = "2")]
pub max_byte_size: ::prost::alloc::vec::Vec<i32>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GraphTransferGraphInputNodeInfo {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(int64, repeated, tag = "2")]
pub shape: ::prost::alloc::vec::Vec<i64>,
#[prost(enumeration = "DataType", tag = "3")]
pub dtype: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GraphTransferGraphOutputNodeInfo {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(int64, repeated, tag = "2")]
pub shape: ::prost::alloc::vec::Vec<i64>,
#[prost(enumeration = "DataType", tag = "3")]
pub dtype: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GraphTransferInfo {
#[prost(message, repeated, tag = "1")]
pub node_info: ::prost::alloc::vec::Vec<GraphTransferNodeInfo>,
#[prost(message, repeated, tag = "2")]
pub const_node_info: ::prost::alloc::vec::Vec<GraphTransferConstNodeInfo>,
#[prost(message, repeated, tag = "3")]
pub node_input_info: ::prost::alloc::vec::Vec<GraphTransferNodeInputInfo>,
#[prost(message, repeated, tag = "4")]
pub node_output_info: ::prost::alloc::vec::Vec<GraphTransferNodeOutputInfo>,
#[prost(message, repeated, tag = "5")]
pub graph_input_node_info: ::prost::alloc::vec::Vec<GraphTransferGraphInputNodeInfo>,
#[prost(message, repeated, tag = "6")]
pub graph_output_node_info: ::prost::alloc::vec::Vec<
GraphTransferGraphOutputNodeInfo,
>,
#[prost(enumeration = "graph_transfer_info::Destination", tag = "7")]
pub destination: i32,
}
pub mod graph_transfer_info {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Destination {
Nop = 0,
Hexagon = 1,
}
impl Destination {
pub fn as_str_name(&self) -> &'static str {
match self {
Destination::Nop => "NOP",
Destination::Hexagon => "HEXAGON",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"NOP" => Some(Self::Nop),
"HEXAGON" => Some(Self::Hexagon),
_ => None,
}
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KernelDef {
#[prost(string, tag = "1")]
pub op: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub device_type: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub constraint: ::prost::alloc::vec::Vec<kernel_def::AttrConstraint>,
#[prost(string, repeated, tag = "4")]
pub host_memory_arg: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "5")]
pub label: ::prost::alloc::string::String,
#[prost(int32, tag = "6")]
pub priority: i32,
}
pub mod kernel_def {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AttrConstraint {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub allowed_values: ::core::option::Option<super::AttrValue>,
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KernelList {
#[prost(message, repeated, tag = "1")]
pub kernel: ::prost::alloc::vec::Vec<KernelDef>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TensorDescription {
#[prost(enumeration = "DataType", tag = "1")]
pub dtype: i32,
#[prost(message, optional, tag = "2")]
pub shape: ::core::option::Option<TensorShapeProto>,
#[prost(message, optional, tag = "4")]
pub allocation_description: ::core::option::Option<AllocationDescription>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemoryLogStep {
#[prost(int64, tag = "1")]
pub step_id: i64,
#[prost(string, tag = "2")]
pub handle: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemoryLogTensorAllocation {
#[prost(int64, tag = "1")]
pub step_id: i64,
#[prost(string, tag = "2")]
pub kernel_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub tensor: ::core::option::Option<TensorDescription>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemoryLogTensorDeallocation {
#[prost(int64, tag = "1")]
pub allocation_id: i64,
#[prost(string, tag = "2")]
pub allocator_name: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemoryLogTensorOutput {
#[prost(int64, tag = "1")]
pub step_id: i64,
#[prost(string, tag = "2")]
pub kernel_name: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub index: i32,
#[prost(message, optional, tag = "4")]
pub tensor: ::core::option::Option<TensorDescription>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemoryLogRawAllocation {
#[prost(int64, tag = "1")]
pub step_id: i64,
#[prost(string, tag = "2")]
pub operation: ::prost::alloc::string::String,
#[prost(int64, tag = "3")]
pub num_bytes: i64,
#[prost(uint64, tag = "4")]
pub ptr: u64,
#[prost(int64, tag = "5")]
pub allocation_id: i64,
#[prost(string, tag = "6")]
pub allocator_name: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemoryLogRawDeallocation {
#[prost(int64, tag = "1")]
pub step_id: i64,
#[prost(string, tag = "2")]
pub operation: ::prost::alloc::string::String,
#[prost(int64, tag = "3")]
pub allocation_id: i64,
#[prost(string, tag = "4")]
pub allocator_name: ::prost::alloc::string::String,
#[prost(bool, tag = "5")]
pub deferred: bool,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OptimizedFunctionGraph {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub function_graph: ::core::option::Option<GraphDef>,
#[prost(map = "string, string", tag = "3")]
pub node_name_to_control_ret: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(enumeration = "DataType", repeated, tag = "4")]
pub ret_types: ::prost::alloc::vec::Vec<i32>,
#[prost(uint32, tag = "5")]
pub num_return_nodes: u32,
#[prost(
enumeration = "optimized_function_graph::OptimizationSource",
optional,
tag = "7"
)]
pub source: ::core::option::Option<i32>,
#[prost(uint64, optional, tag = "8")]
pub optimization_time_usecs: ::core::option::Option<u64>,
}
pub mod optimized_function_graph {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum OptimizationSource {
SourceUnspecified = 0,
Aot = 1,
Jit = 2,
}
impl OptimizationSource {
pub fn as_str_name(&self) -> &'static str {
match self {
OptimizationSource::SourceUnspecified => "SOURCE_UNSPECIFIED",
OptimizationSource::Aot => "AOT",
OptimizationSource::Jit => "JIT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SOURCE_UNSPECIFIED" => Some(Self::SourceUnspecified),
"AOT" => Some(Self::Aot),
"JIT" => Some(Self::Jit),
_ => None,
}
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReaderBaseState {
#[prost(int64, tag = "1")]
pub work_started: i64,
#[prost(int64, tag = "2")]
pub work_finished: i64,
#[prost(int64, tag = "3")]
pub num_records_produced: i64,
#[prost(bytes = "vec", tag = "4")]
pub current_work: ::prost::alloc::vec::Vec<u8>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AllocationRecord {
#[prost(int64, tag = "1")]
pub alloc_micros: i64,
#[prost(int64, tag = "2")]
pub alloc_bytes: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AllocatorMemoryUsed {
#[prost(string, tag = "1")]
pub allocator_name: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub total_bytes: i64,
#[prost(int64, tag = "3")]
pub peak_bytes: i64,
#[prost(int64, tag = "4")]
pub live_bytes: i64,
#[prost(message, repeated, tag = "6")]
pub allocation_records: ::prost::alloc::vec::Vec<AllocationRecord>,
#[prost(int64, tag = "5")]
pub allocator_bytes_in_use: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeOutput {
#[prost(int32, tag = "1")]
pub slot: i32,
#[prost(message, optional, tag = "3")]
pub tensor_description: ::core::option::Option<TensorDescription>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MemoryStats {
#[prost(int64, tag = "1")]
pub temp_memory_size: i64,
#[prost(int64, tag = "3")]
pub persistent_memory_size: i64,
#[prost(int64, repeated, tag = "5")]
pub persistent_tensor_alloc_ids: ::prost::alloc::vec::Vec<i64>,
#[deprecated]
#[prost(int64, tag = "2")]
pub device_temp_memory_size: i64,
#[deprecated]
#[prost(int64, tag = "4")]
pub device_persistent_memory_size: i64,
#[deprecated]
#[prost(int64, repeated, packed = "false", tag = "6")]
pub device_persistent_tensor_alloc_ids: ::prost::alloc::vec::Vec<i64>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NodeExecStats {
#[prost(string, tag = "1")]
pub node_name: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub all_start_micros: i64,
#[prost(int64, tag = "3")]
pub op_start_rel_micros: i64,
#[prost(int64, tag = "4")]
pub op_end_rel_micros: i64,
#[prost(int64, tag = "5")]
pub all_end_rel_micros: i64,
#[prost(message, repeated, tag = "6")]
pub memory: ::prost::alloc::vec::Vec<AllocatorMemoryUsed>,
#[prost(message, repeated, tag = "7")]
pub output: ::prost::alloc::vec::Vec<NodeOutput>,
#[prost(string, tag = "8")]
pub timeline_label: ::prost::alloc::string::String,
#[prost(int64, tag = "9")]
pub scheduled_micros: i64,
#[prost(uint32, tag = "10")]
pub thread_id: u32,
#[prost(message, repeated, tag = "11")]
pub referenced_tensor: ::prost::alloc::vec::Vec<AllocationDescription>,
#[prost(message, optional, tag = "12")]
pub memory_stats: ::core::option::Option<MemoryStats>,
#[prost(int64, tag = "13")]
pub all_start_nanos: i64,
#[prost(int64, tag = "14")]
pub op_start_rel_nanos: i64,
#[prost(int64, tag = "15")]
pub op_end_rel_nanos: i64,
#[prost(int64, tag = "16")]
pub all_end_rel_nanos: i64,
#[prost(int64, tag = "17")]
pub scheduled_nanos: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeviceStepStats {
#[prost(string, tag = "1")]
pub device: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub node_stats: ::prost::alloc::vec::Vec<NodeExecStats>,
#[prost(map = "uint32, string", tag = "3")]
pub thread_names: ::std::collections::HashMap<u32, ::prost::alloc::string::String>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StepStats {
#[prost(message, repeated, tag = "1")]
pub dev_stats: ::prost::alloc::vec::Vec<DeviceStepStats>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistogramProto {
#[prost(double, tag = "1")]
pub min: f64,
#[prost(double, tag = "2")]
pub max: f64,
#[prost(double, tag = "3")]
pub num: f64,
#[prost(double, tag = "4")]
pub sum: f64,
#[prost(double, tag = "5")]
pub sum_squares: f64,
#[prost(double, repeated, tag = "6")]
pub bucket_limit: ::prost::alloc::vec::Vec<f64>,
#[prost(double, repeated, tag = "7")]
pub bucket: ::prost::alloc::vec::Vec<f64>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SummaryDescription {
#[prost(string, tag = "1")]
pub type_hint: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SummaryMetadata {
#[prost(message, optional, tag = "1")]
pub plugin_data: ::core::option::Option<summary_metadata::PluginData>,
#[prost(string, tag = "2")]
pub display_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub summary_description: ::prost::alloc::string::String,
#[prost(enumeration = "DataClass", tag = "4")]
pub data_class: i32,
}
pub mod summary_metadata {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PluginData {
#[prost(string, tag = "1")]
pub plugin_name: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub content: ::prost::alloc::vec::Vec<u8>,
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Summary {
#[prost(message, repeated, tag = "1")]
pub value: ::prost::alloc::vec::Vec<summary::Value>,
}
pub mod summary {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Image {
#[prost(int32, tag = "1")]
pub height: i32,
#[prost(int32, tag = "2")]
pub width: i32,
#[prost(int32, tag = "3")]
pub colorspace: i32,
#[prost(bytes = "vec", tag = "4")]
pub encoded_image_string: ::prost::alloc::vec::Vec<u8>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Audio {
#[prost(float, tag = "1")]
pub sample_rate: f32,
#[prost(int64, tag = "2")]
pub num_channels: i64,
#[prost(int64, tag = "3")]
pub length_frames: i64,
#[prost(bytes = "vec", tag = "4")]
pub encoded_audio_string: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag = "5")]
pub content_type: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Value {
#[prost(string, tag = "7")]
pub node_name: ::prost::alloc::string::String,
#[prost(string, tag = "1")]
pub tag: ::prost::alloc::string::String,
#[prost(message, optional, tag = "9")]
pub metadata: ::core::option::Option<super::SummaryMetadata>,
#[prost(oneof = "value::Value", tags = "2, 3, 4, 5, 6, 8")]
pub value: ::core::option::Option<value::Value>,
}
pub mod value {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
#[prost(float, tag = "2")]
SimpleValue(f32),
#[prost(bytes, tag = "3")]
ObsoleteOldStyleHistogram(::prost::alloc::vec::Vec<u8>),
#[prost(message, tag = "4")]
Image(super::Image),
#[prost(message, tag = "5")]
Histo(super::super::HistogramProto),
#[prost(message, tag = "6")]
Audio(super::Audio),
#[prost(message, tag = "8")]
Tensor(super::super::TensorProto),
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DataClass {
Unknown = 0,
Scalar = 1,
Tensor = 2,
BlobSequence = 3,
}
impl DataClass {
pub fn as_str_name(&self) -> &'static str {
match self {
DataClass::Unknown => "DATA_CLASS_UNKNOWN",
DataClass::Scalar => "DATA_CLASS_SCALAR",
DataClass::Tensor => "DATA_CLASS_TENSOR",
DataClass::BlobSequence => "DATA_CLASS_BLOB_SEQUENCE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DATA_CLASS_UNKNOWN" => Some(Self::Unknown),
"DATA_CLASS_SCALAR" => Some(Self::Scalar),
"DATA_CLASS_TENSOR" => Some(Self::Tensor),
"DATA_CLASS_BLOB_SEQUENCE" => Some(Self::BlobSequence),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TensorSliceProto {
#[prost(message, repeated, tag = "1")]
pub extent: ::prost::alloc::vec::Vec<tensor_slice_proto::Extent>,
}
pub mod tensor_slice_proto {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Extent {
#[prost(int64, tag = "1")]
pub start: i64,
#[prost(oneof = "extent::HasLength", tags = "2")]
pub has_length: ::core::option::Option<extent::HasLength>,
}
pub mod extent {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum HasLength {
#[prost(int64, tag = "2")]
Length(i64),
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VariableDef {
#[prost(string, tag = "1")]
pub variable_name: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub initial_value_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub initializer_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub snapshot_name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub save_slice_info_def: ::core::option::Option<SaveSliceInfoDef>,
#[prost(bool, tag = "5")]
pub is_resource: bool,
#[prost(bool, tag = "7")]
pub trainable: bool,
#[prost(enumeration = "VariableSynchronization", tag = "8")]
pub synchronization: i32,
#[prost(enumeration = "VariableAggregation", tag = "9")]
pub aggregation: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SaveSliceInfoDef {
#[prost(string, tag = "1")]
pub full_name: ::prost::alloc::string::String,
#[prost(int64, repeated, tag = "2")]
pub full_shape: ::prost::alloc::vec::Vec<i64>,
#[prost(int64, repeated, tag = "3")]
pub var_offset: ::prost::alloc::vec::Vec<i64>,
#[prost(int64, repeated, tag = "4")]
pub var_shape: ::prost::alloc::vec::Vec<i64>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum VariableSynchronization {
Auto = 0,
None = 1,
OnWrite = 2,
OnRead = 3,
}
impl VariableSynchronization {
pub fn as_str_name(&self) -> &'static str {
match self {
VariableSynchronization::Auto => "VARIABLE_SYNCHRONIZATION_AUTO",
VariableSynchronization::None => "VARIABLE_SYNCHRONIZATION_NONE",
VariableSynchronization::OnWrite => "VARIABLE_SYNCHRONIZATION_ON_WRITE",
VariableSynchronization::OnRead => "VARIABLE_SYNCHRONIZATION_ON_READ",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VARIABLE_SYNCHRONIZATION_AUTO" => Some(Self::Auto),
"VARIABLE_SYNCHRONIZATION_NONE" => Some(Self::None),
"VARIABLE_SYNCHRONIZATION_ON_WRITE" => Some(Self::OnWrite),
"VARIABLE_SYNCHRONIZATION_ON_READ" => Some(Self::OnRead),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum VariableAggregation {
None = 0,
Sum = 1,
Mean = 2,
OnlyFirstReplica = 3,
}
impl VariableAggregation {
pub fn as_str_name(&self) -> &'static str {
match self {
VariableAggregation::None => "VARIABLE_AGGREGATION_NONE",
VariableAggregation::Sum => "VARIABLE_AGGREGATION_SUM",
VariableAggregation::Mean => "VARIABLE_AGGREGATION_MEAN",
VariableAggregation::OnlyFirstReplica => {
"VARIABLE_AGGREGATION_ONLY_FIRST_REPLICA"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VARIABLE_AGGREGATION_NONE" => Some(Self::None),
"VARIABLE_AGGREGATION_SUM" => Some(Self::Sum),
"VARIABLE_AGGREGATION_MEAN" => Some(Self::Mean),
"VARIABLE_AGGREGATION_ONLY_FIRST_REPLICA" => Some(Self::OnlyFirstReplica),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Event {
#[prost(double, tag = "1")]
pub wall_time: f64,
#[prost(int64, tag = "2")]
pub step: i64,
#[prost(message, optional, tag = "10")]
pub source_metadata: ::core::option::Option<SourceMetadata>,
#[prost(oneof = "event::What", tags = "3, 4, 5, 6, 7, 8, 9")]
pub what: ::core::option::Option<event::What>,
}
pub mod event {
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum What {
#[prost(string, tag = "3")]
FileVersion(::prost::alloc::string::String),
#[prost(bytes, tag = "4")]
GraphDef(::prost::alloc::vec::Vec<u8>),
#[prost(message, tag = "5")]
Summary(super::Summary),
#[prost(message, tag = "6")]
LogMessage(super::LogMessage),
#[prost(message, tag = "7")]
SessionLog(super::SessionLog),
#[prost(message, tag = "8")]
TaggedRunMetadata(super::TaggedRunMetadata),
#[prost(bytes, tag = "9")]
MetaGraphDef(::prost::alloc::vec::Vec<u8>),
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourceMetadata {
#[prost(string, tag = "1")]
pub writer: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LogMessage {
#[prost(enumeration = "log_message::Level", tag = "1")]
pub level: i32,
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
}
pub mod log_message {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Level {
Unknown = 0,
Debugging = 10,
Info = 20,
Warn = 30,
Error = 40,
Fatal = 50,
}
impl Level {
pub fn as_str_name(&self) -> &'static str {
match self {
Level::Unknown => "UNKNOWN",
Level::Debugging => "DEBUGGING",
Level::Info => "INFO",
Level::Warn => "WARN",
Level::Error => "ERROR",
Level::Fatal => "FATAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"UNKNOWN" => Some(Self::Unknown),
"DEBUGGING" => Some(Self::Debugging),
"INFO" => Some(Self::Info),
"WARN" => Some(Self::Warn),
"ERROR" => Some(Self::Error),
"FATAL" => Some(Self::Fatal),
_ => None,
}
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SessionLog {
#[prost(enumeration = "session_log::SessionStatus", tag = "1")]
pub status: i32,
#[prost(string, tag = "2")]
pub checkpoint_path: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub msg: ::prost::alloc::string::String,
}
pub mod session_log {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SessionStatus {
StatusUnspecified = 0,
Start = 1,
Stop = 2,
Checkpoint = 3,
}
impl SessionStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
SessionStatus::StatusUnspecified => "STATUS_UNSPECIFIED",
SessionStatus::Start => "START",
SessionStatus::Stop => "STOP",
SessionStatus::Checkpoint => "CHECKPOINT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STATUS_UNSPECIFIED" => Some(Self::StatusUnspecified),
"START" => Some(Self::Start),
"STOP" => Some(Self::Stop),
"CHECKPOINT" => Some(Self::Checkpoint),
_ => None,
}
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TaggedRunMetadata {
#[prost(string, tag = "1")]
pub tag: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub run_metadata: ::prost::alloc::vec::Vec<u8>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WatchdogConfig {
#[prost(int64, tag = "1")]
pub timeout_ms: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestedExitCode {
#[prost(int32, tag = "1")]
pub exit_code: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkerHeartbeatRequest {
#[prost(enumeration = "WorkerShutdownMode", tag = "1")]
pub shutdown_mode: i32,
#[prost(message, optional, tag = "2")]
pub watchdog_config: ::core::option::Option<WatchdogConfig>,
#[prost(message, optional, tag = "3")]
pub exit_code: ::core::option::Option<RequestedExitCode>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkerHeartbeatResponse {
#[prost(enumeration = "WorkerHealth", tag = "1")]
pub health_status: i32,
#[prost(message, repeated, tag = "2")]
pub worker_log: ::prost::alloc::vec::Vec<Event>,
#[prost(string, tag = "3")]
pub hostname: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WorkerHealth {
Ok = 0,
ReceivedShutdownSignal = 1,
InternalError = 2,
ShuttingDown = 3,
}
impl WorkerHealth {
pub fn as_str_name(&self) -> &'static str {
match self {
WorkerHealth::Ok => "OK",
WorkerHealth::ReceivedShutdownSignal => "RECEIVED_SHUTDOWN_SIGNAL",
WorkerHealth::InternalError => "INTERNAL_ERROR",
WorkerHealth::ShuttingDown => "SHUTTING_DOWN",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OK" => Some(Self::Ok),
"RECEIVED_SHUTDOWN_SIGNAL" => Some(Self::ReceivedShutdownSignal),
"INTERNAL_ERROR" => Some(Self::InternalError),
"SHUTTING_DOWN" => Some(Self::ShuttingDown),
_ => None,
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WorkerShutdownMode {
Default = 0,
NotConfigured = 1,
WaitForCoordinator = 2,
ShutdownAfterTimeout = 3,
}
impl WorkerShutdownMode {
pub fn as_str_name(&self) -> &'static str {
match self {
WorkerShutdownMode::Default => "DEFAULT",
WorkerShutdownMode::NotConfigured => "NOT_CONFIGURED",
WorkerShutdownMode::WaitForCoordinator => "WAIT_FOR_COORDINATOR",
WorkerShutdownMode::ShutdownAfterTimeout => "SHUTDOWN_AFTER_TIMEOUT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DEFAULT" => Some(Self::Default),
"NOT_CONFIGURED" => Some(Self::NotConfigured),
"WAIT_FOR_COORDINATOR" => Some(Self::WaitForCoordinator),
"SHUTDOWN_AFTER_TIMEOUT" => Some(Self::ShutdownAfterTimeout),
_ => None,
}
}
}