pytorch/caffe2/quantization/server/l2_minimization.h
Jongsoo Park 90ed2f5aca minimize code compiled with avx2 and header includes from them (#14313)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14313

Pull Request resolved: https://github.com/pytorch/FBGEMM/pull/22

This diff is an attempt to minimize code compiled with avx2.

Reviewed By: dskhudia

Differential Revision: D13166591

fbshipit-source-id: 2be241141f6d7478b86a422953791e237ff10268
2018-11-26 11:09:21 -08:00

33 lines
593 B
C++

#pragma once
#include "quantization_error_minimization.h"
#include <algorithm>
#include <cassert>
#include <cmath>
#include <iostream>
#include <limits>
namespace dnnlowp {
/**
* A quantization scheme that minimizes L2 norm of quantization error.
*/
class L2ErrorMinimization : public NormMinimization {
public:
L2ErrorMinimization() : NormMinimization(L2){};
};
namespace internal {
float L2MinimizationKernelAVX2(
int precision,
float* bins,
int nbins,
float bin_width,
float dst_bin_width,
int start_bin);
} // namespace internal
} // namespace dnnlowp