"test/srt/test_flashmla.py" did not exist on "e79f7420bec0aa9d9ed8d58ac2590ed67133c413"
export.proto 2.51 KB
Newer Older
Terry Koo's avatar
Terry Koo committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
syntax = "proto2";

import "dragnn/protos/spec.proto";

package syntaxnet.dragnn.runtime;

// Specification of a subgraph of TF nodes that make up a network cell.
//
// Roughly speaking, a "cell" consists of the "pure math" parts of a DRAGNN
// component, and is intended to be exported to a NN compiler.  The set of
// operations that make up a cell may change over time, but currently the
// boundaries of a cell are:
//
// Inputs:
//   * Fixed feature IDs.
//   * Linked feature embeddings, before pass_through_embedding_matrix().
//   * Recurrent context tensors.
//
// Outputs:
//   * Network unit layers.
message CellSubgraphSpec {
  // An input to the subgraph.
  message Input {
    // Possible types of input.
    enum Type {
      TYPE_UNKNOWN = 0;

      // An input derived from a fixed or linked feature.
      TYPE_FEATURE = 1;

      // An input that refers to an output of the previous iteration of the
      // transition loop.  The input must have the same name as the output to
      // which it refers.  On the first iteration, its value is zero.
      //
      // This is used by, e.g., LSTMNetwork, which reads its cell state from the
      // context_tensor_arrays instead of from a linked feature.
      TYPE_RECURRENT = 2;
    }

    // Logical name of the input (e.g., "lstm_c", "linked_feature_0").  Must be
    // unique among the inputs of the cell.
    optional string name = 1;

    // Tensor containing the input (e.g., "annotation/rnn/split:1").  Must be
    // unique among the inputs of the cell.
    optional string tensor = 2;

    // Type of input.
    optional Type type = 3 [default = TYPE_UNKNOWN];
  }

  // An output of the subgraph.
  message Output {
    // Logical name of the output (e.g., "lstm_c", "layer_0").  Must be unique
    // among the outputs of the cell.
    optional string name = 1;

    // Tensor containing the output (e.g., "annotation/rnn/split:1").  Need not
    // be unique; duplicate outputs for the same tensor are treated as aliases.
    optional string tensor = 2;
  }

  // Inputs of the subgraph.
  repeated Input input = 1;

  // Outputs of the subgraph.
  repeated Output output = 2;
}

// Additional information to compile a component.
//
// NEXT ID: 3
message CompilationSpec {
  extend ComponentSpec {
    optional CompilationSpec component_spec_extension = 174770970;
  }

  // A unique name of the entire DRAGNN model where this component is used.
  optional string model_name = 1;

  // The subgraph specification for this component.
  optional CellSubgraphSpec cell_subgraph_spec = 2;
}