#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![rustfmt::skip]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_imports)]
#![allow(unused_results)]
#[derive(PartialEq,Clone,Default)]
pub struct EventReply {
pub debug_op_state_changes: ::protobuf::RepeatedField<EventReply_DebugOpStateChange>,
pub tensor: ::protobuf::SingularPtrField<super::tensor::TensorProto>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a EventReply {
fn default() -> &'a EventReply {
<EventReply as ::protobuf::Message>::default_instance()
}
}
impl EventReply {
pub fn new() -> EventReply {
::std::default::Default::default()
}
pub fn get_debug_op_state_changes(&self) -> &[EventReply_DebugOpStateChange] {
&self.debug_op_state_changes
}
pub fn clear_debug_op_state_changes(&mut self) {
self.debug_op_state_changes.clear();
}
pub fn set_debug_op_state_changes(&mut self, v: ::protobuf::RepeatedField<EventReply_DebugOpStateChange>) {
self.debug_op_state_changes = v;
}
pub fn mut_debug_op_state_changes(&mut self) -> &mut ::protobuf::RepeatedField<EventReply_DebugOpStateChange> {
&mut self.debug_op_state_changes
}
pub fn take_debug_op_state_changes(&mut self) -> ::protobuf::RepeatedField<EventReply_DebugOpStateChange> {
::std::mem::replace(&mut self.debug_op_state_changes, ::protobuf::RepeatedField::new())
}
pub fn get_tensor(&self) -> &super::tensor::TensorProto {
self.tensor.as_ref().unwrap_or_else(|| <super::tensor::TensorProto as ::protobuf::Message>::default_instance())
}
pub fn clear_tensor(&mut self) {
self.tensor.clear();
}
pub fn has_tensor(&self) -> bool {
self.tensor.is_some()
}
pub fn set_tensor(&mut self, v: super::tensor::TensorProto) {
self.tensor = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_tensor(&mut self) -> &mut super::tensor::TensorProto {
if self.tensor.is_none() {
self.tensor.set_default();
}
self.tensor.as_mut().unwrap()
}
pub fn take_tensor(&mut self) -> super::tensor::TensorProto {
self.tensor.take().unwrap_or_else(|| super::tensor::TensorProto::new())
}
}
impl ::protobuf::Message for EventReply {
fn is_initialized(&self) -> bool {
for v in &self.debug_op_state_changes {
if !v.is_initialized() {
return false;
}
};
for v in &self.tensor {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.debug_op_state_changes)?;
},
2 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.tensor)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.debug_op_state_changes {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if let Some(ref v) = self.tensor.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
for v in &self.debug_op_state_changes {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
if let Some(ref v) = self.tensor.as_ref() {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> EventReply {
EventReply::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<EventReply_DebugOpStateChange>>(
"debug_op_state_changes",
|m: &EventReply| { &m.debug_op_state_changes },
|m: &mut EventReply| { &mut m.debug_op_state_changes },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::tensor::TensorProto>>(
"tensor",
|m: &EventReply| { &m.tensor },
|m: &mut EventReply| { &mut m.tensor },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<EventReply>(
"EventReply",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static EventReply {
static instance: ::protobuf::rt::LazyV2<EventReply> = ::protobuf::rt::LazyV2::INIT;
instance.get(EventReply::new)
}
}
impl ::protobuf::Clear for EventReply {
fn clear(&mut self) {
self.debug_op_state_changes.clear();
self.tensor.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for EventReply {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EventReply {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct EventReply_DebugOpStateChange {
pub state: EventReply_DebugOpStateChange_State,
pub node_name: ::std::string::String,
pub output_slot: i32,
pub debug_op: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a EventReply_DebugOpStateChange {
fn default() -> &'a EventReply_DebugOpStateChange {
<EventReply_DebugOpStateChange as ::protobuf::Message>::default_instance()
}
}
impl EventReply_DebugOpStateChange {
pub fn new() -> EventReply_DebugOpStateChange {
::std::default::Default::default()
}
pub fn get_state(&self) -> EventReply_DebugOpStateChange_State {
self.state
}
pub fn clear_state(&mut self) {
self.state = EventReply_DebugOpStateChange_State::STATE_UNSPECIFIED;
}
pub fn set_state(&mut self, v: EventReply_DebugOpStateChange_State) {
self.state = v;
}
pub fn get_node_name(&self) -> &str {
&self.node_name
}
pub fn clear_node_name(&mut self) {
self.node_name.clear();
}
pub fn set_node_name(&mut self, v: ::std::string::String) {
self.node_name = v;
}
pub fn mut_node_name(&mut self) -> &mut ::std::string::String {
&mut self.node_name
}
pub fn take_node_name(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.node_name, ::std::string::String::new())
}
pub fn get_output_slot(&self) -> i32 {
self.output_slot
}
pub fn clear_output_slot(&mut self) {
self.output_slot = 0;
}
pub fn set_output_slot(&mut self, v: i32) {
self.output_slot = v;
}
pub fn get_debug_op(&self) -> &str {
&self.debug_op
}
pub fn clear_debug_op(&mut self) {
self.debug_op.clear();
}
pub fn set_debug_op(&mut self, v: ::std::string::String) {
self.debug_op = v;
}
pub fn mut_debug_op(&mut self) -> &mut ::std::string::String {
&mut self.debug_op
}
pub fn take_debug_op(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.debug_op, ::std::string::String::new())
}
}
impl ::protobuf::Message for EventReply_DebugOpStateChange {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.state, 1, &mut self.unknown_fields)?
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.node_name)?;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int32()?;
self.output_slot = tmp;
},
4 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.debug_op)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.state != EventReply_DebugOpStateChange_State::STATE_UNSPECIFIED {
my_size += ::protobuf::rt::enum_size(1, self.state);
}
if !self.node_name.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.node_name);
}
if self.output_slot != 0 {
my_size += ::protobuf::rt::value_size(3, self.output_slot, ::protobuf::wire_format::WireTypeVarint);
}
if !self.debug_op.is_empty() {
my_size += ::protobuf::rt::string_size(4, &self.debug_op);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if self.state != EventReply_DebugOpStateChange_State::STATE_UNSPECIFIED {
os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.state))?;
}
if !self.node_name.is_empty() {
os.write_string(2, &self.node_name)?;
}
if self.output_slot != 0 {
os.write_int32(3, self.output_slot)?;
}
if !self.debug_op.is_empty() {
os.write_string(4, &self.debug_op)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> EventReply_DebugOpStateChange {
EventReply_DebugOpStateChange::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<EventReply_DebugOpStateChange_State>>(
"state",
|m: &EventReply_DebugOpStateChange| { &m.state },
|m: &mut EventReply_DebugOpStateChange| { &mut m.state },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"node_name",
|m: &EventReply_DebugOpStateChange| { &m.node_name },
|m: &mut EventReply_DebugOpStateChange| { &mut m.node_name },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
"output_slot",
|m: &EventReply_DebugOpStateChange| { &m.output_slot },
|m: &mut EventReply_DebugOpStateChange| { &mut m.output_slot },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"debug_op",
|m: &EventReply_DebugOpStateChange| { &m.debug_op },
|m: &mut EventReply_DebugOpStateChange| { &mut m.debug_op },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<EventReply_DebugOpStateChange>(
"EventReply.DebugOpStateChange",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static EventReply_DebugOpStateChange {
static instance: ::protobuf::rt::LazyV2<EventReply_DebugOpStateChange> = ::protobuf::rt::LazyV2::INIT;
instance.get(EventReply_DebugOpStateChange::new)
}
}
impl ::protobuf::Clear for EventReply_DebugOpStateChange {
fn clear(&mut self) {
self.state = EventReply_DebugOpStateChange_State::STATE_UNSPECIFIED;
self.node_name.clear();
self.output_slot = 0;
self.debug_op.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for EventReply_DebugOpStateChange {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EventReply_DebugOpStateChange {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum EventReply_DebugOpStateChange_State {
STATE_UNSPECIFIED = 0,
DISABLED = 1,
READ_ONLY = 2,
READ_WRITE = 3,
}
impl ::protobuf::ProtobufEnum for EventReply_DebugOpStateChange_State {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<EventReply_DebugOpStateChange_State> {
match value {
0 => ::std::option::Option::Some(EventReply_DebugOpStateChange_State::STATE_UNSPECIFIED),
1 => ::std::option::Option::Some(EventReply_DebugOpStateChange_State::DISABLED),
2 => ::std::option::Option::Some(EventReply_DebugOpStateChange_State::READ_ONLY),
3 => ::std::option::Option::Some(EventReply_DebugOpStateChange_State::READ_WRITE),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [EventReply_DebugOpStateChange_State] = &[
EventReply_DebugOpStateChange_State::STATE_UNSPECIFIED,
EventReply_DebugOpStateChange_State::DISABLED,
EventReply_DebugOpStateChange_State::READ_ONLY,
EventReply_DebugOpStateChange_State::READ_WRITE,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new_pb_name::<EventReply_DebugOpStateChange_State>("EventReply.DebugOpStateChange.State", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for EventReply_DebugOpStateChange_State {
}
impl ::std::default::Default for EventReply_DebugOpStateChange_State {
fn default() -> Self {
EventReply_DebugOpStateChange_State::STATE_UNSPECIFIED
}
}
impl ::protobuf::reflect::ProtobufValue for EventReply_DebugOpStateChange_State {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
#[derive(PartialEq,Clone,Default)]
pub struct CallTraceback {
pub call_type: CallTraceback_CallType,
pub call_key: ::std::string::String,
pub origin_stack: ::protobuf::SingularPtrField<super::tfprof_log::CodeDef>,
pub origin_id_to_string: ::std::collections::HashMap<i64, ::std::string::String>,
pub graph_traceback: ::protobuf::SingularPtrField<super::tfprof_log::OpLogProto>,
pub graph_version: i64,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a CallTraceback {
fn default() -> &'a CallTraceback {
<CallTraceback as ::protobuf::Message>::default_instance()
}
}
impl CallTraceback {
pub fn new() -> CallTraceback {
::std::default::Default::default()
}
pub fn get_call_type(&self) -> CallTraceback_CallType {
self.call_type
}
pub fn clear_call_type(&mut self) {
self.call_type = CallTraceback_CallType::UNSPECIFIED;
}
pub fn set_call_type(&mut self, v: CallTraceback_CallType) {
self.call_type = v;
}
pub fn get_call_key(&self) -> &str {
&self.call_key
}
pub fn clear_call_key(&mut self) {
self.call_key.clear();
}
pub fn set_call_key(&mut self, v: ::std::string::String) {
self.call_key = v;
}
pub fn mut_call_key(&mut self) -> &mut ::std::string::String {
&mut self.call_key
}
pub fn take_call_key(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.call_key, ::std::string::String::new())
}
pub fn get_origin_stack(&self) -> &super::tfprof_log::CodeDef {
self.origin_stack.as_ref().unwrap_or_else(|| <super::tfprof_log::CodeDef as ::protobuf::Message>::default_instance())
}
pub fn clear_origin_stack(&mut self) {
self.origin_stack.clear();
}
pub fn has_origin_stack(&self) -> bool {
self.origin_stack.is_some()
}
pub fn set_origin_stack(&mut self, v: super::tfprof_log::CodeDef) {
self.origin_stack = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_origin_stack(&mut self) -> &mut super::tfprof_log::CodeDef {
if self.origin_stack.is_none() {
self.origin_stack.set_default();
}
self.origin_stack.as_mut().unwrap()
}
pub fn take_origin_stack(&mut self) -> super::tfprof_log::CodeDef {
self.origin_stack.take().unwrap_or_else(|| super::tfprof_log::CodeDef::new())
}
pub fn get_origin_id_to_string(&self) -> &::std::collections::HashMap<i64, ::std::string::String> {
&self.origin_id_to_string
}
pub fn clear_origin_id_to_string(&mut self) {
self.origin_id_to_string.clear();
}
pub fn set_origin_id_to_string(&mut self, v: ::std::collections::HashMap<i64, ::std::string::String>) {
self.origin_id_to_string = v;
}
pub fn mut_origin_id_to_string(&mut self) -> &mut ::std::collections::HashMap<i64, ::std::string::String> {
&mut self.origin_id_to_string
}
pub fn take_origin_id_to_string(&mut self) -> ::std::collections::HashMap<i64, ::std::string::String> {
::std::mem::replace(&mut self.origin_id_to_string, ::std::collections::HashMap::new())
}
pub fn get_graph_traceback(&self) -> &super::tfprof_log::OpLogProto {
self.graph_traceback.as_ref().unwrap_or_else(|| <super::tfprof_log::OpLogProto as ::protobuf::Message>::default_instance())
}
pub fn clear_graph_traceback(&mut self) {
self.graph_traceback.clear();
}
pub fn has_graph_traceback(&self) -> bool {
self.graph_traceback.is_some()
}
pub fn set_graph_traceback(&mut self, v: super::tfprof_log::OpLogProto) {
self.graph_traceback = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_graph_traceback(&mut self) -> &mut super::tfprof_log::OpLogProto {
if self.graph_traceback.is_none() {
self.graph_traceback.set_default();
}
self.graph_traceback.as_mut().unwrap()
}
pub fn take_graph_traceback(&mut self) -> super::tfprof_log::OpLogProto {
self.graph_traceback.take().unwrap_or_else(|| super::tfprof_log::OpLogProto::new())
}
pub fn get_graph_version(&self) -> i64 {
self.graph_version
}
pub fn clear_graph_version(&mut self) {
self.graph_version = 0;
}
pub fn set_graph_version(&mut self, v: i64) {
self.graph_version = v;
}
}
impl ::protobuf::Message for CallTraceback {
fn is_initialized(&self) -> bool {
for v in &self.origin_stack {
if !v.is_initialized() {
return false;
}
};
for v in &self.graph_traceback {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.call_type, 1, &mut self.unknown_fields)?
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.call_key)?;
},
3 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.origin_stack)?;
},
4 => {
::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeInt64, ::protobuf::types::ProtobufTypeString>(wire_type, is, &mut self.origin_id_to_string)?;
},
5 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.graph_traceback)?;
},
6 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int64()?;
self.graph_version = tmp;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.call_type != CallTraceback_CallType::UNSPECIFIED {
my_size += ::protobuf::rt::enum_size(1, self.call_type);
}
if !self.call_key.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.call_key);
}
if let Some(ref v) = self.origin_stack.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeInt64, ::protobuf::types::ProtobufTypeString>(4, &self.origin_id_to_string);
if let Some(ref v) = self.graph_traceback.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if self.graph_version != 0 {
my_size += ::protobuf::rt::value_size(6, self.graph_version, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if self.call_type != CallTraceback_CallType::UNSPECIFIED {
os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.call_type))?;
}
if !self.call_key.is_empty() {
os.write_string(2, &self.call_key)?;
}
if let Some(ref v) = self.origin_stack.as_ref() {
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeInt64, ::protobuf::types::ProtobufTypeString>(4, &self.origin_id_to_string, os)?;
if let Some(ref v) = self.graph_traceback.as_ref() {
os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if self.graph_version != 0 {
os.write_int64(6, self.graph_version)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> CallTraceback {
CallTraceback::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<CallTraceback_CallType>>(
"call_type",
|m: &CallTraceback| { &m.call_type },
|m: &mut CallTraceback| { &mut m.call_type },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"call_key",
|m: &CallTraceback| { &m.call_key },
|m: &mut CallTraceback| { &mut m.call_key },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::tfprof_log::CodeDef>>(
"origin_stack",
|m: &CallTraceback| { &m.origin_stack },
|m: &mut CallTraceback| { &mut m.origin_stack },
));
fields.push(::protobuf::reflect::accessor::make_map_accessor::<_, ::protobuf::types::ProtobufTypeInt64, ::protobuf::types::ProtobufTypeString>(
"origin_id_to_string",
|m: &CallTraceback| { &m.origin_id_to_string },
|m: &mut CallTraceback| { &mut m.origin_id_to_string },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<super::tfprof_log::OpLogProto>>(
"graph_traceback",
|m: &CallTraceback| { &m.graph_traceback },
|m: &mut CallTraceback| { &mut m.graph_traceback },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt64>(
"graph_version",
|m: &CallTraceback| { &m.graph_version },
|m: &mut CallTraceback| { &mut m.graph_version },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<CallTraceback>(
"CallTraceback",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static CallTraceback {
static instance: ::protobuf::rt::LazyV2<CallTraceback> = ::protobuf::rt::LazyV2::INIT;
instance.get(CallTraceback::new)
}
}
impl ::protobuf::Clear for CallTraceback {
fn clear(&mut self) {
self.call_type = CallTraceback_CallType::UNSPECIFIED;
self.call_key.clear();
self.origin_stack.clear();
self.origin_id_to_string.clear();
self.graph_traceback.clear();
self.graph_version = 0;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for CallTraceback {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for CallTraceback {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum CallTraceback_CallType {
UNSPECIFIED = 0,
GRAPH_EXECUTION = 1,
EAGER_EXECUTION = 2,
}
impl ::protobuf::ProtobufEnum for CallTraceback_CallType {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<CallTraceback_CallType> {
match value {
0 => ::std::option::Option::Some(CallTraceback_CallType::UNSPECIFIED),
1 => ::std::option::Option::Some(CallTraceback_CallType::GRAPH_EXECUTION),
2 => ::std::option::Option::Some(CallTraceback_CallType::EAGER_EXECUTION),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [CallTraceback_CallType] = &[
CallTraceback_CallType::UNSPECIFIED,
CallTraceback_CallType::GRAPH_EXECUTION,
CallTraceback_CallType::EAGER_EXECUTION,
];
values
}
fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
::protobuf::reflect::EnumDescriptor::new_pb_name::<CallTraceback_CallType>("CallTraceback.CallType", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for CallTraceback_CallType {
}
impl ::std::default::Default for CallTraceback_CallType {
fn default() -> Self {
CallTraceback_CallType::UNSPECIFIED
}
}
impl ::protobuf::reflect::ProtobufValue for CallTraceback_CallType {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n)tensorflow/core/debug/debug_service.proto\x12\ntensorflow\x1a&tensorf\
low/core/framework/tensor.proto\x1a)tensorflow/core/profiler/tfprof_log.\
proto\x1a$tensorflow/core/protobuf/debug.proto\x1a\x20tensorflow/core/ut\
il/event.proto\"\xa1\x03\n\nEventReply\x12^\n\x16debug_op_state_changes\
\x18\x01\x20\x03(\x0b2).tensorflow.EventReply.DebugOpStateChangeR\x13deb\
ugOpStateChanges\x12/\n\x06tensor\x18\x02\x20\x01(\x0b2\x17.tensorflow.T\
ensorProtoR\x06tensor\x1a\x81\x02\n\x12DebugOpStateChange\x12E\n\x05stat\
e\x18\x01\x20\x01(\x0e2/.tensorflow.EventReply.DebugOpStateChange.StateR\
\x05state\x12\x1b\n\tnode_name\x18\x02\x20\x01(\tR\x08nodeName\x12\x1f\n\
\x0boutput_slot\x18\x03\x20\x01(\x05R\noutputSlot\x12\x19\n\x08debug_op\
\x18\x04\x20\x01(\tR\x07debugOp\"K\n\x05State\x12\x15\n\x11STATE_UNSPECI\
FIED\x10\0\x12\x0c\n\x08DISABLED\x10\x01\x12\r\n\tREAD_ONLY\x10\x02\x12\
\x0e\n\nREAD_WRITE\x10\x03\"\x83\x04\n\rCallTraceback\x12?\n\tcall_type\
\x18\x01\x20\x01(\x0e2\".tensorflow.CallTraceback.CallTypeR\x08callType\
\x12\x19\n\x08call_key\x18\x02\x20\x01(\tR\x07callKey\x12=\n\x0corigin_s\
tack\x18\x03\x20\x01(\x0b2\x1a.tensorflow.tfprof.CodeDefR\x0boriginStack\
\x12^\n\x13origin_id_to_string\x18\x04\x20\x03(\x0b2/.tensorflow.CallTra\
ceback.OriginIdToStringEntryR\x10originIdToString\x12F\n\x0fgraph_traceb\
ack\x18\x05\x20\x01(\x0b2\x1d.tensorflow.tfprof.OpLogProtoR\x0egraphTrac\
eback\x12#\n\rgraph_version\x18\x06\x20\x01(\x03R\x0cgraphVersion\x1aC\n\
\x15OriginIdToStringEntry\x12\x10\n\x03key\x18\x01\x20\x01(\x03R\x03key\
\x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x028\x01\"E\n\x08CallT\
ype\x12\x0f\n\x0bUNSPECIFIED\x10\0\x12\x13\n\x0fGRAPH_EXECUTION\x10\x01\
\x12\x13\n\x0fEAGER_EXECUTION\x10\x022\xdd\x01\n\rEventListener\x12;\n\n\
SendEvents\x12\x11.tensorflow.Event\x1a\x16.tensorflow.EventReply(\x010\
\x01\x12C\n\x0eSendTracebacks\x12\x19.tensorflow.CallTraceback\x1a\x16.t\
ensorflow.EventReply\x12J\n\x0fSendSourceFiles\x12\x1f.tensorflow.Debugg\
edSourceFiles\x1a\x16.tensorflow.EventReplyb\x06proto3\
";
static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}