pytorch/caffe2/quantization/server/compute_equalization_scale.h
Haixin Liu 1539d4a664 Add operator to compute the equalization scale (#45096)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/45096

Add operator to compute the equalization scale. This will be used in the integration of equalization into dper int8 fixed quant scheme quantization flow.

Design docs:
https://fb.quip.com/bb7SAGBxPGNC

https://fb.quip.com/PDAOAsgoLfRr

Test Plan: buck test caffe2/caffe2/quantization/server:compute_equalization_scale_test

Reviewed By: jspark1105

Differential Revision: D23779870

fbshipit-source-id: 5e6a8c220935a142ecf8e61100a8c71932afa8d7
2020-09-24 15:19:49 -07:00

19 lines
503 B
C++

// Copyright 2004-present Facebook. All Rights Reserved.
#pragma once
#include "caffe2/quantization/server/caffe2_dnnlowp_utils.h"
#include "caffe2/quantization/server/dnnlowp.h"
namespace caffe2 {
class ComputeEqualizationScaleOp final : public Operator<CPUContext> {
public:
ComputeEqualizationScaleOp(const OperatorDef& operator_def, Workspace* ws)
: Operator<CPUContext>(operator_def, ws) {}
bool RunOnDevice() override;
}; // class ComputeEqualizationScaleOp
} // namespace caffe2