llvm/mlir/lib/Dialect/Quant/IR/QuantTypes.cpp

//===- QuantOps.cpp - Quantization Type and Ops Implementation --*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/Quant/QuantTypes.h"
#include "TypeDetail.h"
#include "mlir/Dialect/Quant/QuantOps.h"

#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/MLIRContext.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/MathExtras.h"

usingnamespacemlir;
usingnamespacemlir::quant;
usingnamespacemlir::quant::detail;

unsigned QuantizedType::getFlags() const {}

bool QuantizedType::classof(Type type) {}

LogicalResult
QuantizedType::verifyInvariants(function_ref<InFlightDiagnostic()> emitError,
                                unsigned flags, Type storageType,
                                Type expressedType, int64_t storageTypeMin,
                                int64_t storageTypeMax) {}

Type QuantizedType::getStorageType() const {}

int64_t QuantizedType::getStorageTypeMin() const {}

int64_t QuantizedType::getStorageTypeMax() const {}

unsigned QuantizedType::getStorageTypeIntegralWidth() const {}

Type QuantizedType::getExpressedType() const {}

bool QuantizedType::isCompatibleExpressedType(Type candidateExpressedType) {}

QuantizedType
QuantizedType::getQuantizedElementType(Type primitiveOrContainerType) {}

Type QuantizedType::castFromStorageType(Type candidateType) {}

Type QuantizedType::castToStorageType(Type quantizedType) {}

Type QuantizedType::castFromExpressedType(Type candidateType) {}

Type QuantizedType::castToExpressedType(Type quantizedType) {}

Type QuantizedType::castExpressedToStorageType(Type candidateType) {}

AnyQuantizedType AnyQuantizedType::get(unsigned flags, Type storageType,
                                       Type expressedType,
                                       int64_t storageTypeMin,
                                       int64_t storageTypeMax) {}

AnyQuantizedType
AnyQuantizedType::getChecked(function_ref<InFlightDiagnostic()> emitError,
                             unsigned flags, Type storageType,
                             Type expressedType, int64_t storageTypeMin,
                             int64_t storageTypeMax) {}

LogicalResult
AnyQuantizedType::verifyInvariants(function_ref<InFlightDiagnostic()> emitError,
                                   unsigned flags, Type storageType,
                                   Type expressedType, int64_t storageTypeMin,
                                   int64_t storageTypeMax) {}

UniformQuantizedType UniformQuantizedType::get(unsigned flags, Type storageType,
                                               Type expressedType, double scale,
                                               int64_t zeroPoint,
                                               int64_t storageTypeMin,
                                               int64_t storageTypeMax) {}

UniformQuantizedType UniformQuantizedType::getChecked(
    function_ref<InFlightDiagnostic()> emitError, unsigned flags,
    Type storageType, Type expressedType, double scale, int64_t zeroPoint,
    int64_t storageTypeMin, int64_t storageTypeMax) {}

LogicalResult UniformQuantizedType::verifyInvariants(
    function_ref<InFlightDiagnostic()> emitError, unsigned flags,
    Type storageType, Type expressedType, double scale, int64_t zeroPoint,
    int64_t storageTypeMin, int64_t storageTypeMax) {}

double UniformQuantizedType::getScale() const {}

int64_t UniformQuantizedType::getZeroPoint() const {}

UniformQuantizedPerAxisType UniformQuantizedPerAxisType::get(
    unsigned flags, Type storageType, Type expressedType,
    ArrayRef<double> scales, ArrayRef<int64_t> zeroPoints,
    int32_t quantizedDimension, int64_t storageTypeMin,
    int64_t storageTypeMax) {}

UniformQuantizedPerAxisType UniformQuantizedPerAxisType::getChecked(
    function_ref<InFlightDiagnostic()> emitError, unsigned flags,
    Type storageType, Type expressedType, ArrayRef<double> scales,
    ArrayRef<int64_t> zeroPoints, int32_t quantizedDimension,
    int64_t storageTypeMin, int64_t storageTypeMax) {}

LogicalResult UniformQuantizedPerAxisType::verifyInvariants(
    function_ref<InFlightDiagnostic()> emitError, unsigned flags,
    Type storageType, Type expressedType, ArrayRef<double> scales,
    ArrayRef<int64_t> zeroPoints, int32_t quantizedDimension,
    int64_t storageTypeMin, int64_t storageTypeMax) {}

ArrayRef<double> UniformQuantizedPerAxisType::getScales() const {}

ArrayRef<int64_t> UniformQuantizedPerAxisType::getZeroPoints() const {}

int32_t UniformQuantizedPerAxisType::getQuantizedDimension() const {}

CalibratedQuantizedType CalibratedQuantizedType::get(Type expressedType,
                                                     double min, double max) {}

CalibratedQuantizedType CalibratedQuantizedType::getChecked(
    function_ref<InFlightDiagnostic()> emitError, Type expressedType,
    double min, double max) {}

LogicalResult CalibratedQuantizedType::verifyInvariants(
    function_ref<InFlightDiagnostic()> emitError, Type expressedType,
    double min, double max) {}

double CalibratedQuantizedType::getMin() const {}

double CalibratedQuantizedType::getMax() const {}