• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto3";
2
3package tensorflow;
4
5import "tensorflow/core/framework/attr_value.proto";
6
7option cc_enable_arenas = true;
8option java_outer_classname = "KernelDefProtos";
9option java_multiple_files = true;
10option java_package = "org.tensorflow.framework";
11option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework/kernel_def_go_proto";
12
13message KernelDef {
14  // Must match the name of an Op.
15  string op = 1;
16
17  // Type of device this kernel runs on.
18  string device_type = 2;
19
20  message AttrConstraint {
21    // Name of an attr from the Op.
22    string name = 1;
23
24    // A list of values that this kernel supports for this attr.
25    // Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
26    AttrValue allowed_values = 2;
27  }
28  repeated AttrConstraint constraint = 3;
29
30  // Names of the Op's input_/output_args that reside in host memory
31  // instead of device memory.
32  repeated string host_memory_arg = 4;
33
34  // This allows experimental kernels to be registered for an op that
35  // won't be used unless the user specifies a "_kernel" attr with
36  // value matching this.
37  string label = 5;
38
39  // Prioritization of kernel amongst different devices. By default we assume
40  // priority is 0. The higher the priority the better. By default (i.e. if
41  // this is not set), we prefer GPU kernels over CPU.
42  int32 priority = 6;
43}
44
45// A collection of KernelDefs
46message KernelList {
47  repeated KernelDef kernel = 1;
48}
49