llvm/mlir/lib/CAPI/Dialect/Quant.cpp

//===- Quant.cpp - C Interface for Quant dialect --------------------------===//
//
// 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-c/Dialect/Quant.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/Quant/QuantOps.h"
#include "mlir/Dialect/Quant/QuantTypes.h"

usingnamespacemlir;

MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(quant, quant, quant::QuantizationDialect)

//===---------------------------------------------------------------------===//
// QuantizedType
//===---------------------------------------------------------------------===//

bool mlirTypeIsAQuantizedType(MlirType type) {}

unsigned mlirQuantizedTypeGetSignedFlag() {}

int64_t mlirQuantizedTypeGetDefaultMinimumForInteger(bool isSigned,
                                                     unsigned integralWidth) {}

int64_t mlirQuantizedTypeGetDefaultMaximumForInteger(bool isSigned,
                                                     unsigned integralWidth) {}

MlirType mlirQuantizedTypeGetExpressedType(MlirType type) {}

unsigned mlirQuantizedTypeGetFlags(MlirType type) {}

bool mlirQuantizedTypeIsSigned(MlirType type) {}

MlirType mlirQuantizedTypeGetStorageType(MlirType type) {}

int64_t mlirQuantizedTypeGetStorageTypeMin(MlirType type) {}

int64_t mlirQuantizedTypeGetStorageTypeMax(MlirType type) {}

unsigned mlirQuantizedTypeGetStorageTypeIntegralWidth(MlirType type) {}

bool mlirQuantizedTypeIsCompatibleExpressedType(MlirType type,
                                                MlirType candidate) {}

MlirType mlirQuantizedTypeGetQuantizedElementType(MlirType type) {}

MlirType mlirQuantizedTypeCastFromStorageType(MlirType type,
                                              MlirType candidate) {}

MlirType mlirQuantizedTypeCastToStorageType(MlirType type) {}

MlirType mlirQuantizedTypeCastFromExpressedType(MlirType type,
                                                MlirType candidate) {}

MlirType mlirQuantizedTypeCastToExpressedType(MlirType type) {}

MlirType mlirQuantizedTypeCastExpressedToStorageType(MlirType type,
                                                     MlirType candidate) {}

//===---------------------------------------------------------------------===//
// AnyQuantizedType
//===---------------------------------------------------------------------===//

bool mlirTypeIsAAnyQuantizedType(MlirType type) {}

MlirType mlirAnyQuantizedTypeGet(unsigned flags, MlirType storageType,
                                 MlirType expressedType, int64_t storageTypeMin,
                                 int64_t storageTypeMax) {}

//===---------------------------------------------------------------------===//
// UniformQuantizedType
//===---------------------------------------------------------------------===//

bool mlirTypeIsAUniformQuantizedType(MlirType type) {}

MlirType mlirUniformQuantizedTypeGet(unsigned flags, MlirType storageType,
                                     MlirType expressedType, double scale,
                                     int64_t zeroPoint, int64_t storageTypeMin,
                                     int64_t storageTypeMax) {}

double mlirUniformQuantizedTypeGetScale(MlirType type) {}

int64_t mlirUniformQuantizedTypeGetZeroPoint(MlirType type) {}

bool mlirUniformQuantizedTypeIsFixedPoint(MlirType type) {}

//===---------------------------------------------------------------------===//
// UniformQuantizedPerAxisType
//===---------------------------------------------------------------------===//

bool mlirTypeIsAUniformQuantizedPerAxisType(MlirType type) {}

MlirType mlirUniformQuantizedPerAxisTypeGet(
    unsigned flags, MlirType storageType, MlirType expressedType,
    intptr_t nDims, double *scales, int64_t *zeroPoints,
    int32_t quantizedDimension, int64_t storageTypeMin,
    int64_t storageTypeMax) {}

intptr_t mlirUniformQuantizedPerAxisTypeGetNumDims(MlirType type) {}

double mlirUniformQuantizedPerAxisTypeGetScale(MlirType type, intptr_t pos) {}

int64_t mlirUniformQuantizedPerAxisTypeGetZeroPoint(MlirType type,
                                                    intptr_t pos) {}

int32_t mlirUniformQuantizedPerAxisTypeGetQuantizedDimension(MlirType type) {}

bool mlirUniformQuantizedPerAxisTypeIsFixedPoint(MlirType type) {}

//===---------------------------------------------------------------------===//
// CalibratedQuantizedType
//===---------------------------------------------------------------------===//

bool mlirTypeIsACalibratedQuantizedType(MlirType type) {}

MlirType mlirCalibratedQuantizedTypeGet(MlirType expressedType, double min,
                                        double max) {}

double mlirCalibratedQuantizedTypeGetMin(MlirType type) {}

double mlirCalibratedQuantizedTypeGetMax(MlirType type) {}