1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: tensorflow/core/profiler/profiler_service_monitor_result.proto
3
4#include "tensorflow/core/profiler/profiler_service_monitor_result.pb.h"
5
6#include <algorithm>
7
8#include <google/protobuf/stubs/common.h>
9#include <google/protobuf/io/coded_stream.h>
10#include <google/protobuf/extension_set.h>
11#include <google/protobuf/wire_format_lite.h>
12#include <google/protobuf/descriptor.h>
13#include <google/protobuf/generated_message_reflection.h>
14#include <google/protobuf/reflection_ops.h>
15#include <google/protobuf/wire_format.h>
16// @@protoc_insertion_point(includes)
17#include <google/protobuf/port_def.inc>
18namespace tensorflow {
19class ProfilerServiceMonitorResultDefaultTypeInternal {
20 public:
21 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ProfilerServiceMonitorResult> _instance;
22} _ProfilerServiceMonitorResult_default_instance_;
23} // namespace tensorflow
24static void InitDefaultsscc_info_ProfilerServiceMonitorResult_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto() {
25 GOOGLE_PROTOBUF_VERIFY_VERSION;
26
27 {
28 void* ptr = &::tensorflow::_ProfilerServiceMonitorResult_default_instance_;
29 new (ptr) ::tensorflow::ProfilerServiceMonitorResult();
30 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
31 }
32 ::tensorflow::ProfilerServiceMonitorResult::InitAsDefaultInstance();
33}
34
35::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfilerServiceMonitorResult_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto =
36 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ProfilerServiceMonitorResult_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto}, {}};
37
38static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto[1];
39static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto[1];
40static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto = nullptr;
41
42const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
43 ~0u, // no _has_bits_
44 PROTOBUF_FIELD_OFFSET(::tensorflow::ProfilerServiceMonitorResult, _internal_metadata_),
45 ~0u, // no _extensions_
46 ~0u, // no _oneof_case_
47 ~0u, // no _weak_field_map_
48 PROTOBUF_FIELD_OFFSET(::tensorflow::ProfilerServiceMonitorResult, response_type_),
49 PROTOBUF_FIELD_OFFSET(::tensorflow::ProfilerServiceMonitorResult, device_idle_time_percent_),
50 PROTOBUF_FIELD_OFFSET(::tensorflow::ProfilerServiceMonitorResult, matrix_unit_utilization_percent_),
51 PROTOBUF_FIELD_OFFSET(::tensorflow::ProfilerServiceMonitorResult, step_time_ms_avg_),
52 PROTOBUF_FIELD_OFFSET(::tensorflow::ProfilerServiceMonitorResult, step_time_ms_min_),
53 PROTOBUF_FIELD_OFFSET(::tensorflow::ProfilerServiceMonitorResult, step_time_ms_max_),
54 PROTOBUF_FIELD_OFFSET(::tensorflow::ProfilerServiceMonitorResult, infeed_percent_avg_),
55 PROTOBUF_FIELD_OFFSET(::tensorflow::ProfilerServiceMonitorResult, infeed_percent_min_),
56 PROTOBUF_FIELD_OFFSET(::tensorflow::ProfilerServiceMonitorResult, infeed_percent_max_),
57};
58static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
59 { 0, -1, sizeof(::tensorflow::ProfilerServiceMonitorResult)},
60};
61
62static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
63 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_ProfilerServiceMonitorResult_default_instance_),
64};
65
66const char descriptor_table_protodef_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
67 "\n>tensorflow/core/profiler/profiler_serv"
68 "ice_monitor_result.proto\022\ntensorflow\"\255\003\n"
69 "\034ProfilerServiceMonitorResult\022L\n\rrespons"
70 "e_type\030\001 \001(\01625.tensorflow.ProfilerServic"
71 "eMonitorResult.ResponseType\022 \n\030device_id"
72 "le_time_percent\030\002 \001(\001\022\'\n\037matrix_unit_uti"
73 "lization_percent\030\003 \001(\001\022\030\n\020step_time_ms_a"
74 "vg\030\004 \001(\001\022\030\n\020step_time_ms_min\030\005 \001(\001\022\030\n\020st"
75 "ep_time_ms_max\030\006 \001(\001\022\032\n\022infeed_percent_a"
76 "vg\030\007 \001(\001\022\032\n\022infeed_percent_min\030\010 \001(\001\022\032\n\022"
77 "infeed_percent_max\030\t \001(\001\"R\n\014ResponseType"
78 "\022\020\n\014EMPTY_RESULT\020\000\022\r\n\tUTIL_ONLY\020\001\022\r\n\tUTI"
79 "L_IDLE\020\002\022\022\n\016UTIL_IDLE_STEP\020\003b\006proto3"
80 ;
81static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto_deps[1] = {
82};
83static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto_sccs[1] = {
84 &scc_info_ProfilerServiceMonitorResult_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto.base,
85};
86static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto_once;
87static bool descriptor_table_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto_initialized = false;
88const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto = {
89 &descriptor_table_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto, "tensorflow/core/profiler/profiler_service_monitor_result.proto", 516,
90 &descriptor_table_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto_once, descriptor_table_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto_deps, 1, 0,
91 schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto::offsets,
92 file_level_metadata_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto, 1, file_level_enum_descriptors_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto,
93};
94
95// Force running AddDescriptors() at dynamic initialization time.
96static bool dynamic_init_dummy_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto), true);
97namespace tensorflow {
98const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ProfilerServiceMonitorResult_ResponseType_descriptor() {
99 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto);
100 return file_level_enum_descriptors_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto[0];
101}
102bool ProfilerServiceMonitorResult_ResponseType_IsValid(int value) {
103 switch (value) {
104 case 0:
105 case 1:
106 case 2:
107 case 3:
108 return true;
109 default:
110 return false;
111 }
112}
113
114#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
115constexpr ProfilerServiceMonitorResult_ResponseType ProfilerServiceMonitorResult::EMPTY_RESULT;
116constexpr ProfilerServiceMonitorResult_ResponseType ProfilerServiceMonitorResult::UTIL_ONLY;
117constexpr ProfilerServiceMonitorResult_ResponseType ProfilerServiceMonitorResult::UTIL_IDLE;
118constexpr ProfilerServiceMonitorResult_ResponseType ProfilerServiceMonitorResult::UTIL_IDLE_STEP;
119constexpr ProfilerServiceMonitorResult_ResponseType ProfilerServiceMonitorResult::ResponseType_MIN;
120constexpr ProfilerServiceMonitorResult_ResponseType ProfilerServiceMonitorResult::ResponseType_MAX;
121constexpr int ProfilerServiceMonitorResult::ResponseType_ARRAYSIZE;
122#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
123
124// ===================================================================
125
126void ProfilerServiceMonitorResult::InitAsDefaultInstance() {
127}
128class ProfilerServiceMonitorResult::_Internal {
129 public:
130};
131
132ProfilerServiceMonitorResult::ProfilerServiceMonitorResult()
133 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
134 SharedCtor();
135 // @@protoc_insertion_point(constructor:tensorflow.ProfilerServiceMonitorResult)
136}
137ProfilerServiceMonitorResult::ProfilerServiceMonitorResult(const ProfilerServiceMonitorResult& from)
138 : ::PROTOBUF_NAMESPACE_ID::Message(),
139 _internal_metadata_(nullptr) {
140 _internal_metadata_.MergeFrom(from._internal_metadata_);
141 ::memcpy(&device_idle_time_percent_, &from.device_idle_time_percent_,
142 static_cast<size_t>(reinterpret_cast<char*>(&response_type_) -
143 reinterpret_cast<char*>(&device_idle_time_percent_)) + sizeof(response_type_));
144 // @@protoc_insertion_point(copy_constructor:tensorflow.ProfilerServiceMonitorResult)
145}
146
147void ProfilerServiceMonitorResult::SharedCtor() {
148 ::memset(&device_idle_time_percent_, 0, static_cast<size_t>(
149 reinterpret_cast<char*>(&response_type_) -
150 reinterpret_cast<char*>(&device_idle_time_percent_)) + sizeof(response_type_));
151}
152
153ProfilerServiceMonitorResult::~ProfilerServiceMonitorResult() {
154 // @@protoc_insertion_point(destructor:tensorflow.ProfilerServiceMonitorResult)
155 SharedDtor();
156}
157
158void ProfilerServiceMonitorResult::SharedDtor() {
159}
160
161void ProfilerServiceMonitorResult::SetCachedSize(int size) const {
162 _cached_size_.Set(size);
163}
164const ProfilerServiceMonitorResult& ProfilerServiceMonitorResult::default_instance() {
165 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ProfilerServiceMonitorResult_tensorflow_2fcore_2fprofiler_2fprofiler_5fservice_5fmonitor_5fresult_2eproto.base);
166 return *internal_default_instance();
167}
168
169
170void ProfilerServiceMonitorResult::Clear() {
171// @@protoc_insertion_point(message_clear_start:tensorflow.ProfilerServiceMonitorResult)
172 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
173 // Prevent compiler warnings about cached_has_bits being unused
174 (void) cached_has_bits;
175
176 ::memset(&device_idle_time_percent_, 0, static_cast<size_t>(
177 reinterpret_cast<char*>(&response_type_) -
178 reinterpret_cast<char*>(&device_idle_time_percent_)) + sizeof(response_type_));
179 _internal_metadata_.Clear();
180}
181
182#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
183const char* ProfilerServiceMonitorResult::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
184#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
185 while (!ctx->Done(&ptr)) {
186 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
187 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
188 CHK_(ptr);
189 switch (tag >> 3) {
190 // .tensorflow.ProfilerServiceMonitorResult.ResponseType response_type = 1;
191 case 1:
192 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
193 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
194 CHK_(ptr);
195 set_response_type(static_cast<::tensorflow::ProfilerServiceMonitorResult_ResponseType>(val));
196 } else goto handle_unusual;
197 continue;
198 // double device_idle_time_percent = 2;
199 case 2:
200 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 17)) {
201 device_idle_time_percent_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
202 ptr += sizeof(double);
203 } else goto handle_unusual;
204 continue;
205 // double matrix_unit_utilization_percent = 3;
206 case 3:
207 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 25)) {
208 matrix_unit_utilization_percent_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
209 ptr += sizeof(double);
210 } else goto handle_unusual;
211 continue;
212 // double step_time_ms_avg = 4;
213 case 4:
214 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 33)) {
215 step_time_ms_avg_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
216 ptr += sizeof(double);
217 } else goto handle_unusual;
218 continue;
219 // double step_time_ms_min = 5;
220 case 5:
221 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 41)) {
222 step_time_ms_min_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
223 ptr += sizeof(double);
224 } else goto handle_unusual;
225 continue;
226 // double step_time_ms_max = 6;
227 case 6:
228 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 49)) {
229 step_time_ms_max_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
230 ptr += sizeof(double);
231 } else goto handle_unusual;
232 continue;
233 // double infeed_percent_avg = 7;
234 case 7:
235 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 57)) {
236 infeed_percent_avg_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
237 ptr += sizeof(double);
238 } else goto handle_unusual;
239 continue;
240 // double infeed_percent_min = 8;
241 case 8:
242 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 65)) {
243 infeed_percent_min_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
244 ptr += sizeof(double);
245 } else goto handle_unusual;
246 continue;
247 // double infeed_percent_max = 9;
248 case 9:
249 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 73)) {
250 infeed_percent_max_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
251 ptr += sizeof(double);
252 } else goto handle_unusual;
253 continue;
254 default: {
255 handle_unusual:
256 if ((tag & 7) == 4 || tag == 0) {
257 ctx->SetLastTag(tag);
258 goto success;
259 }
260 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
261 CHK_(ptr != nullptr);
262 continue;
263 }
264 } // switch
265 } // while
266success:
267 return ptr;
268failure:
269 ptr = nullptr;
270 goto success;
271#undef CHK_
272}
273#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
274bool ProfilerServiceMonitorResult::MergePartialFromCodedStream(
275 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
276#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
277 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
278 // @@protoc_insertion_point(parse_start:tensorflow.ProfilerServiceMonitorResult)
279 for (;;) {
280 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
281 tag = p.first;
282 if (!p.second) goto handle_unusual;
283 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
284 // .tensorflow.ProfilerServiceMonitorResult.ResponseType response_type = 1;
285 case 1: {
286 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
287 int value = 0;
288 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
289 int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
290 input, &value)));
291 set_response_type(static_cast< ::tensorflow::ProfilerServiceMonitorResult_ResponseType >(value));
292 } else {
293 goto handle_unusual;
294 }
295 break;
296 }
297
298 // double device_idle_time_percent = 2;
299 case 2: {
300 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (17 & 0xFF)) {
301
302 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
303 double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
304 input, &device_idle_time_percent_)));
305 } else {
306 goto handle_unusual;
307 }
308 break;
309 }
310
311 // double matrix_unit_utilization_percent = 3;
312 case 3: {
313 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (25 & 0xFF)) {
314
315 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
316 double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
317 input, &matrix_unit_utilization_percent_)));
318 } else {
319 goto handle_unusual;
320 }
321 break;
322 }
323
324 // double step_time_ms_avg = 4;
325 case 4: {
326 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (33 & 0xFF)) {
327
328 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
329 double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
330 input, &step_time_ms_avg_)));
331 } else {
332 goto handle_unusual;
333 }
334 break;
335 }
336
337 // double step_time_ms_min = 5;
338 case 5: {
339 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (41 & 0xFF)) {
340
341 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
342 double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
343 input, &step_time_ms_min_)));
344 } else {
345 goto handle_unusual;
346 }
347 break;
348 }
349
350 // double step_time_ms_max = 6;
351 case 6: {
352 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (49 & 0xFF)) {
353
354 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
355 double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
356 input, &step_time_ms_max_)));
357 } else {
358 goto handle_unusual;
359 }
360 break;
361 }
362
363 // double infeed_percent_avg = 7;
364 case 7: {
365 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (57 & 0xFF)) {
366
367 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
368 double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
369 input, &infeed_percent_avg_)));
370 } else {
371 goto handle_unusual;
372 }
373 break;
374 }
375
376 // double infeed_percent_min = 8;
377 case 8: {
378 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (65 & 0xFF)) {
379
380 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
381 double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
382 input, &infeed_percent_min_)));
383 } else {
384 goto handle_unusual;
385 }
386 break;
387 }
388
389 // double infeed_percent_max = 9;
390 case 9: {
391 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (73 & 0xFF)) {
392
393 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
394 double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
395 input, &infeed_percent_max_)));
396 } else {
397 goto handle_unusual;
398 }
399 break;
400 }
401
402 default: {
403 handle_unusual:
404 if (tag == 0) {
405 goto success;
406 }
407 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
408 input, tag, _internal_metadata_.mutable_unknown_fields()));
409 break;
410 }
411 }
412 }
413success:
414 // @@protoc_insertion_point(parse_success:tensorflow.ProfilerServiceMonitorResult)
415 return true;
416failure:
417 // @@protoc_insertion_point(parse_failure:tensorflow.ProfilerServiceMonitorResult)
418 return false;
419#undef DO_
420}
421#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
422
423void ProfilerServiceMonitorResult::SerializeWithCachedSizes(
424 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
425 // @@protoc_insertion_point(serialize_start:tensorflow.ProfilerServiceMonitorResult)
426 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
427 (void) cached_has_bits;
428
429 // .tensorflow.ProfilerServiceMonitorResult.ResponseType response_type = 1;
430 if (this->response_type() != 0) {
431 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
432 1, this->response_type(), output);
433 }
434
435 // double device_idle_time_percent = 2;
436 if (!(this->device_idle_time_percent() <= 0 && this->device_idle_time_percent() >= 0)) {
437 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(2, this->device_idle_time_percent(), output);
438 }
439
440 // double matrix_unit_utilization_percent = 3;
441 if (!(this->matrix_unit_utilization_percent() <= 0 && this->matrix_unit_utilization_percent() >= 0)) {
442 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(3, this->matrix_unit_utilization_percent(), output);
443 }
444
445 // double step_time_ms_avg = 4;
446 if (!(this->step_time_ms_avg() <= 0 && this->step_time_ms_avg() >= 0)) {
447 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(4, this->step_time_ms_avg(), output);
448 }
449
450 // double step_time_ms_min = 5;
451 if (!(this->step_time_ms_min() <= 0 && this->step_time_ms_min() >= 0)) {
452 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(5, this->step_time_ms_min(), output);
453 }
454
455 // double step_time_ms_max = 6;
456 if (!(this->step_time_ms_max() <= 0 && this->step_time_ms_max() >= 0)) {
457 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(6, this->step_time_ms_max(), output);
458 }
459
460 // double infeed_percent_avg = 7;
461 if (!(this->infeed_percent_avg() <= 0 && this->infeed_percent_avg() >= 0)) {
462 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(7, this->infeed_percent_avg(), output);
463 }
464
465 // double infeed_percent_min = 8;
466 if (!(this->infeed_percent_min() <= 0 && this->infeed_percent_min() >= 0)) {
467 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(8, this->infeed_percent_min(), output);
468 }
469
470 // double infeed_percent_max = 9;
471 if (!(this->infeed_percent_max() <= 0 && this->infeed_percent_max() >= 0)) {
472 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(9, this->infeed_percent_max(), output);
473 }
474
475 if (_internal_metadata_.have_unknown_fields()) {
476 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
477 _internal_metadata_.unknown_fields(), output);
478 }
479 // @@protoc_insertion_point(serialize_end:tensorflow.ProfilerServiceMonitorResult)
480}
481
482::PROTOBUF_NAMESPACE_ID::uint8* ProfilerServiceMonitorResult::InternalSerializeWithCachedSizesToArray(
483 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
484 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.ProfilerServiceMonitorResult)
485 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
486 (void) cached_has_bits;
487
488 // .tensorflow.ProfilerServiceMonitorResult.ResponseType response_type = 1;
489 if (this->response_type() != 0) {
490 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
491 1, this->response_type(), target);
492 }
493
494 // double device_idle_time_percent = 2;
495 if (!(this->device_idle_time_percent() <= 0 && this->device_idle_time_percent() >= 0)) {
496 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(2, this->device_idle_time_percent(), target);
497 }
498
499 // double matrix_unit_utilization_percent = 3;
500 if (!(this->matrix_unit_utilization_percent() <= 0 && this->matrix_unit_utilization_percent() >= 0)) {
501 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(3, this->matrix_unit_utilization_percent(), target);
502 }
503
504 // double step_time_ms_avg = 4;
505 if (!(this->step_time_ms_avg() <= 0 && this->step_time_ms_avg() >= 0)) {
506 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(4, this->step_time_ms_avg(), target);
507 }
508
509 // double step_time_ms_min = 5;
510 if (!(this->step_time_ms_min() <= 0 && this->step_time_ms_min() >= 0)) {
511 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(5, this->step_time_ms_min(), target);
512 }
513
514 // double step_time_ms_max = 6;
515 if (!(this->step_time_ms_max() <= 0 && this->step_time_ms_max() >= 0)) {
516 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(6, this->step_time_ms_max(), target);
517 }
518
519 // double infeed_percent_avg = 7;
520 if (!(this->infeed_percent_avg() <= 0 && this->infeed_percent_avg() >= 0)) {
521 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(7, this->infeed_percent_avg(), target);
522 }
523
524 // double infeed_percent_min = 8;
525 if (!(this->infeed_percent_min() <= 0 && this->infeed_percent_min() >= 0)) {
526 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(8, this->infeed_percent_min(), target);
527 }
528
529 // double infeed_percent_max = 9;
530 if (!(this->infeed_percent_max() <= 0 && this->infeed_percent_max() >= 0)) {
531 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(9, this->infeed_percent_max(), target);
532 }
533
534 if (_internal_metadata_.have_unknown_fields()) {
535 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
536 _internal_metadata_.unknown_fields(), target);
537 }
538 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.ProfilerServiceMonitorResult)
539 return target;
540}
541
542size_t ProfilerServiceMonitorResult::ByteSizeLong() const {
543// @@protoc_insertion_point(message_byte_size_start:tensorflow.ProfilerServiceMonitorResult)
544 size_t total_size = 0;
545
546 if (_internal_metadata_.have_unknown_fields()) {
547 total_size +=
548 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
549 _internal_metadata_.unknown_fields());
550 }
551 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
552 // Prevent compiler warnings about cached_has_bits being unused
553 (void) cached_has_bits;
554
555 // double device_idle_time_percent = 2;
556 if (!(this->device_idle_time_percent() <= 0 && this->device_idle_time_percent() >= 0)) {
557 total_size += 1 + 8;
558 }
559
560 // double matrix_unit_utilization_percent = 3;
561 if (!(this->matrix_unit_utilization_percent() <= 0 && this->matrix_unit_utilization_percent() >= 0)) {
562 total_size += 1 + 8;
563 }
564
565 // double step_time_ms_avg = 4;
566 if (!(this->step_time_ms_avg() <= 0 && this->step_time_ms_avg() >= 0)) {
567 total_size += 1 + 8;
568 }
569
570 // double step_time_ms_min = 5;
571 if (!(this->step_time_ms_min() <= 0 && this->step_time_ms_min() >= 0)) {
572 total_size += 1 + 8;
573 }
574
575 // double step_time_ms_max = 6;
576 if (!(this->step_time_ms_max() <= 0 && this->step_time_ms_max() >= 0)) {
577 total_size += 1 + 8;
578 }
579
580 // double infeed_percent_avg = 7;
581 if (!(this->infeed_percent_avg() <= 0 && this->infeed_percent_avg() >= 0)) {
582 total_size += 1 + 8;
583 }
584
585 // double infeed_percent_min = 8;
586 if (!(this->infeed_percent_min() <= 0 && this->infeed_percent_min() >= 0)) {
587 total_size += 1 + 8;
588 }
589
590 // double infeed_percent_max = 9;
591 if (!(this->infeed_percent_max() <= 0 && this->infeed_percent_max() >= 0)) {
592 total_size += 1 + 8;
593 }
594
595 // .tensorflow.ProfilerServiceMonitorResult.ResponseType response_type = 1;
596 if (this->response_type() != 0) {
597 total_size += 1 +
598 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->response_type());
599 }
600
601 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
602 SetCachedSize(cached_size);
603 return total_size;
604}
605
606void ProfilerServiceMonitorResult::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
607// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.ProfilerServiceMonitorResult)
608 GOOGLE_DCHECK_NE(&from, this);
609 const ProfilerServiceMonitorResult* source =
610 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ProfilerServiceMonitorResult>(
611 &from);
612 if (source == nullptr) {
613 // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.ProfilerServiceMonitorResult)
614 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
615 } else {
616 // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.ProfilerServiceMonitorResult)
617 MergeFrom(*source);
618 }
619}
620
621void ProfilerServiceMonitorResult::MergeFrom(const ProfilerServiceMonitorResult& from) {
622// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.ProfilerServiceMonitorResult)
623 GOOGLE_DCHECK_NE(&from, this);
624 _internal_metadata_.MergeFrom(from._internal_metadata_);
625 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
626 (void) cached_has_bits;
627
628 if (!(from.device_idle_time_percent() <= 0 && from.device_idle_time_percent() >= 0)) {
629 set_device_idle_time_percent(from.device_idle_time_percent());
630 }
631 if (!(from.matrix_unit_utilization_percent() <= 0 && from.matrix_unit_utilization_percent() >= 0)) {
632 set_matrix_unit_utilization_percent(from.matrix_unit_utilization_percent());
633 }
634 if (!(from.step_time_ms_avg() <= 0 && from.step_time_ms_avg() >= 0)) {
635 set_step_time_ms_avg(from.step_time_ms_avg());
636 }
637 if (!(from.step_time_ms_min() <= 0 && from.step_time_ms_min() >= 0)) {
638 set_step_time_ms_min(from.step_time_ms_min());
639 }
640 if (!(from.step_time_ms_max() <= 0 && from.step_time_ms_max() >= 0)) {
641 set_step_time_ms_max(from.step_time_ms_max());
642 }
643 if (!(from.infeed_percent_avg() <= 0 && from.infeed_percent_avg() >= 0)) {
644 set_infeed_percent_avg(from.infeed_percent_avg());
645 }
646 if (!(from.infeed_percent_min() <= 0 && from.infeed_percent_min() >= 0)) {
647 set_infeed_percent_min(from.infeed_percent_min());
648 }
649 if (!(from.infeed_percent_max() <= 0 && from.infeed_percent_max() >= 0)) {
650 set_infeed_percent_max(from.infeed_percent_max());
651 }
652 if (from.response_type() != 0) {
653 set_response_type(from.response_type());
654 }
655}
656
657void ProfilerServiceMonitorResult::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
658// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.ProfilerServiceMonitorResult)
659 if (&from == this) return;
660 Clear();
661 MergeFrom(from);
662}
663
664void ProfilerServiceMonitorResult::CopyFrom(const ProfilerServiceMonitorResult& from) {
665// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.ProfilerServiceMonitorResult)
666 if (&from == this) return;
667 Clear();
668 MergeFrom(from);
669}
670
671bool ProfilerServiceMonitorResult::IsInitialized() const {
672 return true;
673}
674
675void ProfilerServiceMonitorResult::InternalSwap(ProfilerServiceMonitorResult* other) {
676 using std::swap;
677 _internal_metadata_.Swap(&other->_internal_metadata_);
678 swap(device_idle_time_percent_, other->device_idle_time_percent_);
679 swap(matrix_unit_utilization_percent_, other->matrix_unit_utilization_percent_);
680 swap(step_time_ms_avg_, other->step_time_ms_avg_);
681 swap(step_time_ms_min_, other->step_time_ms_min_);
682 swap(step_time_ms_max_, other->step_time_ms_max_);
683 swap(infeed_percent_avg_, other->infeed_percent_avg_);
684 swap(infeed_percent_min_, other->infeed_percent_min_);
685 swap(infeed_percent_max_, other->infeed_percent_max_);
686 swap(response_type_, other->response_type_);
687}
688
689::PROTOBUF_NAMESPACE_ID::Metadata ProfilerServiceMonitorResult::GetMetadata() const {
690 return GetMetadataStatic();
691}
692
693
694// @@protoc_insertion_point(namespace_scope)
695} // namespace tensorflow
696PROTOBUF_NAMESPACE_OPEN
697template<> PROTOBUF_NOINLINE ::tensorflow::ProfilerServiceMonitorResult* Arena::CreateMaybeMessage< ::tensorflow::ProfilerServiceMonitorResult >(Arena* arena) {
698 return Arena::CreateInternal< ::tensorflow::ProfilerServiceMonitorResult >(arena);
699}
700PROTOBUF_NAMESPACE_CLOSE
701
702// @@protoc_insertion_point(global_scope)
703#include <google/protobuf/port_undef.inc>
704