forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prof_dag.proto
69 lines (57 loc) · 2.12 KB
/
prof_dag.proto
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
syntax = "proto2";
package caffe2;
// A few notes about the Caffe2's protobuffer convention:
// (1) Most objects are registered by their types, such as operators and nets.
// For these, we have a string-type field "type" for registration purposes.
// (2) We do not use extension because that used to create quite some conflicts
// in Caffe's protobuf design.
// (3) We have not used any proto3 specific features, such as Any or Map. This
// is mainly for backward compatibility purposes but we may consider using
// those in the future.
// A two number summary for a value. It also has count for restoring.
message TwoNumberStatsProto {
optional float mean = 1;
optional float stddev = 2;
optional int64 count = 3;
}
// Blob profiling information. Profile for a blob is created every time
// a node outputs to the blob.
message BlobProfile {
// Name of the blob (corresponds to OperatorDef.output).
optional string name = 1; // required
// Profiling statistics.
optional TwoNumberStatsProto bytes_used = 3;
}
// Protobuf format to serialize profiler data.
message ProfDAGProto {
// The name for the operator
required string name = 1;
// The mean execution time
required float mean = 2;
// The standard deviation
required float stddev = 3;
// New field to represent the numbers above, and with count.
optional TwoNumberStatsProto execution_time = 4;
// Blob profiles that this node outputs.
repeated BlobProfile output_profile = 5;
// The extra_info from the operator device option.
repeated string extra_info = 7;
}
// Operator profiling information.
//
// Note: The indices for elements of 'stats' and the indices of
// 'output_profile' inside each 'stats' are assumed to match the
// indices of 'op' elements of a corresponding NetDef and the 'output'
// indices within each 'op'.
message ProfDAGProtos {
repeated ProfDAGProto stats = 1;
optional string net_name = 2;
repeated OpProfile ops_stats = 3;
}
// Represents specification of an operation cost.
message OpProfile {
optional string idx = 1;
optional string net_name = 2;
optional string type = 3;
optional float exec_time_secs = 4;
}