1 #include "caffe2/operators/lengths_reducer_fused_8bit_rowwise_ops.h" 2 #include "c10/util/Registry.h" 7 SparseLengthsSumFused8BitRowwise,
8 SparseLengthsFused8BitRowwiseOp<CPUContext>);
9 OPERATOR_SCHEMA(SparseLengthsSumFused8BitRowwise)
12 .ValueKeyLengthInputFillers(
13 SparseLengthsFused8BitRowwiseOp<CPUContext>::DATA,
14 SparseLengthsFused8BitRowwiseOp<CPUContext>::INDICES,
15 SparseLengthsFused8BitRowwiseOp<CPUContext>::LENGTHS)
17 Performs the same operation as SparseLengthsSum, but operating on 18 8-bit rowwise quantized matrices with fused storage (where each row 19 stores quantized values, and then 4-byte scale and 4-byte bias). 24 "uint8 tensor obtained with " 25 "operator FloatToFused8BitRowwiseQuantized")
29 "Integer vector containing indices of the first " 30 "dimension of DATA for the slices that are being aggregated")
34 "Vector with the same sum of elements as the first dimension of DATA")
35 .Output(0,
"output",
"output")
37 NO_GRADIENT(SparseLengthsSumFused8BitRowwise);
39 REGISTER_CPU_OPERATOR(
40 SparseLengthsWeightedSumFused8BitRowwise,
41 SparseLengthsFused8BitRowwiseOp<CPUContext, /*with_weights=*/true>);
42 OPERATOR_SCHEMA(SparseLengthsWeightedSumFused8BitRowwise)
45 .WeightedValueKeyLengthInputFillers(
46 SparseLengthsFused8BitRowwiseOp<CPUContext, true>::DATA,
47 SparseLengthsFused8BitRowwiseOp<CPUContext, true>::INDICES,
48 SparseLengthsFused8BitRowwiseOp<CPUContext, true>::LENGTHS,
49 SparseLengthsFused8BitRowwiseOp<CPUContext, true>::WEIGHTS)
51 Performs the same operation as SparseLengthsWeightedSum, 52 but operating on 8-bit rowwise quantized matrices with fused storage 53 (where each row stores quantized values, and then 4-byte scale and 4-byte bias). 58 "uint8 tensor obtained with " 59 "operator FloatToFused8BitRowwiseQuantized")
63 "Integer vector containing indices of the first " 64 "dimension of DATA for the slices that are being aggregated")
68 "Vector with the same sum of elements as the first dimension of DATA")
72 "Vector of weights to scale rows of DATA with before reduction")
73 .Output(0,
"output",
"output");
75 NO_GRADIENT(SparseLengthsWeightedSumFused8BitRowwise);
77 REGISTER_CPU_OPERATOR(
78 SparseLengthsMeanFused8BitRowwise,
79 SparseLengthsFused8BitRowwiseOp<
83 OPERATOR_SCHEMA(SparseLengthsMeanFused8BitRowwise)
86 .ValueKeyLengthInputFillers(
87 SparseLengthsFused8BitRowwiseOp<CPUContext, false, true>::DATA,
88 SparseLengthsFused8BitRowwiseOp<CPUContext, false, true>::INDICES,
89 SparseLengthsFused8BitRowwiseOp<CPUContext, false, true>::LENGTHS)
91 Performs the same operation as SparseLengthsMean, but 92 operating on 8-bit rowwise quantized matrices with fused storage 93 (where each row stores quantized values, and then 4-byte scale and 4-byte bias). 98 "uint8 tensor obtained with " 99 "operator FloatToFused8BitRowwiseQuantized")
103 "Integer vector containing indices of the first " 104 "dimension of DATA for the slices that are being aggregated")
108 "Vector with the same sum of elements as the first dimension of DATA")
109 .Output(0,
"output",
"output");
110 NO_GRADIENT(SparseLengthsMeanFused8BitRowwise);
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...