keep extra_info of each op in ProfDagStats (#15244)
authorDong Li <dongli@fb.com>
Fri, 28 Dec 2018 23:00:41 +0000 (15:00 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 28 Dec 2018 23:03:23 +0000 (15:03 -0800)
commitcd3c4a2f1c06c7fc9409d486fbd9e4edd40fb162
tree6860cd776929c1bc434f620b98a0a298101a3d79
parent692898fe379c9092f5e380797c32305145cd06e1
keep extra_info of each op in ProfDagStats (#15244)

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

This DIFF keeps track of the extra_info information attached to each operator. When getPerOpStas() is called, it attaches the extra_info to the result ProfDagStats protobuf.

Facebook
Net transform attaches a global_op_id which is defined as a tuple of (orig_net_name, original_op_index) to each operator,
The global_op_id is encoded as extra_info in each operator.

Reviewed By: aazzolini

Differential Revision: D13016289

fbshipit-source-id: 3e2719ec7ed0ebe47740b77581c565ff7e79b102
caffe2/core/prof_dag_counters.cc
caffe2/core/prof_dag_counters.h
caffe2/proto/prof_dag.proto