1syntax = "proto3"; 2 3package tensorflow; 4option cc_enable_arenas = true; 5option java_outer_classname = "CostGraphProtos"; 6option java_multiple_files = true; 7option java_package = "org.tensorflow.framework"; 8option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; 9import "tensorflow/core/framework/tensor_shape.proto"; 10import "tensorflow/core/framework/types.proto"; 11 12message CostGraphDef { 13 message Node { 14 // The name of the node. Names are globally unique. 15 string name = 1; 16 17 // The device of the node. Can be empty if the node is mapped to the 18 // default partition or partitioning hasn't been run yet. 19 string device = 2; 20 21 // The id of the node. Node ids are only unique inside a partition. 22 int32 id = 3; 23 24 // Inputs of this node. They must be executed before this node can be 25 // executed. An input is a particular output of another node, specified 26 // by the node id and the output index. 27 message InputInfo { 28 int32 preceding_node = 1; 29 int32 preceding_port = 2; 30 } 31 repeated InputInfo input_info = 4; 32 33 // Outputs of this node. 34 message OutputInfo { 35 int64 size = 1; 36 // If >= 0, the output is an alias of an input. Note that an alias input 37 // may itself be an alias. The algorithm will therefore need to follow 38 // those pointers. 39 int64 alias_input_port = 2; 40 TensorShapeProto shape = 3; 41 DataType dtype = 4; 42 } 43 repeated OutputInfo output_info = 5; 44 45 // Temporary memory used by this node. 46 int64 temporary_memory_size = 6; 47 48 // Persistent memory used by this node. 49 int64 persistent_memory_size = 12; 50 51 int64 host_temp_memory_size = 10 [deprecated = true]; 52 int64 device_temp_memory_size = 11 [deprecated = true]; 53 int64 device_persistent_memory_size = 16 [deprecated = true]; 54 55 // Estimate of the computational cost of this node, in microseconds. 56 int64 compute_cost = 9; 57 58 // Analytical estimate of the computational cost of this node, in 59 // microseconds. 60 int64 compute_time = 14; 61 62 // Analytical estimate of the memory access cost of this node, in 63 // microseconds. 64 int64 memory_time = 15; 65 66 // If true, the output is permanent: it can't be discarded, because this 67 // node is part of the "final output". Nodes may depend on final nodes. 68 bool is_final = 7; 69 70 // Ids of the control inputs for this node. 71 repeated int32 control_input = 8; 72 73 // Are the costs inaccurate? 74 bool inaccurate = 17; 75 } 76 repeated Node node = 1; 77} 78