adding OpProfile proto into ProfDAGProtos to support storing operation cost (#26677)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/26677

This diff adds OpProfile proto into ProfDAGProtos to support storing operation cost. During performance estimation idx, net_name, type, and exec_time will be stored in this proto.

Test Plan:
```
buck test caffe2/caffe2/fb/net_transforms/tests/:stats_collector_test
buck test caffe2/caffe2/fb/net_transforms/tests/:perf_estimator_test
buck run caffe2/caffe2/fb/distribute/snntest/cogwheel/:cogwheel_snntest_offline_training_simple_online_training
```

Reviewed By: heslami

Differential Revision: D17533791

fbshipit-source-id: a339c8eadcac891aa631daaf64522b69876b5045
This commit is contained in:
Wenqi Cao 2019-09-23 20:42:39 -07:00 committed by Facebook Github Bot
parent ba8002ec13
commit fbc3c14830

View file

@ -57,4 +57,13 @@ message ProfDAGProto {
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;
}