1 #include "caffe2/operators/gather_fused_8bit_rowwise_op.h" 5 OPERATOR_SCHEMA(GatherFused8BitRowwise)
9 Perform the same operation as Gather, but operating on 8-bit rowwise quantized 10 matrices with fused storage (where each row stores quantized values, and then 11 the scale and offset). 12 DATA needs to have rank 2 and INDICES needs to have rank 1. 17 "uint8 tensor with rank 2 obtained with operator FloatToFused8BitRowwiseQuantized")
21 "Integer vector containing indices of the first dimension of DATA for" 22 "the rows that are being gathered")
23 .Output(0,
"OUTPUT",
"output")
24 .TensorInferenceFunction([](
const OperatorDef& def,
25 const vector<TensorShape>& in) {
26 vector<TensorShape> out(1);
27 for (
auto d : in[1].dims()) {
30 for (
int i = 1; i < in[0].dims_size(); ++i) {
31 out[0].add_dims(in[0].dims(i));
33 out[0].set_data_type(in[0].data_type());
37 REGISTER_CPU_OPERATOR(
38 GatherFused8BitRowwise,
39 GatherFused8BitRowwiseOp<CPUContext>);
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...