Caffe2 - C++ API
A deep learning, cross platform ML framework
fully_connected_dnnlowp_acc16_op.h
1 #pragma once
2 
3 #include "fully_connected_dnnlowp_op.h"
4 
5 namespace caffe2 {
6 
12  : public FullyConnectedDNNLowPOp<std::uint8_t> {
13  public:
14  FullyConnectedDNNLowPAcc16Op(const OperatorDef& operator_def, Workspace* ws);
15  bool RunOnDevice() override;
16 
17  USE_OPERATOR_FUNCTIONS(CPUContext);
19 
20  using BaseType::dequantize_output_;
21  using BaseType::in_qparams_;
22  using BaseType::InputTensorCPU_;
23  using BaseType::out_qparams_;
24  using BaseType::OutputTensorCPU_;
25  using BaseType::W_quantized_;
26 
27  private:
28  std::shared_ptr<fbgemm::PackBMatrix<std::int8_t, std::int16_t>>
29  Wq_acc16_packed_;
30 
31  // Wq outlier in CSC format
32  std::shared_ptr<fbgemm::CompressedSparseColumn> Wq_outlier_;
33  int nbits_in_non_outlier_;
34  int copy_to_32bit_frequency_;
35 }; // class FullyConnectedDNNLowPAcc16Op
36 
37 } // namespace caffe2
The CPU Context, representing the bare minimum of what a Context class in Caffe2 should implement...
Definition: context.h:40
Workspace is a class that holds all the related objects created during runtime: (1) all blobs...
Definition: workspace.h:47
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...
Definition: blob.h:13
Quantized FC operator with 16-bit accumulation.