1// LINT: LEGACY_NAMES 2/* Copyright 2021 The TensorFlow Authors. All Rights Reserved. 3 4Licensed under the Apache License, Version 2.0 (the "License"); 5you may not use this file except in compliance with the License. 6You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10Unless required by applicable law or agreed to in writing, software 11distributed under the License is distributed on an "AS IS" BASIS, 12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13See the License for the specific language governing permissions and 14limitations under the License. 15==============================================================================*/ 16 17// Protocol messages for describing parameters of convolution-related 18// operations. 19 20// For Google-internal use only. 21syntax = "proto3"; 22 23package tensorflow; 24 25import "tensorflow/core/framework/types.proto"; 26import "tensorflow/stream_executor/dnn.proto"; 27 28// This is the underlying data structure of class ConvParameters, which are used 29// as the keys in cuDNN autotuning maps for retrieving corresponding cuDNN 30// algorithms. This is used as a serialization format for saving/loading 31// autotuning databases. 32message ConvParametersProto { 33 // This stores the information for fused convolution operations where an 34 // activation and a side input might follow the convolution. 35 message Fusion { 36 // If true, this proto corresponds to a FusedConvBiasActivation operation 37 // implemented in the contrib library, otherwise this proto corresponds to 38 // the FusedConv operation implemented in the core library. 39 // Compared with FusedConv, FusedConvBiasActivation supports more types of 40 // activation function (including no activation) as well as the side_input. 41 // For now they have same type of keys in autotune maps, but the semantics 42 // of some fields (like padding) are different. So we add this field to 43 // distinguish them. 44 // TODO(b/177365158) Remove this field once these two operations are merged. 45 bool is_contrib = 1; 46 stream_executor.dnn.ActivationMode activation_mode = 2; 47 bool has_side_input = 3; 48 } 49 int64 batch = 1; 50 int64 in_depths = 2; 51 int64 out_depths = 3; 52 repeated int64 in = 4; 53 // data_format corresponds to type TensorFormat in 54 // third_party/tensorflow/core/util/tensor_format.h. 55 int32 data_format = 5; 56 repeated int64 filter = 6; 57 repeated int64 dilation = 7; 58 repeated int64 stride = 8; 59 repeated int64 padding = 9; 60 tensorflow.DataType dtype = 10; 61 int32 group_count = 11; 62 // A string uniquely identifying a particular GPU model, e.g. V100 vs RTX 63 // 2080. 64 string device_identifier = 12; 65 Fusion fusion = 13; 66} 67