mlir-hlo/tools/mlir-tblgen-builder/Builder/Builder.h

30 lines
663 B
C
Raw Permalink Normal View History

2021-08-04 20:24:07 +08:00
#ifndef BUILDER_BUILDER_
#define BUILDER_BUILDER_
#include <memory>
2021-08-13 15:05:10 +08:00
#include "tools/mlir-tblgen-builder/Builder/Attribute.h"
#include "tools/mlir-tblgen-builder/Builder/Op.h"
2021-08-04 20:24:07 +08:00
namespace builder {
class Builder {
public:
Builder();
2021-08-17 11:28:17 +08:00
void SetInput(const std::vector<builder::Op>& inputs);
builder::Op CreateInput(const builder::Type& type);
void SetOutput(const std::vector<builder::Op>& outputs);
2021-08-04 20:24:07 +08:00
void DumpModule();
2021-08-13 15:05:10 +08:00
class Impl;
2021-08-17 11:28:17 +08:00
std::shared_ptr<Impl> GetImpl() const { return impl_; }
2021-08-04 20:24:07 +08:00
private:
2021-08-11 10:46:07 +08:00
std::shared_ptr<Impl> impl_;
2021-08-04 20:24:07 +08:00
};
} // namespace builder
2021-08-13 15:05:10 +08:00
#define GET_OP_CLASSES
#include "include/mlir-hlo/Dialect/mhlo/IR/hlo_builder.h.inc"
2021-08-04 20:24:07 +08:00
#endif