1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: tensorflow/core/protobuf/conv_autotuning.proto
3
4#include "tensorflow/core/protobuf/conv_autotuning.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>
18extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcompiler_2fxla_2fstream_5fexecutor_2fdnn_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ConvolutionDescriptorProto_tensorflow_2fcompiler_2fxla_2fstream_5fexecutor_2fdnn_2eproto;
19extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcompiler_2fxla_2fstream_5fexecutor_2fdnn_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TensorDescriptorProto_tensorflow_2fcompiler_2fxla_2fstream_5fexecutor_2fdnn_2eproto;
20namespace tensorflow {
21class ConvolutionProtoDefaultTypeInternal {
22 public:
23 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ConvolutionProto> _instance;
24} _ConvolutionProto_default_instance_;
25class MatmulProtoDefaultTypeInternal {
26 public:
27 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<MatmulProto> _instance;
28} _MatmulProto_default_instance_;
29} // namespace tensorflow
30static void InitDefaultsscc_info_ConvolutionProto_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto() {
31 GOOGLE_PROTOBUF_VERIFY_VERSION;
32
33 {
34 void* ptr = &::tensorflow::_ConvolutionProto_default_instance_;
35 new (ptr) ::tensorflow::ConvolutionProto();
36 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
37 }
38 ::tensorflow::ConvolutionProto::InitAsDefaultInstance();
39}
40
41::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ConvolutionProto_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto =
42 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_ConvolutionProto_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto}, {
43 &scc_info_TensorDescriptorProto_tensorflow_2fcompiler_2fxla_2fstream_5fexecutor_2fdnn_2eproto.base,
44 &scc_info_ConvolutionDescriptorProto_tensorflow_2fcompiler_2fxla_2fstream_5fexecutor_2fdnn_2eproto.base,}};
45
46static void InitDefaultsscc_info_MatmulProto_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto() {
47 GOOGLE_PROTOBUF_VERIFY_VERSION;
48
49 {
50 void* ptr = &::tensorflow::_MatmulProto_default_instance_;
51 new (ptr) ::tensorflow::MatmulProto();
52 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
53 }
54 ::tensorflow::MatmulProto::InitAsDefaultInstance();
55}
56
57::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MatmulProto_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto =
58 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_MatmulProto_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto}, {}};
59
60static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto[2];
61static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto = nullptr;
62static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto = nullptr;
63
64const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
65 ~0u, // no _has_bits_
66 PROTOBUF_FIELD_OFFSET(::tensorflow::ConvolutionProto, _internal_metadata_),
67 ~0u, // no _extensions_
68 ~0u, // no _oneof_case_
69 ~0u, // no _weak_field_map_
70 PROTOBUF_FIELD_OFFSET(::tensorflow::ConvolutionProto, kind_),
71 PROTOBUF_FIELD_OFFSET(::tensorflow::ConvolutionProto, input_),
72 PROTOBUF_FIELD_OFFSET(::tensorflow::ConvolutionProto, filter_),
73 PROTOBUF_FIELD_OFFSET(::tensorflow::ConvolutionProto, output_),
74 PROTOBUF_FIELD_OFFSET(::tensorflow::ConvolutionProto, conv_desc_),
75 PROTOBUF_FIELD_OFFSET(::tensorflow::ConvolutionProto, conv_scale_),
76 PROTOBUF_FIELD_OFFSET(::tensorflow::ConvolutionProto, side_value_scale_),
77 PROTOBUF_FIELD_OFFSET(::tensorflow::ConvolutionProto, activation_),
78 PROTOBUF_FIELD_OFFSET(::tensorflow::ConvolutionProto, input_address_),
79 PROTOBUF_FIELD_OFFSET(::tensorflow::ConvolutionProto, filter_address_),
80 PROTOBUF_FIELD_OFFSET(::tensorflow::ConvolutionProto, output_address_),
81 PROTOBUF_FIELD_OFFSET(::tensorflow::ConvolutionProto, bias_address_),
82 PROTOBUF_FIELD_OFFSET(::tensorflow::ConvolutionProto, side_input_address_),
83 ~0u, // no _has_bits_
84 PROTOBUF_FIELD_OFFSET(::tensorflow::MatmulProto, _internal_metadata_),
85 ~0u, // no _extensions_
86 ~0u, // no _oneof_case_
87 ~0u, // no _weak_field_map_
88 PROTOBUF_FIELD_OFFSET(::tensorflow::MatmulProto, ab_dtype_),
89 PROTOBUF_FIELD_OFFSET(::tensorflow::MatmulProto, c_dtype_),
90 PROTOBUF_FIELD_OFFSET(::tensorflow::MatmulProto, trans_a_),
91 PROTOBUF_FIELD_OFFSET(::tensorflow::MatmulProto, trans_b_),
92 PROTOBUF_FIELD_OFFSET(::tensorflow::MatmulProto, m_),
93 PROTOBUF_FIELD_OFFSET(::tensorflow::MatmulProto, n_),
94 PROTOBUF_FIELD_OFFSET(::tensorflow::MatmulProto, k_),
95 PROTOBUF_FIELD_OFFSET(::tensorflow::MatmulProto, lda_),
96 PROTOBUF_FIELD_OFFSET(::tensorflow::MatmulProto, ldb_),
97 PROTOBUF_FIELD_OFFSET(::tensorflow::MatmulProto, ldc_),
98 PROTOBUF_FIELD_OFFSET(::tensorflow::MatmulProto, activation_),
99 PROTOBUF_FIELD_OFFSET(::tensorflow::MatmulProto, a_address_),
100 PROTOBUF_FIELD_OFFSET(::tensorflow::MatmulProto, b_address_),
101 PROTOBUF_FIELD_OFFSET(::tensorflow::MatmulProto, c_address_),
102 PROTOBUF_FIELD_OFFSET(::tensorflow::MatmulProto, bias_address_),
103};
104static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
105 { 0, -1, sizeof(::tensorflow::ConvolutionProto)},
106 { 18, -1, sizeof(::tensorflow::MatmulProto)},
107};
108
109static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
110 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_ConvolutionProto_default_instance_),
111 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_MatmulProto_default_instance_),
112};
113
114const char descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
115 "\n.tensorflow/core/protobuf/conv_autotuni"
116 "ng.proto\022\ntensorflow\0321tensorflow/compile"
117 "r/xla/stream_executor/dnn.proto\"\235\004\n\020Conv"
118 "olutionProto\0222\n\004kind\030\001 \001(\0162$.stream_exec"
119 "utor.dnn.ConvolutionKind\0229\n\005input\030\002 \001(\0132"
120 "*.stream_executor.dnn.TensorDescriptorPr"
121 "oto\022:\n\006filter\030\003 \001(\0132*.stream_executor.dn"
122 "n.TensorDescriptorProto\022:\n\006output\030\004 \001(\0132"
123 "*.stream_executor.dnn.TensorDescriptorPr"
124 "oto\022B\n\tconv_desc\030\005 \001(\0132/.stream_executor"
125 ".dnn.ConvolutionDescriptorProto\022\022\n\nconv_"
126 "scale\030\006 \001(\001\022\030\n\020side_value_scale\030\007 \001(\001\0227\n"
127 "\nactivation\030\010 \001(\0162#.stream_executor.dnn."
128 "ActivationMode\022\025\n\rinput_address\030\t \001(\003\022\026\n"
129 "\016filter_address\030\n \001(\003\022\026\n\016output_address\030"
130 "\013 \001(\003\022\024\n\014bias_address\030\014 \001(\003\022\032\n\022side_inpu"
131 "t_address\030\r \001(\003\"\340\002\n\013MatmulProto\022/\n\010ab_dt"
132 "ype\030\001 \001(\0162\035.stream_executor.dnn.DataType"
133 "\022.\n\007c_dtype\030\002 \001(\0162\035.stream_executor.dnn."
134 "DataType\022\017\n\007trans_a\030\003 \001(\010\022\017\n\007trans_b\030\004 \001"
135 "(\010\022\t\n\001m\030\005 \001(\004\022\t\n\001n\030\006 \001(\004\022\t\n\001k\030\007 \001(\004\022\013\n\003l"
136 "da\030\010 \001(\003\022\013\n\003ldb\030\t \001(\003\022\013\n\003ldc\030\n \001(\003\0227\n\nac"
137 "tivation\030\013 \001(\0162#.stream_executor.dnn.Act"
138 "ivationMode\022\021\n\ta_address\030\014 \001(\003\022\021\n\tb_addr"
139 "ess\030\r \001(\003\022\021\n\tc_address\030\016 \001(\003\022\024\n\014bias_add"
140 "ress\030\017 \001(\003BWZUgithub.com/tensorflow/tens"
141 "orflow/tensorflow/go/core/protobuf/for_c"
142 "ore_protos_go_protob\006proto3"
143 ;
144static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto_deps[1] = {
145 &::descriptor_table_tensorflow_2fcompiler_2fxla_2fstream_5fexecutor_2fdnn_2eproto,
146};
147static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto_sccs[2] = {
148 &scc_info_ConvolutionProto_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto.base,
149 &scc_info_MatmulProto_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto.base,
150};
151static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto_once;
152static bool descriptor_table_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto_initialized = false;
153const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto = {
154 &descriptor_table_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto, "tensorflow/core/protobuf/conv_autotuning.proto", 1107,
155 &descriptor_table_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto_once, descriptor_table_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto_deps, 2, 1,
156 schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto::offsets,
157 file_level_metadata_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto, 2, file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto,
158};
159
160// Force running AddDescriptors() at dynamic initialization time.
161static bool dynamic_init_dummy_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto), true);
162namespace tensorflow {
163
164// ===================================================================
165
166void ConvolutionProto::InitAsDefaultInstance() {
167 ::tensorflow::_ConvolutionProto_default_instance_._instance.get_mutable()->input_ = const_cast< ::stream_executor::dnn::TensorDescriptorProto*>(
168 ::stream_executor::dnn::TensorDescriptorProto::internal_default_instance());
169 ::tensorflow::_ConvolutionProto_default_instance_._instance.get_mutable()->filter_ = const_cast< ::stream_executor::dnn::TensorDescriptorProto*>(
170 ::stream_executor::dnn::TensorDescriptorProto::internal_default_instance());
171 ::tensorflow::_ConvolutionProto_default_instance_._instance.get_mutable()->output_ = const_cast< ::stream_executor::dnn::TensorDescriptorProto*>(
172 ::stream_executor::dnn::TensorDescriptorProto::internal_default_instance());
173 ::tensorflow::_ConvolutionProto_default_instance_._instance.get_mutable()->conv_desc_ = const_cast< ::stream_executor::dnn::ConvolutionDescriptorProto*>(
174 ::stream_executor::dnn::ConvolutionDescriptorProto::internal_default_instance());
175}
176class ConvolutionProto::_Internal {
177 public:
178 static const ::stream_executor::dnn::TensorDescriptorProto& input(const ConvolutionProto* msg);
179 static const ::stream_executor::dnn::TensorDescriptorProto& filter(const ConvolutionProto* msg);
180 static const ::stream_executor::dnn::TensorDescriptorProto& output(const ConvolutionProto* msg);
181 static const ::stream_executor::dnn::ConvolutionDescriptorProto& conv_desc(const ConvolutionProto* msg);
182};
183
184const ::stream_executor::dnn::TensorDescriptorProto&
185ConvolutionProto::_Internal::input(const ConvolutionProto* msg) {
186 return *msg->input_;
187}
188const ::stream_executor::dnn::TensorDescriptorProto&
189ConvolutionProto::_Internal::filter(const ConvolutionProto* msg) {
190 return *msg->filter_;
191}
192const ::stream_executor::dnn::TensorDescriptorProto&
193ConvolutionProto::_Internal::output(const ConvolutionProto* msg) {
194 return *msg->output_;
195}
196const ::stream_executor::dnn::ConvolutionDescriptorProto&
197ConvolutionProto::_Internal::conv_desc(const ConvolutionProto* msg) {
198 return *msg->conv_desc_;
199}
200void ConvolutionProto::clear_input() {
201 if (GetArenaNoVirtual() == nullptr && input_ != nullptr) {
202 delete input_;
203 }
204 input_ = nullptr;
205}
206void ConvolutionProto::clear_filter() {
207 if (GetArenaNoVirtual() == nullptr && filter_ != nullptr) {
208 delete filter_;
209 }
210 filter_ = nullptr;
211}
212void ConvolutionProto::clear_output() {
213 if (GetArenaNoVirtual() == nullptr && output_ != nullptr) {
214 delete output_;
215 }
216 output_ = nullptr;
217}
218void ConvolutionProto::clear_conv_desc() {
219 if (GetArenaNoVirtual() == nullptr && conv_desc_ != nullptr) {
220 delete conv_desc_;
221 }
222 conv_desc_ = nullptr;
223}
224ConvolutionProto::ConvolutionProto()
225 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
226 SharedCtor();
227 // @@protoc_insertion_point(constructor:tensorflow.ConvolutionProto)
228}
229ConvolutionProto::ConvolutionProto(const ConvolutionProto& from)
230 : ::PROTOBUF_NAMESPACE_ID::Message(),
231 _internal_metadata_(nullptr) {
232 _internal_metadata_.MergeFrom(from._internal_metadata_);
233 if (from.has_input()) {
234 input_ = new ::stream_executor::dnn::TensorDescriptorProto(*from.input_);
235 } else {
236 input_ = nullptr;
237 }
238 if (from.has_filter()) {
239 filter_ = new ::stream_executor::dnn::TensorDescriptorProto(*from.filter_);
240 } else {
241 filter_ = nullptr;
242 }
243 if (from.has_output()) {
244 output_ = new ::stream_executor::dnn::TensorDescriptorProto(*from.output_);
245 } else {
246 output_ = nullptr;
247 }
248 if (from.has_conv_desc()) {
249 conv_desc_ = new ::stream_executor::dnn::ConvolutionDescriptorProto(*from.conv_desc_);
250 } else {
251 conv_desc_ = nullptr;
252 }
253 ::memcpy(&kind_, &from.kind_,
254 static_cast<size_t>(reinterpret_cast<char*>(&side_input_address_) -
255 reinterpret_cast<char*>(&kind_)) + sizeof(side_input_address_));
256 // @@protoc_insertion_point(copy_constructor:tensorflow.ConvolutionProto)
257}
258
259void ConvolutionProto::SharedCtor() {
260 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ConvolutionProto_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto.base);
261 ::memset(&input_, 0, static_cast<size_t>(
262 reinterpret_cast<char*>(&side_input_address_) -
263 reinterpret_cast<char*>(&input_)) + sizeof(side_input_address_));
264}
265
266ConvolutionProto::~ConvolutionProto() {
267 // @@protoc_insertion_point(destructor:tensorflow.ConvolutionProto)
268 SharedDtor();
269}
270
271void ConvolutionProto::SharedDtor() {
272 if (this != internal_default_instance()) delete input_;
273 if (this != internal_default_instance()) delete filter_;
274 if (this != internal_default_instance()) delete output_;
275 if (this != internal_default_instance()) delete conv_desc_;
276}
277
278void ConvolutionProto::SetCachedSize(int size) const {
279 _cached_size_.Set(size);
280}
281const ConvolutionProto& ConvolutionProto::default_instance() {
282 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ConvolutionProto_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto.base);
283 return *internal_default_instance();
284}
285
286
287void ConvolutionProto::Clear() {
288// @@protoc_insertion_point(message_clear_start:tensorflow.ConvolutionProto)
289 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
290 // Prevent compiler warnings about cached_has_bits being unused
291 (void) cached_has_bits;
292
293 if (GetArenaNoVirtual() == nullptr && input_ != nullptr) {
294 delete input_;
295 }
296 input_ = nullptr;
297 if (GetArenaNoVirtual() == nullptr && filter_ != nullptr) {
298 delete filter_;
299 }
300 filter_ = nullptr;
301 if (GetArenaNoVirtual() == nullptr && output_ != nullptr) {
302 delete output_;
303 }
304 output_ = nullptr;
305 if (GetArenaNoVirtual() == nullptr && conv_desc_ != nullptr) {
306 delete conv_desc_;
307 }
308 conv_desc_ = nullptr;
309 ::memset(&kind_, 0, static_cast<size_t>(
310 reinterpret_cast<char*>(&side_input_address_) -
311 reinterpret_cast<char*>(&kind_)) + sizeof(side_input_address_));
312 _internal_metadata_.Clear();
313}
314
315#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
316const char* ConvolutionProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
317#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
318 while (!ctx->Done(&ptr)) {
319 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
320 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
321 CHK_(ptr);
322 switch (tag >> 3) {
323 // .stream_executor.dnn.ConvolutionKind kind = 1;
324 case 1:
325 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
326 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
327 CHK_(ptr);
328 set_kind(static_cast<::stream_executor::dnn::ConvolutionKind>(val));
329 } else goto handle_unusual;
330 continue;
331 // .stream_executor.dnn.TensorDescriptorProto input = 2;
332 case 2:
333 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
334 ptr = ctx->ParseMessage(mutable_input(), ptr);
335 CHK_(ptr);
336 } else goto handle_unusual;
337 continue;
338 // .stream_executor.dnn.TensorDescriptorProto filter = 3;
339 case 3:
340 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
341 ptr = ctx->ParseMessage(mutable_filter(), ptr);
342 CHK_(ptr);
343 } else goto handle_unusual;
344 continue;
345 // .stream_executor.dnn.TensorDescriptorProto output = 4;
346 case 4:
347 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
348 ptr = ctx->ParseMessage(mutable_output(), ptr);
349 CHK_(ptr);
350 } else goto handle_unusual;
351 continue;
352 // .stream_executor.dnn.ConvolutionDescriptorProto conv_desc = 5;
353 case 5:
354 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
355 ptr = ctx->ParseMessage(mutable_conv_desc(), ptr);
356 CHK_(ptr);
357 } else goto handle_unusual;
358 continue;
359 // double conv_scale = 6;
360 case 6:
361 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 49)) {
362 conv_scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
363 ptr += sizeof(double);
364 } else goto handle_unusual;
365 continue;
366 // double side_value_scale = 7;
367 case 7:
368 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 57)) {
369 side_value_scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
370 ptr += sizeof(double);
371 } else goto handle_unusual;
372 continue;
373 // .stream_executor.dnn.ActivationMode activation = 8;
374 case 8:
375 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) {
376 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
377 CHK_(ptr);
378 set_activation(static_cast<::stream_executor::dnn::ActivationMode>(val));
379 } else goto handle_unusual;
380 continue;
381 // int64 input_address = 9;
382 case 9:
383 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) {
384 input_address_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
385 CHK_(ptr);
386 } else goto handle_unusual;
387 continue;
388 // int64 filter_address = 10;
389 case 10:
390 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) {
391 filter_address_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
392 CHK_(ptr);
393 } else goto handle_unusual;
394 continue;
395 // int64 output_address = 11;
396 case 11:
397 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) {
398 output_address_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
399 CHK_(ptr);
400 } else goto handle_unusual;
401 continue;
402 // int64 bias_address = 12;
403 case 12:
404 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) {
405 bias_address_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
406 CHK_(ptr);
407 } else goto handle_unusual;
408 continue;
409 // int64 side_input_address = 13;
410 case 13:
411 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) {
412 side_input_address_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
413 CHK_(ptr);
414 } else goto handle_unusual;
415 continue;
416 default: {
417 handle_unusual:
418 if ((tag & 7) == 4 || tag == 0) {
419 ctx->SetLastTag(tag);
420 goto success;
421 }
422 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
423 CHK_(ptr != nullptr);
424 continue;
425 }
426 } // switch
427 } // while
428success:
429 return ptr;
430failure:
431 ptr = nullptr;
432 goto success;
433#undef CHK_
434}
435#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
436bool ConvolutionProto::MergePartialFromCodedStream(
437 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
438#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
439 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
440 // @@protoc_insertion_point(parse_start:tensorflow.ConvolutionProto)
441 for (;;) {
442 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
443 tag = p.first;
444 if (!p.second) goto handle_unusual;
445 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
446 // .stream_executor.dnn.ConvolutionKind kind = 1;
447 case 1: {
448 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
449 int value = 0;
450 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
451 int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
452 input, &value)));
453 set_kind(static_cast< ::stream_executor::dnn::ConvolutionKind >(value));
454 } else {
455 goto handle_unusual;
456 }
457 break;
458 }
459
460 // .stream_executor.dnn.TensorDescriptorProto input = 2;
461 case 2: {
462 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
463 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
464 input, mutable_input()));
465 } else {
466 goto handle_unusual;
467 }
468 break;
469 }
470
471 // .stream_executor.dnn.TensorDescriptorProto filter = 3;
472 case 3: {
473 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
474 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
475 input, mutable_filter()));
476 } else {
477 goto handle_unusual;
478 }
479 break;
480 }
481
482 // .stream_executor.dnn.TensorDescriptorProto output = 4;
483 case 4: {
484 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
485 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
486 input, mutable_output()));
487 } else {
488 goto handle_unusual;
489 }
490 break;
491 }
492
493 // .stream_executor.dnn.ConvolutionDescriptorProto conv_desc = 5;
494 case 5: {
495 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
496 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
497 input, mutable_conv_desc()));
498 } else {
499 goto handle_unusual;
500 }
501 break;
502 }
503
504 // double conv_scale = 6;
505 case 6: {
506 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (49 & 0xFF)) {
507
508 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
509 double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
510 input, &conv_scale_)));
511 } else {
512 goto handle_unusual;
513 }
514 break;
515 }
516
517 // double side_value_scale = 7;
518 case 7: {
519 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (57 & 0xFF)) {
520
521 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
522 double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>(
523 input, &side_value_scale_)));
524 } else {
525 goto handle_unusual;
526 }
527 break;
528 }
529
530 // .stream_executor.dnn.ActivationMode activation = 8;
531 case 8: {
532 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (64 & 0xFF)) {
533 int value = 0;
534 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
535 int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
536 input, &value)));
537 set_activation(static_cast< ::stream_executor::dnn::ActivationMode >(value));
538 } else {
539 goto handle_unusual;
540 }
541 break;
542 }
543
544 // int64 input_address = 9;
545 case 9: {
546 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) {
547
548 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
549 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
550 input, &input_address_)));
551 } else {
552 goto handle_unusual;
553 }
554 break;
555 }
556
557 // int64 filter_address = 10;
558 case 10: {
559 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (80 & 0xFF)) {
560
561 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
562 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
563 input, &filter_address_)));
564 } else {
565 goto handle_unusual;
566 }
567 break;
568 }
569
570 // int64 output_address = 11;
571 case 11: {
572 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (88 & 0xFF)) {
573
574 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
575 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
576 input, &output_address_)));
577 } else {
578 goto handle_unusual;
579 }
580 break;
581 }
582
583 // int64 bias_address = 12;
584 case 12: {
585 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (96 & 0xFF)) {
586
587 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
588 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
589 input, &bias_address_)));
590 } else {
591 goto handle_unusual;
592 }
593 break;
594 }
595
596 // int64 side_input_address = 13;
597 case 13: {
598 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (104 & 0xFF)) {
599
600 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
601 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
602 input, &side_input_address_)));
603 } else {
604 goto handle_unusual;
605 }
606 break;
607 }
608
609 default: {
610 handle_unusual:
611 if (tag == 0) {
612 goto success;
613 }
614 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
615 input, tag, _internal_metadata_.mutable_unknown_fields()));
616 break;
617 }
618 }
619 }
620success:
621 // @@protoc_insertion_point(parse_success:tensorflow.ConvolutionProto)
622 return true;
623failure:
624 // @@protoc_insertion_point(parse_failure:tensorflow.ConvolutionProto)
625 return false;
626#undef DO_
627}
628#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
629
630void ConvolutionProto::SerializeWithCachedSizes(
631 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
632 // @@protoc_insertion_point(serialize_start:tensorflow.ConvolutionProto)
633 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
634 (void) cached_has_bits;
635
636 // .stream_executor.dnn.ConvolutionKind kind = 1;
637 if (this->kind() != 0) {
638 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
639 1, this->kind(), output);
640 }
641
642 // .stream_executor.dnn.TensorDescriptorProto input = 2;
643 if (this->has_input()) {
644 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
645 2, _Internal::input(this), output);
646 }
647
648 // .stream_executor.dnn.TensorDescriptorProto filter = 3;
649 if (this->has_filter()) {
650 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
651 3, _Internal::filter(this), output);
652 }
653
654 // .stream_executor.dnn.TensorDescriptorProto output = 4;
655 if (this->has_output()) {
656 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
657 4, _Internal::output(this), output);
658 }
659
660 // .stream_executor.dnn.ConvolutionDescriptorProto conv_desc = 5;
661 if (this->has_conv_desc()) {
662 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
663 5, _Internal::conv_desc(this), output);
664 }
665
666 // double conv_scale = 6;
667 if (!(this->conv_scale() <= 0 && this->conv_scale() >= 0)) {
668 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(6, this->conv_scale(), output);
669 }
670
671 // double side_value_scale = 7;
672 if (!(this->side_value_scale() <= 0 && this->side_value_scale() >= 0)) {
673 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(7, this->side_value_scale(), output);
674 }
675
676 // .stream_executor.dnn.ActivationMode activation = 8;
677 if (this->activation() != 0) {
678 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
679 8, this->activation(), output);
680 }
681
682 // int64 input_address = 9;
683 if (this->input_address() != 0) {
684 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(9, this->input_address(), output);
685 }
686
687 // int64 filter_address = 10;
688 if (this->filter_address() != 0) {
689 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(10, this->filter_address(), output);
690 }
691
692 // int64 output_address = 11;
693 if (this->output_address() != 0) {
694 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(11, this->output_address(), output);
695 }
696
697 // int64 bias_address = 12;
698 if (this->bias_address() != 0) {
699 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(12, this->bias_address(), output);
700 }
701
702 // int64 side_input_address = 13;
703 if (this->side_input_address() != 0) {
704 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(13, this->side_input_address(), output);
705 }
706
707 if (_internal_metadata_.have_unknown_fields()) {
708 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
709 _internal_metadata_.unknown_fields(), output);
710 }
711 // @@protoc_insertion_point(serialize_end:tensorflow.ConvolutionProto)
712}
713
714::PROTOBUF_NAMESPACE_ID::uint8* ConvolutionProto::InternalSerializeWithCachedSizesToArray(
715 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
716 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.ConvolutionProto)
717 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
718 (void) cached_has_bits;
719
720 // .stream_executor.dnn.ConvolutionKind kind = 1;
721 if (this->kind() != 0) {
722 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
723 1, this->kind(), target);
724 }
725
726 // .stream_executor.dnn.TensorDescriptorProto input = 2;
727 if (this->has_input()) {
728 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
729 InternalWriteMessageToArray(
730 2, _Internal::input(this), target);
731 }
732
733 // .stream_executor.dnn.TensorDescriptorProto filter = 3;
734 if (this->has_filter()) {
735 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
736 InternalWriteMessageToArray(
737 3, _Internal::filter(this), target);
738 }
739
740 // .stream_executor.dnn.TensorDescriptorProto output = 4;
741 if (this->has_output()) {
742 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
743 InternalWriteMessageToArray(
744 4, _Internal::output(this), target);
745 }
746
747 // .stream_executor.dnn.ConvolutionDescriptorProto conv_desc = 5;
748 if (this->has_conv_desc()) {
749 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
750 InternalWriteMessageToArray(
751 5, _Internal::conv_desc(this), target);
752 }
753
754 // double conv_scale = 6;
755 if (!(this->conv_scale() <= 0 && this->conv_scale() >= 0)) {
756 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(6, this->conv_scale(), target);
757 }
758
759 // double side_value_scale = 7;
760 if (!(this->side_value_scale() <= 0 && this->side_value_scale() >= 0)) {
761 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(7, this->side_value_scale(), target);
762 }
763
764 // .stream_executor.dnn.ActivationMode activation = 8;
765 if (this->activation() != 0) {
766 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
767 8, this->activation(), target);
768 }
769
770 // int64 input_address = 9;
771 if (this->input_address() != 0) {
772 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(9, this->input_address(), target);
773 }
774
775 // int64 filter_address = 10;
776 if (this->filter_address() != 0) {
777 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(10, this->filter_address(), target);
778 }
779
780 // int64 output_address = 11;
781 if (this->output_address() != 0) {
782 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(11, this->output_address(), target);
783 }
784
785 // int64 bias_address = 12;
786 if (this->bias_address() != 0) {
787 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(12, this->bias_address(), target);
788 }
789
790 // int64 side_input_address = 13;
791 if (this->side_input_address() != 0) {
792 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(13, this->side_input_address(), target);
793 }
794
795 if (_internal_metadata_.have_unknown_fields()) {
796 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
797 _internal_metadata_.unknown_fields(), target);
798 }
799 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.ConvolutionProto)
800 return target;
801}
802
803size_t ConvolutionProto::ByteSizeLong() const {
804// @@protoc_insertion_point(message_byte_size_start:tensorflow.ConvolutionProto)
805 size_t total_size = 0;
806
807 if (_internal_metadata_.have_unknown_fields()) {
808 total_size +=
809 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
810 _internal_metadata_.unknown_fields());
811 }
812 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
813 // Prevent compiler warnings about cached_has_bits being unused
814 (void) cached_has_bits;
815
816 // .stream_executor.dnn.TensorDescriptorProto input = 2;
817 if (this->has_input()) {
818 total_size += 1 +
819 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
820 *input_);
821 }
822
823 // .stream_executor.dnn.TensorDescriptorProto filter = 3;
824 if (this->has_filter()) {
825 total_size += 1 +
826 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
827 *filter_);
828 }
829
830 // .stream_executor.dnn.TensorDescriptorProto output = 4;
831 if (this->has_output()) {
832 total_size += 1 +
833 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
834 *output_);
835 }
836
837 // .stream_executor.dnn.ConvolutionDescriptorProto conv_desc = 5;
838 if (this->has_conv_desc()) {
839 total_size += 1 +
840 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
841 *conv_desc_);
842 }
843
844 // .stream_executor.dnn.ConvolutionKind kind = 1;
845 if (this->kind() != 0) {
846 total_size += 1 +
847 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->kind());
848 }
849
850 // .stream_executor.dnn.ActivationMode activation = 8;
851 if (this->activation() != 0) {
852 total_size += 1 +
853 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->activation());
854 }
855
856 // double conv_scale = 6;
857 if (!(this->conv_scale() <= 0 && this->conv_scale() >= 0)) {
858 total_size += 1 + 8;
859 }
860
861 // double side_value_scale = 7;
862 if (!(this->side_value_scale() <= 0 && this->side_value_scale() >= 0)) {
863 total_size += 1 + 8;
864 }
865
866 // int64 input_address = 9;
867 if (this->input_address() != 0) {
868 total_size += 1 +
869 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
870 this->input_address());
871 }
872
873 // int64 filter_address = 10;
874 if (this->filter_address() != 0) {
875 total_size += 1 +
876 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
877 this->filter_address());
878 }
879
880 // int64 output_address = 11;
881 if (this->output_address() != 0) {
882 total_size += 1 +
883 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
884 this->output_address());
885 }
886
887 // int64 bias_address = 12;
888 if (this->bias_address() != 0) {
889 total_size += 1 +
890 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
891 this->bias_address());
892 }
893
894 // int64 side_input_address = 13;
895 if (this->side_input_address() != 0) {
896 total_size += 1 +
897 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
898 this->side_input_address());
899 }
900
901 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
902 SetCachedSize(cached_size);
903 return total_size;
904}
905
906void ConvolutionProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
907// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.ConvolutionProto)
908 GOOGLE_DCHECK_NE(&from, this);
909 const ConvolutionProto* source =
910 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ConvolutionProto>(
911 &from);
912 if (source == nullptr) {
913 // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.ConvolutionProto)
914 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
915 } else {
916 // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.ConvolutionProto)
917 MergeFrom(*source);
918 }
919}
920
921void ConvolutionProto::MergeFrom(const ConvolutionProto& from) {
922// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.ConvolutionProto)
923 GOOGLE_DCHECK_NE(&from, this);
924 _internal_metadata_.MergeFrom(from._internal_metadata_);
925 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
926 (void) cached_has_bits;
927
928 if (from.has_input()) {
929 mutable_input()->::stream_executor::dnn::TensorDescriptorProto::MergeFrom(from.input());
930 }
931 if (from.has_filter()) {
932 mutable_filter()->::stream_executor::dnn::TensorDescriptorProto::MergeFrom(from.filter());
933 }
934 if (from.has_output()) {
935 mutable_output()->::stream_executor::dnn::TensorDescriptorProto::MergeFrom(from.output());
936 }
937 if (from.has_conv_desc()) {
938 mutable_conv_desc()->::stream_executor::dnn::ConvolutionDescriptorProto::MergeFrom(from.conv_desc());
939 }
940 if (from.kind() != 0) {
941 set_kind(from.kind());
942 }
943 if (from.activation() != 0) {
944 set_activation(from.activation());
945 }
946 if (!(from.conv_scale() <= 0 && from.conv_scale() >= 0)) {
947 set_conv_scale(from.conv_scale());
948 }
949 if (!(from.side_value_scale() <= 0 && from.side_value_scale() >= 0)) {
950 set_side_value_scale(from.side_value_scale());
951 }
952 if (from.input_address() != 0) {
953 set_input_address(from.input_address());
954 }
955 if (from.filter_address() != 0) {
956 set_filter_address(from.filter_address());
957 }
958 if (from.output_address() != 0) {
959 set_output_address(from.output_address());
960 }
961 if (from.bias_address() != 0) {
962 set_bias_address(from.bias_address());
963 }
964 if (from.side_input_address() != 0) {
965 set_side_input_address(from.side_input_address());
966 }
967}
968
969void ConvolutionProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
970// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.ConvolutionProto)
971 if (&from == this) return;
972 Clear();
973 MergeFrom(from);
974}
975
976void ConvolutionProto::CopyFrom(const ConvolutionProto& from) {
977// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.ConvolutionProto)
978 if (&from == this) return;
979 Clear();
980 MergeFrom(from);
981}
982
983bool ConvolutionProto::IsInitialized() const {
984 return true;
985}
986
987void ConvolutionProto::InternalSwap(ConvolutionProto* other) {
988 using std::swap;
989 _internal_metadata_.Swap(&other->_internal_metadata_);
990 swap(input_, other->input_);
991 swap(filter_, other->filter_);
992 swap(output_, other->output_);
993 swap(conv_desc_, other->conv_desc_);
994 swap(kind_, other->kind_);
995 swap(activation_, other->activation_);
996 swap(conv_scale_, other->conv_scale_);
997 swap(side_value_scale_, other->side_value_scale_);
998 swap(input_address_, other->input_address_);
999 swap(filter_address_, other->filter_address_);
1000 swap(output_address_, other->output_address_);
1001 swap(bias_address_, other->bias_address_);
1002 swap(side_input_address_, other->side_input_address_);
1003}
1004
1005::PROTOBUF_NAMESPACE_ID::Metadata ConvolutionProto::GetMetadata() const {
1006 return GetMetadataStatic();
1007}
1008
1009
1010// ===================================================================
1011
1012void MatmulProto::InitAsDefaultInstance() {
1013}
1014class MatmulProto::_Internal {
1015 public:
1016};
1017
1018MatmulProto::MatmulProto()
1019 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
1020 SharedCtor();
1021 // @@protoc_insertion_point(constructor:tensorflow.MatmulProto)
1022}
1023MatmulProto::MatmulProto(const MatmulProto& from)
1024 : ::PROTOBUF_NAMESPACE_ID::Message(),
1025 _internal_metadata_(nullptr) {
1026 _internal_metadata_.MergeFrom(from._internal_metadata_);
1027 ::memcpy(&ab_dtype_, &from.ab_dtype_,
1028 static_cast<size_t>(reinterpret_cast<char*>(&bias_address_) -
1029 reinterpret_cast<char*>(&ab_dtype_)) + sizeof(bias_address_));
1030 // @@protoc_insertion_point(copy_constructor:tensorflow.MatmulProto)
1031}
1032
1033void MatmulProto::SharedCtor() {
1034 ::memset(&ab_dtype_, 0, static_cast<size_t>(
1035 reinterpret_cast<char*>(&bias_address_) -
1036 reinterpret_cast<char*>(&ab_dtype_)) + sizeof(bias_address_));
1037}
1038
1039MatmulProto::~MatmulProto() {
1040 // @@protoc_insertion_point(destructor:tensorflow.MatmulProto)
1041 SharedDtor();
1042}
1043
1044void MatmulProto::SharedDtor() {
1045}
1046
1047void MatmulProto::SetCachedSize(int size) const {
1048 _cached_size_.Set(size);
1049}
1050const MatmulProto& MatmulProto::default_instance() {
1051 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MatmulProto_tensorflow_2fcore_2fprotobuf_2fconv_5fautotuning_2eproto.base);
1052 return *internal_default_instance();
1053}
1054
1055
1056void MatmulProto::Clear() {
1057// @@protoc_insertion_point(message_clear_start:tensorflow.MatmulProto)
1058 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1059 // Prevent compiler warnings about cached_has_bits being unused
1060 (void) cached_has_bits;
1061
1062 ::memset(&ab_dtype_, 0, static_cast<size_t>(
1063 reinterpret_cast<char*>(&bias_address_) -
1064 reinterpret_cast<char*>(&ab_dtype_)) + sizeof(bias_address_));
1065 _internal_metadata_.Clear();
1066}
1067
1068#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1069const char* MatmulProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1070#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1071 while (!ctx->Done(&ptr)) {
1072 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1073 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1074 CHK_(ptr);
1075 switch (tag >> 3) {
1076 // .stream_executor.dnn.DataType ab_dtype = 1;
1077 case 1:
1078 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
1079 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1080 CHK_(ptr);
1081 set_ab_dtype(static_cast<::stream_executor::dnn::DataType>(val));
1082 } else goto handle_unusual;
1083 continue;
1084 // .stream_executor.dnn.DataType c_dtype = 2;
1085 case 2:
1086 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
1087 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1088 CHK_(ptr);
1089 set_c_dtype(static_cast<::stream_executor::dnn::DataType>(val));
1090 } else goto handle_unusual;
1091 continue;
1092 // bool trans_a = 3;
1093 case 3:
1094 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
1095 trans_a_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1096 CHK_(ptr);
1097 } else goto handle_unusual;
1098 continue;
1099 // bool trans_b = 4;
1100 case 4:
1101 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
1102 trans_b_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1103 CHK_(ptr);
1104 } else goto handle_unusual;
1105 continue;
1106 // uint64 m = 5;
1107 case 5:
1108 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
1109 m_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1110 CHK_(ptr);
1111 } else goto handle_unusual;
1112 continue;
1113 // uint64 n = 6;
1114 case 6:
1115 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
1116 n_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1117 CHK_(ptr);
1118 } else goto handle_unusual;
1119 continue;
1120 // uint64 k = 7;
1121 case 7:
1122 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
1123 k_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1124 CHK_(ptr);
1125 } else goto handle_unusual;
1126 continue;
1127 // int64 lda = 8;
1128 case 8:
1129 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) {
1130 lda_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1131 CHK_(ptr);
1132 } else goto handle_unusual;
1133 continue;
1134 // int64 ldb = 9;
1135 case 9:
1136 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) {
1137 ldb_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1138 CHK_(ptr);
1139 } else goto handle_unusual;
1140 continue;
1141 // int64 ldc = 10;
1142 case 10:
1143 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) {
1144 ldc_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1145 CHK_(ptr);
1146 } else goto handle_unusual;
1147 continue;
1148 // .stream_executor.dnn.ActivationMode activation = 11;
1149 case 11:
1150 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88)) {
1151 ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1152 CHK_(ptr);
1153 set_activation(static_cast<::stream_executor::dnn::ActivationMode>(val));
1154 } else goto handle_unusual;
1155 continue;
1156 // int64 a_address = 12;
1157 case 12:
1158 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 96)) {
1159 a_address_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1160 CHK_(ptr);
1161 } else goto handle_unusual;
1162 continue;
1163 // int64 b_address = 13;
1164 case 13:
1165 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) {
1166 b_address_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1167 CHK_(ptr);
1168 } else goto handle_unusual;
1169 continue;
1170 // int64 c_address = 14;
1171 case 14:
1172 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 112)) {
1173 c_address_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1174 CHK_(ptr);
1175 } else goto handle_unusual;
1176 continue;
1177 // int64 bias_address = 15;
1178 case 15:
1179 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 120)) {
1180 bias_address_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1181 CHK_(ptr);
1182 } else goto handle_unusual;
1183 continue;
1184 default: {
1185 handle_unusual:
1186 if ((tag & 7) == 4 || tag == 0) {
1187 ctx->SetLastTag(tag);
1188 goto success;
1189 }
1190 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
1191 CHK_(ptr != nullptr);
1192 continue;
1193 }
1194 } // switch
1195 } // while
1196success:
1197 return ptr;
1198failure:
1199 ptr = nullptr;
1200 goto success;
1201#undef CHK_
1202}
1203#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1204bool MatmulProto::MergePartialFromCodedStream(
1205 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
1206#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
1207 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1208 // @@protoc_insertion_point(parse_start:tensorflow.MatmulProto)
1209 for (;;) {
1210 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1211 tag = p.first;
1212 if (!p.second) goto handle_unusual;
1213 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1214 // .stream_executor.dnn.DataType ab_dtype = 1;
1215 case 1: {
1216 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
1217 int value = 0;
1218 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1219 int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
1220 input, &value)));
1221 set_ab_dtype(static_cast< ::stream_executor::dnn::DataType >(value));
1222 } else {
1223 goto handle_unusual;
1224 }
1225 break;
1226 }
1227
1228 // .stream_executor.dnn.DataType c_dtype = 2;
1229 case 2: {
1230 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
1231 int value = 0;
1232 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1233 int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
1234 input, &value)));
1235 set_c_dtype(static_cast< ::stream_executor::dnn::DataType >(value));
1236 } else {
1237 goto handle_unusual;
1238 }
1239 break;
1240 }
1241
1242 // bool trans_a = 3;
1243 case 3: {
1244 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
1245
1246 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1247 bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
1248 input, &trans_a_)));
1249 } else {
1250 goto handle_unusual;
1251 }
1252 break;
1253 }
1254
1255 // bool trans_b = 4;
1256 case 4: {
1257 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
1258
1259 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1260 bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
1261 input, &trans_b_)));
1262 } else {
1263 goto handle_unusual;
1264 }
1265 break;
1266 }
1267
1268 // uint64 m = 5;
1269 case 5: {
1270 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) {
1271
1272 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1273 ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
1274 input, &m_)));
1275 } else {
1276 goto handle_unusual;
1277 }
1278 break;
1279 }
1280
1281 // uint64 n = 6;
1282 case 6: {
1283 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) {
1284
1285 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1286 ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
1287 input, &n_)));
1288 } else {
1289 goto handle_unusual;
1290 }
1291 break;
1292 }
1293
1294 // uint64 k = 7;
1295 case 7: {
1296 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) {
1297
1298 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1299 ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
1300 input, &k_)));
1301 } else {
1302 goto handle_unusual;
1303 }
1304 break;
1305 }
1306
1307 // int64 lda = 8;
1308 case 8: {
1309 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (64 & 0xFF)) {
1310
1311 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1312 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
1313 input, &lda_)));
1314 } else {
1315 goto handle_unusual;
1316 }
1317 break;
1318 }
1319
1320 // int64 ldb = 9;
1321 case 9: {
1322 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) {
1323
1324 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1325 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
1326 input, &ldb_)));
1327 } else {
1328 goto handle_unusual;
1329 }
1330 break;
1331 }
1332
1333 // int64 ldc = 10;
1334 case 10: {
1335 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (80 & 0xFF)) {
1336
1337 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1338 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
1339 input, &ldc_)));
1340 } else {
1341 goto handle_unusual;
1342 }
1343 break;
1344 }
1345
1346 // .stream_executor.dnn.ActivationMode activation = 11;
1347 case 11: {
1348 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (88 & 0xFF)) {
1349 int value = 0;
1350 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1351 int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>(
1352 input, &value)));
1353 set_activation(static_cast< ::stream_executor::dnn::ActivationMode >(value));
1354 } else {
1355 goto handle_unusual;
1356 }
1357 break;
1358 }
1359
1360 // int64 a_address = 12;
1361 case 12: {
1362 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (96 & 0xFF)) {
1363
1364 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1365 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
1366 input, &a_address_)));
1367 } else {
1368 goto handle_unusual;
1369 }
1370 break;
1371 }
1372
1373 // int64 b_address = 13;
1374 case 13: {
1375 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (104 & 0xFF)) {
1376
1377 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1378 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
1379 input, &b_address_)));
1380 } else {
1381 goto handle_unusual;
1382 }
1383 break;
1384 }
1385
1386 // int64 c_address = 14;
1387 case 14: {
1388 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (112 & 0xFF)) {
1389
1390 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1391 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
1392 input, &c_address_)));
1393 } else {
1394 goto handle_unusual;
1395 }
1396 break;
1397 }
1398
1399 // int64 bias_address = 15;
1400 case 15: {
1401 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (120 & 0xFF)) {
1402
1403 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1404 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
1405 input, &bias_address_)));
1406 } else {
1407 goto handle_unusual;
1408 }
1409 break;
1410 }
1411
1412 default: {
1413 handle_unusual:
1414 if (tag == 0) {
1415 goto success;
1416 }
1417 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
1418 input, tag, _internal_metadata_.mutable_unknown_fields()));
1419 break;
1420 }
1421 }
1422 }
1423success:
1424 // @@protoc_insertion_point(parse_success:tensorflow.MatmulProto)
1425 return true;
1426failure:
1427 // @@protoc_insertion_point(parse_failure:tensorflow.MatmulProto)
1428 return false;
1429#undef DO_
1430}
1431#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1432
1433void MatmulProto::SerializeWithCachedSizes(
1434 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
1435 // @@protoc_insertion_point(serialize_start:tensorflow.MatmulProto)
1436 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1437 (void) cached_has_bits;
1438
1439 // .stream_executor.dnn.DataType ab_dtype = 1;
1440 if (this->ab_dtype() != 0) {
1441 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
1442 1, this->ab_dtype(), output);
1443 }
1444
1445 // .stream_executor.dnn.DataType c_dtype = 2;
1446 if (this->c_dtype() != 0) {
1447 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
1448 2, this->c_dtype(), output);
1449 }
1450
1451 // bool trans_a = 3;
1452 if (this->trans_a() != 0) {
1453 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(3, this->trans_a(), output);
1454 }
1455
1456 // bool trans_b = 4;
1457 if (this->trans_b() != 0) {
1458 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(4, this->trans_b(), output);
1459 }
1460
1461 // uint64 m = 5;
1462 if (this->m() != 0) {
1463 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(5, this->m(), output);
1464 }
1465
1466 // uint64 n = 6;
1467 if (this->n() != 0) {
1468 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(6, this->n(), output);
1469 }
1470
1471 // uint64 k = 7;
1472 if (this->k() != 0) {
1473 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(7, this->k(), output);
1474 }
1475
1476 // int64 lda = 8;
1477 if (this->lda() != 0) {
1478 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(8, this->lda(), output);
1479 }
1480
1481 // int64 ldb = 9;
1482 if (this->ldb() != 0) {
1483 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(9, this->ldb(), output);
1484 }
1485
1486 // int64 ldc = 10;
1487 if (this->ldc() != 0) {
1488 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(10, this->ldc(), output);
1489 }
1490
1491 // .stream_executor.dnn.ActivationMode activation = 11;
1492 if (this->activation() != 0) {
1493 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum(
1494 11, this->activation(), output);
1495 }
1496
1497 // int64 a_address = 12;
1498 if (this->a_address() != 0) {
1499 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(12, this->a_address(), output);
1500 }
1501
1502 // int64 b_address = 13;
1503 if (this->b_address() != 0) {
1504 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(13, this->b_address(), output);
1505 }
1506
1507 // int64 c_address = 14;
1508 if (this->c_address() != 0) {
1509 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(14, this->c_address(), output);
1510 }
1511
1512 // int64 bias_address = 15;
1513 if (this->bias_address() != 0) {
1514 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(15, this->bias_address(), output);
1515 }
1516
1517 if (_internal_metadata_.have_unknown_fields()) {
1518 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
1519 _internal_metadata_.unknown_fields(), output);
1520 }
1521 // @@protoc_insertion_point(serialize_end:tensorflow.MatmulProto)
1522}
1523
1524::PROTOBUF_NAMESPACE_ID::uint8* MatmulProto::InternalSerializeWithCachedSizesToArray(
1525 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
1526 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.MatmulProto)
1527 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1528 (void) cached_has_bits;
1529
1530 // .stream_executor.dnn.DataType ab_dtype = 1;
1531 if (this->ab_dtype() != 0) {
1532 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1533 1, this->ab_dtype(), target);
1534 }
1535
1536 // .stream_executor.dnn.DataType c_dtype = 2;
1537 if (this->c_dtype() != 0) {
1538 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1539 2, this->c_dtype(), target);
1540 }
1541
1542 // bool trans_a = 3;
1543 if (this->trans_a() != 0) {
1544 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->trans_a(), target);
1545 }
1546
1547 // bool trans_b = 4;
1548 if (this->trans_b() != 0) {
1549 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->trans_b(), target);
1550 }
1551
1552 // uint64 m = 5;
1553 if (this->m() != 0) {
1554 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(5, this->m(), target);
1555 }
1556
1557 // uint64 n = 6;
1558 if (this->n() != 0) {
1559 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(6, this->n(), target);
1560 }
1561
1562 // uint64 k = 7;
1563 if (this->k() != 0) {
1564 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(7, this->k(), target);
1565 }
1566
1567 // int64 lda = 8;
1568 if (this->lda() != 0) {
1569 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(8, this->lda(), target);
1570 }
1571
1572 // int64 ldb = 9;
1573 if (this->ldb() != 0) {
1574 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(9, this->ldb(), target);
1575 }
1576
1577 // int64 ldc = 10;
1578 if (this->ldc() != 0) {
1579 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(10, this->ldc(), target);
1580 }
1581
1582 // .stream_executor.dnn.ActivationMode activation = 11;
1583 if (this->activation() != 0) {
1584 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1585 11, this->activation(), target);
1586 }
1587
1588 // int64 a_address = 12;
1589 if (this->a_address() != 0) {
1590 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(12, this->a_address(), target);
1591 }
1592
1593 // int64 b_address = 13;
1594 if (this->b_address() != 0) {
1595 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(13, this->b_address(), target);
1596 }
1597
1598 // int64 c_address = 14;
1599 if (this->c_address() != 0) {
1600 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(14, this->c_address(), target);
1601 }
1602
1603 // int64 bias_address = 15;
1604 if (this->bias_address() != 0) {
1605 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(15, this->bias_address(), target);
1606 }
1607
1608 if (_internal_metadata_.have_unknown_fields()) {
1609 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
1610 _internal_metadata_.unknown_fields(), target);
1611 }
1612 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.MatmulProto)
1613 return target;
1614}
1615
1616size_t MatmulProto::ByteSizeLong() const {
1617// @@protoc_insertion_point(message_byte_size_start:tensorflow.MatmulProto)
1618 size_t total_size = 0;
1619
1620 if (_internal_metadata_.have_unknown_fields()) {
1621 total_size +=
1622 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
1623 _internal_metadata_.unknown_fields());
1624 }
1625 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1626 // Prevent compiler warnings about cached_has_bits being unused
1627 (void) cached_has_bits;
1628
1629 // .stream_executor.dnn.DataType ab_dtype = 1;
1630 if (this->ab_dtype() != 0) {
1631 total_size += 1 +
1632 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->ab_dtype());
1633 }
1634
1635 // .stream_executor.dnn.DataType c_dtype = 2;
1636 if (this->c_dtype() != 0) {
1637 total_size += 1 +
1638 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->c_dtype());
1639 }
1640
1641 // uint64 m = 5;
1642 if (this->m() != 0) {
1643 total_size += 1 +
1644 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
1645 this->m());
1646 }
1647
1648 // uint64 n = 6;
1649 if (this->n() != 0) {
1650 total_size += 1 +
1651 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
1652 this->n());
1653 }
1654
1655 // bool trans_a = 3;
1656 if (this->trans_a() != 0) {
1657 total_size += 1 + 1;
1658 }
1659
1660 // bool trans_b = 4;
1661 if (this->trans_b() != 0) {
1662 total_size += 1 + 1;
1663 }
1664
1665 // .stream_executor.dnn.ActivationMode activation = 11;
1666 if (this->activation() != 0) {
1667 total_size += 1 +
1668 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->activation());
1669 }
1670
1671 // uint64 k = 7;
1672 if (this->k() != 0) {
1673 total_size += 1 +
1674 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
1675 this->k());
1676 }
1677
1678 // int64 lda = 8;
1679 if (this->lda() != 0) {
1680 total_size += 1 +
1681 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1682 this->lda());
1683 }
1684
1685 // int64 ldb = 9;
1686 if (this->ldb() != 0) {
1687 total_size += 1 +
1688 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1689 this->ldb());
1690 }
1691
1692 // int64 ldc = 10;
1693 if (this->ldc() != 0) {
1694 total_size += 1 +
1695 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1696 this->ldc());
1697 }
1698
1699 // int64 a_address = 12;
1700 if (this->a_address() != 0) {
1701 total_size += 1 +
1702 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1703 this->a_address());
1704 }
1705
1706 // int64 b_address = 13;
1707 if (this->b_address() != 0) {
1708 total_size += 1 +
1709 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1710 this->b_address());
1711 }
1712
1713 // int64 c_address = 14;
1714 if (this->c_address() != 0) {
1715 total_size += 1 +
1716 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1717 this->c_address());
1718 }
1719
1720 // int64 bias_address = 15;
1721 if (this->bias_address() != 0) {
1722 total_size += 1 +
1723 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1724 this->bias_address());
1725 }
1726
1727 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1728 SetCachedSize(cached_size);
1729 return total_size;
1730}
1731
1732void MatmulProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1733// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.MatmulProto)
1734 GOOGLE_DCHECK_NE(&from, this);
1735 const MatmulProto* source =
1736 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<MatmulProto>(
1737 &from);
1738 if (source == nullptr) {
1739 // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.MatmulProto)
1740 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1741 } else {
1742 // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.MatmulProto)
1743 MergeFrom(*source);
1744 }
1745}
1746
1747void MatmulProto::MergeFrom(const MatmulProto& from) {
1748// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.MatmulProto)
1749 GOOGLE_DCHECK_NE(&from, this);
1750 _internal_metadata_.MergeFrom(from._internal_metadata_);
1751 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1752 (void) cached_has_bits;
1753
1754 if (from.ab_dtype() != 0) {
1755 set_ab_dtype(from.ab_dtype());
1756 }
1757 if (from.c_dtype() != 0) {
1758 set_c_dtype(from.c_dtype());
1759 }
1760 if (from.m() != 0) {
1761 set_m(from.m());
1762 }
1763 if (from.n() != 0) {
1764 set_n(from.n());
1765 }
1766 if (from.trans_a() != 0) {
1767 set_trans_a(from.trans_a());
1768 }
1769 if (from.trans_b() != 0) {
1770 set_trans_b(from.trans_b());
1771 }
1772 if (from.activation() != 0) {
1773 set_activation(from.activation());
1774 }
1775 if (from.k() != 0) {
1776 set_k(from.k());
1777 }
1778 if (from.lda() != 0) {
1779 set_lda(from.lda());
1780 }
1781 if (from.ldb() != 0) {
1782 set_ldb(from.ldb());
1783 }
1784 if (from.ldc() != 0) {
1785 set_ldc(from.ldc());
1786 }
1787 if (from.a_address() != 0) {
1788 set_a_address(from.a_address());
1789 }
1790 if (from.b_address() != 0) {
1791 set_b_address(from.b_address());
1792 }
1793 if (from.c_address() != 0) {
1794 set_c_address(from.c_address());
1795 }
1796 if (from.bias_address() != 0) {
1797 set_bias_address(from.bias_address());
1798 }
1799}
1800
1801void MatmulProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1802// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.MatmulProto)
1803 if (&from == this) return;
1804 Clear();
1805 MergeFrom(from);
1806}
1807
1808void MatmulProto::CopyFrom(const MatmulProto& from) {
1809// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.MatmulProto)
1810 if (&from == this) return;
1811 Clear();
1812 MergeFrom(from);
1813}
1814
1815bool MatmulProto::IsInitialized() const {
1816 return true;
1817}
1818
1819void MatmulProto::InternalSwap(MatmulProto* other) {
1820 using std::swap;
1821 _internal_metadata_.Swap(&other->_internal_metadata_);
1822 swap(ab_dtype_, other->ab_dtype_);
1823 swap(c_dtype_, other->c_dtype_);
1824 swap(m_, other->m_);
1825 swap(n_, other->n_);
1826 swap(trans_a_, other->trans_a_);
1827 swap(trans_b_, other->trans_b_);
1828 swap(activation_, other->activation_);
1829 swap(k_, other->k_);
1830 swap(lda_, other->lda_);
1831 swap(ldb_, other->ldb_);
1832 swap(ldc_, other->ldc_);
1833 swap(a_address_, other->a_address_);
1834 swap(b_address_, other->b_address_);
1835 swap(c_address_, other->c_address_);
1836 swap(bias_address_, other->bias_address_);
1837}
1838
1839::PROTOBUF_NAMESPACE_ID::Metadata MatmulProto::GetMetadata() const {
1840 return GetMetadataStatic();
1841}
1842
1843
1844// @@protoc_insertion_point(namespace_scope)
1845} // namespace tensorflow
1846PROTOBUF_NAMESPACE_OPEN
1847template<> PROTOBUF_NOINLINE ::tensorflow::ConvolutionProto* Arena::CreateMaybeMessage< ::tensorflow::ConvolutionProto >(Arena* arena) {
1848 return Arena::CreateInternal< ::tensorflow::ConvolutionProto >(arena);
1849}
1850template<> PROTOBUF_NOINLINE ::tensorflow::MatmulProto* Arena::CreateMaybeMessage< ::tensorflow::MatmulProto >(Arena* arena) {
1851 return Arena::CreateInternal< ::tensorflow::MatmulProto >(arena);
1852}
1853PROTOBUF_NAMESPACE_CLOSE
1854
1855// @@protoc_insertion_point(global_scope)
1856#include <google/protobuf/port_undef.inc>
1857