My Project
QuantizeUtils.h
Go to the documentation of this file.
1 //===- QuantizeUtils.h - Support utilities for quantization -----*- C++ -*-===//
2 //
3 // Part of the MLIR Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef MLIR_DIALECT_QUANTOPS_QUANTIZEUTILS_H_
10 #define MLIR_DIALECT_QUANTOPS_QUANTIZEUTILS_H_
11 
12 namespace mlir {
13 class Attribute;
14 class Type;
15 
16 namespace quant {
17 class QuantizedType;
18 class UniformQuantizedType;
19 class UniformQuantizedValueConverter;
20 
36 Attribute quantizeAttr(Attribute realValue, QuantizedType quantizedElementType,
37  Type &outConvertedType);
38 
54 Attribute quantizeAttrUniform(Attribute realValue,
55  UniformQuantizedType quantizedElementType,
56  const UniformQuantizedValueConverter &converter,
57  Type &outConvertedType);
58 } // namespace quant
59 } // namespace mlir
60 
61 #endif // MLIR_DIALECT_QUANTOPS_QUANTIZEUTILS_H_
Definition: InferTypeOpInterface.cpp:20
Definition: Attributes.h:139
Attribute quantizeAttrUniform(Attribute realValue, UniformQuantizedType quantizedElementType, const UniformQuantizedValueConverter &converter, Type &outConvertedType)
Definition: QuantizeUtils.cpp:99
Attribute quantizeAttr(Attribute realValue, QuantizedType quantizedElementType, Type &outConvertedType)
Definition: QuantizeUtils.cpp:127