mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
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
33 lines
593 B
C++
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
|