runtime.proto 2.64 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
syntax = "proto2";

import "dragnn/protos/spec.proto";

package syntaxnet.dragnn.runtime;

// Performance tuning settings that only affect resource usage, not annotated
// output or correctness.  This should be attached to the MasterSpec used to
// initialize a Master.
//
// NEXT ID: 2
message MasterPerformanceSettings {
  extend MasterSpec {
    optional MasterPerformanceSettings master_spec_extension = 160848628;
  }

  // Maximum size of the free list in the SessionStatePool.  NB: The default
  // value may occasionally change.
Terry Koo's avatar
Terry Koo committed
19
  optional uint64 session_state_pool_max_free_states = 1 [default = 16];
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
}

// As above, but for component-specific performance tuning settings.
//
// NEXT ID: 2
message ComponentPerformanceSettings {
  extend ComponentSpec {
    optional ComponentPerformanceSettings component_spec_extension = 160999422;
  }

  // Number of steps to pre-allocate for the relevant component.  NB: The
  // default value may occasionally change.
  optional uint32 pre_allocate_num_steps = 1 [default = 50];
}

// Specification of an ArrayVariableStore.
//
// NEXT ID: 5
message ArrayVariableStoreSpec {
  // Characteristics of the variable data.  The binary that loads the variables
  // must match these characteristics.
  optional uint32 version = 1;  // required version of the byte array format
  optional uint32 alignment_bytes = 2;  // required alignment of the byte array
  optional bool is_little_endian = 3;  // required endian-ness of the byte array

  // Variable specifications, in order of appearance in the byte array.
  repeated VariableSpec variable = 4;
}

// Specification of a single serialized variable.
//
// NEXT ID: 6
message VariableSpec {
  // Formats for serialized pre-trained variables.  See VariableStore::Lookup()
  // for descriptions of the enumerators.
  enum Format {
    FORMAT_UNKNOWN = 0;
    FORMAT_FLAT = 1;
    FORMAT_ROW_MAJOR_MATRIX = 2;
    FORMAT_COLUMN_BLOCKED_ROW_MAJOR_MATRIX = 3;
  }

  // Name of the variable.
  optional string name = 1;

  // Format of the variable.
  optional Format format = 2 [default = FORMAT_UNKNOWN];

  // Dimensions of variables. The semantics depends on the format, but is always
  // in logical units (number of floats, etc.) rather than bytes,
  //
  //  * flat: single value with the length of the vector
  //  * row-major and column-major: two values, [rows, columns]
  //  * row-blocked column-major: three values, [rows, columns, row_block_size]
  repeated uint32 dimension = 5;

  // Number of sub-views in the AlignedArea that contained the variable.
  optional uint64 num_views = 3;

  // Sub-view size in bytes for the AlignedArea that contained the variable.
  optional uint64 view_size = 4;
}