#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"
}
}
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 = …;
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() { … }
}