1syntax = "proto3";
2
3package tensorflow;
4option cc_enable_arenas = true;
5option java_outer_classname = "KernelDefProtos";
6option java_multiple_files = true;
7option java_package = "org.tensorflow.framework";
8
9import "tensorflow/core/framework/attr_value.proto";
10
11message KernelDef {
12  // Must match the name of an Op.
13  string op = 1;
14
15  // Type of device this kernel runs on.
16  string device_type = 2;
17
18  message AttrConstraint {
19    // Name of an attr from the Op.
20    string name = 1;
21
22    // A list of values that this kernel supports for this attr.
23    // Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
24    AttrValue allowed_values = 2;
25  }
26  repeated AttrConstraint constraint = 3;
27
28  // Names of the Op's input_/output_args that reside in host memory
29  // instead of device memory.
30  repeated string host_memory_arg = 4;
31
32  // This allows experimental kernels to be registered for an op that
33  // won't be used unless the user specifies a "_kernel" attr with
34  // value matching this.
35  string label = 5;
36}
37