tensorflow/core/kernels/quantization_utils_test.cc
// Verify that FloatToQuantizedInPlaceUsingEigen is same result as
// FloatToQuantized.
Verify that FloatToQuantizedInPlaceUsingEigen is same result as
FloatToQuantized.
Verify that FloatToQuantizedInPlaceUsingEigen is same result as FloatToQuantized .
void TestFloatToQuantizedInPlaceUsingEigen() {
  thread::ThreadPool threadpool(Env::Default(), "test", 2 );
  Eigen::ThreadPoolDevice eigen_device(threadpool.AsEigenThreadPool(),
                                       2 );
  TestFloatToQuantizedInPlaceUsingEigen<quint8>(&eigen_device);
  TestFloatToQuantizedInPlaceUsingEigen<qint8>(&eigen_device);
  TestFloatToQuantizedInPlaceUsingEigen<quint16>(&eigen_device);
  TestFloatToQuantizedInPlaceUsingEigen<qint16>(&eigen_device);
}
void TestFloatToQuantizedInPlaceUsingEigen ( ) { thread :: ThreadPool threadpool ( Env :: Default ( ) , " " , 2 ) ; Eigen :: ThreadPoolDevice eigen_device ( threadpool . AsEigenThreadPool ( ) , 2 ) ; TestFloatToQuantizedInPlaceUsingEigen < quint8 > ( & eigen_device ) ; TestFloatToQuantizedInPlaceUsingEigen < qint8 > ( & eigen_device ) ; TestFloatToQuantizedInPlaceUsingEigen < quint16 > ( & eigen_device ) ; TestFloatToQuantizedInPlaceUsingEigen < qint16 > ( & eigen_device ) ; }
Verify that FloatToQuantizedInPlaceUsingEigen is same result as
FloatToQuantized.
Verify that FloatToQuantizedInPlaceUsingEigen is same result as FloatToQuantized .
/* num_threads */ /* num_threads */