pytorch/caffe2/operators/data_couple.cc
Dong Shi da3dd9af12 No Op Optimizer (#12390)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/12390

Introduce a no op optimizer for when we don't want updates to happen, but don't want to affect downstream processes.

Reviewed By: mlappelbaum

Differential Revision: D10209812

fbshipit-source-id: 2af4ebc0fb42e78ea851c3a9f4860f3d224037b6
2018-10-10 18:09:46 -07:00

17 lines
590 B
C++

#include "caffe2/operators/data_couple.h"
namespace caffe2 {
REGISTER_CPU_OPERATOR(DataCouple, DataCoupleOp<CPUContext>);
OPERATOR_SCHEMA(DataCouple)
.EnforceOneToOneInplace()
.SetDoc(R"DOC(
A one to one operator that takes an arbitrary number of input and output blobs
such that each input blob is inplace with it's matching output blob. It then proceedes
to do nothing with each of these operators. This serves two purposes. It can make it
appear as if a blob has been written to, as well as can tie together different blobs
in a data dependency
)DOC");
} // namespace caffe2