llvm/mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp

//===- TosaValidation.cpp ------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
//
// Validate if TOSA dialect input matchs with the specification for given
// requirements.
//
//===----------------------------------------------------------------------===//

#include "mlir/Dialect/Tosa/Transforms/Passes.h"
#include "mlir/Dialect/Tosa/Transforms/PassesEnums.cpp.inc"

#include <string>

#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/Tosa/IR/TosaOps.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Transforms/DialectConversion.h"

namespace mlir {
namespace tosa {
#define GEN_PASS_DEF_TOSAVALIDATION
#include "mlir/Dialect/Tosa/Transforms/Passes.h.inc"
} // namespace tosa
} // namespace mlir

usingnamespacemlir;
usingnamespacemlir::tosa;

namespace {

static LogicalResult checkConstantOperandPad(Operation *op) {}

static LogicalResult checkConstantOperandTranspose(Operation *op) {}

static LogicalResult checkConstantOperandFullyConnected(Operation *op) {}

struct TosaLevel {};

static constexpr TosaLevel TOSA_LEVEL_EIGHTK =;
static constexpr TosaLevel TOSA_LEVEL_NONE =;

//===----------------------------------------------------------------------===//
// TOSA Validation Pass.
//===----------------------------------------------------------------------===//

struct TosaValidation : public tosa::impl::TosaValidationBase<TosaValidation> {};

LogicalResult TosaValidation::applyLevelCheck(Operation *op) {}

inline bool CompatibleTypes(const mlir::Type &type,
                            const mlir::Type &declaredType) {}

bool TosaValidation::CheckVariable(Operation *op) {}

bool TosaValidation::CheckVariableReadOrWrite(Operation *op) {}

LogicalResult TosaValidation::applyVariableCheck(Operation *op) {}

bool TosaValidation::isValidElementType(Type type) {}

void TosaValidation::runOnOperation() {}
} // namespace