#ifdef GEN_PASS_DECL
#define GEN_PASS_DECL_FOLDTENSORSUBSETOPS
#undef GEN_PASS_DECL
#endif
#ifdef GEN_PASS_DECL_FOLDTENSORSUBSETOPS
#undef GEN_PASS_DECL_FOLDTENSORSUBSETOPS
#endif
#ifdef GEN_PASS_DEF_FOLDTENSORSUBSETOPS
namespace impl {
template <typename DerivedT>
class FoldTensorSubsetOpsBase : public ::mlir::OperationPass<> {
public:
using Base = FoldTensorSubsetOpsBase;
FoldTensorSubsetOpsBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
FoldTensorSubsetOpsBase(const FoldTensorSubsetOpsBase &other) : ::mlir::OperationPass<>(other) {}
FoldTensorSubsetOpsBase& operator=(const FoldTensorSubsetOpsBase &) = delete;
FoldTensorSubsetOpsBase(FoldTensorSubsetOpsBase &&) = delete;
FoldTensorSubsetOpsBase& operator=(FoldTensorSubsetOpsBase &&) = delete;
~FoldTensorSubsetOpsBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("fold-tensor-subset-ops");
}
::llvm::StringRef getArgument() const override { return "fold-tensor-subset-ops"; }
::llvm::StringRef getDescription() const override { return "Fold tensor subset ops into producer/consumer ops"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("FoldTensorSubsetOps");
}
::llvm::StringRef getName() const override { return "FoldTensorSubsetOps"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<affine::AffineDialect>();
registry.insert<tensor::TensorDialect>();
registry.insert<vector::VectorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(FoldTensorSubsetOpsBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_FOLDTENSORSUBSETOPS
#endif
#ifdef GEN_PASS_REGISTRATION
inline void registerFoldTensorSubsetOps() { … }
inline void registerFoldTensorSubsetOpsPass() { … }
inline void registerTensorPasses() { … }
#undef GEN_PASS_REGISTRATION
#endif
#ifdef GEN_PASS_CLASSES
template <typename DerivedT>
class FoldTensorSubsetOpsBase : public ::mlir::OperationPass<> {
public:
using Base = FoldTensorSubsetOpsBase;
FoldTensorSubsetOpsBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
FoldTensorSubsetOpsBase(const FoldTensorSubsetOpsBase &other) : ::mlir::OperationPass<>(other) {}
FoldTensorSubsetOpsBase& operator=(const FoldTensorSubsetOpsBase &) = delete;
FoldTensorSubsetOpsBase(FoldTensorSubsetOpsBase &&) = delete;
FoldTensorSubsetOpsBase& operator=(FoldTensorSubsetOpsBase &&) = delete;
~FoldTensorSubsetOpsBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("fold-tensor-subset-ops");
}
::llvm::StringRef getArgument() const override { return "fold-tensor-subset-ops"; }
::llvm::StringRef getDescription() const override { return "Fold tensor subset ops into producer/consumer ops"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("FoldTensorSubsetOps");
}
::llvm::StringRef getName() const override { return "FoldTensorSubsetOps"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<affine::AffineDialect>();
registry.insert<tensor::TensorDialect>();
registry.insert<vector::VectorDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(FoldTensorSubsetOpsBase<DerivedT>)
protected:
};
#undef GEN_PASS_CLASSES
#endif