This is a simple registry for "reference implementations" of operators. The idea is that when we test tc compiled kernels, it is useful to have a vanilla Caffe2 implementation which we can compare the result against.
Logically, the reference implementation registry is a mapping from a tc operator to a Caffe2 NetDef which implements that operator using plain Caffe2 operators. For implementation convenience, what we actually record is a function (ReferenceImplementation) which knows how to take a (tc) operator definition, and translate it into a sequence of caffe2 operator definitions, placing those operators into a pre-existing NetDef. You can see examples of how this works by grepping for TC_REFERENCE_IMPLEMENTATION. In pictorial form, if you have:
input ---> tc op ---> output
^_____ OperatorDef&
then if you pass this OperatorDef& and a partially constructed NetDef of the form (note that this NetDef has equivalently named inputs):
input --X
then ReferenceImplementation will add the reference implementation for tc to your NetDef.
input ---> caffe2 op1 ---> caffe2 op2 ---> output
ConvertNet takes an entire NetDef of tc operators, and replaces all of them with reference implementations. ReferenceImplementationRegistry is a singleton for ease of defining implementations.