// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include "core/framework/tensor.h" #include #include #include // TODO(kreeger): Move this folder to a quantization utils/toolkit folder. namespace onnxruntime { namespace contrib { // function that transform array of input value to array of output value of length typedef std::function LookupTableArrayTransformer; // function that transform single value typedef std::function LookupTableScalarTransformer; template void QlinearBuildLookupTable(uint8_t* table, const Tensor* tensor_x_scale, const Tensor* tensor_x_zero_point, const Tensor* tensor_y_scale, const Tensor* tensor_y_zero_point, const LookupTableArrayTransformer& array_values_transformer); template void QlinearBuildLookupTable(uint8_t* table, const Tensor* tensor_x_scale, const Tensor* tensor_x_zero_point, const Tensor* tensor_y_scale, const Tensor* tensor_y_zero_point, const LookupTableScalarTransformer& value_transformer); template void QLinearLookupTableTransform(const uint8_t* x, const TOutput* table, TOutput* y, size_t n); } // namespace contrib } // namespace onnxruntime