2020-03-19 16:48:09 +08:00
|
|
|
//===-------------------- ONNXOps.hpp - ONNX Operations -------------------===//
|
2019-11-02 05:09:48 +08:00
|
|
|
//
|
|
|
|
// Copyright 2019 The IBM Research Authors.
|
|
|
|
//
|
|
|
|
// =============================================================================
|
|
|
|
//
|
|
|
|
// This file defines ONNX operations in the MLIR operation set.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2019-11-08 00:42:40 +08:00
|
|
|
#pragma once
|
2019-11-02 05:09:48 +08:00
|
|
|
|
2020-03-19 15:03:37 +08:00
|
|
|
#include <map>
|
|
|
|
#include <string>
|
|
|
|
|
2020-04-02 00:38:34 +08:00
|
|
|
#include "mlir/Dialect/StandardOps/IR/Ops.h"
|
2019-11-02 05:09:48 +08:00
|
|
|
#include "mlir/IR/Builders.h"
|
|
|
|
#include "mlir/IR/Dialect.h"
|
|
|
|
#include "mlir/IR/OpDefinition.h"
|
|
|
|
#include "mlir/IR/StandardTypes.h"
|
|
|
|
|
2020-03-20 22:40:51 +08:00
|
|
|
#include "src/Interface/ShapeInferenceInterface.hpp"
|
2020-03-19 16:48:09 +08:00
|
|
|
#include "src/Interface/PromotableConstOperandsOpInterface.hpp"
|
2019-11-08 00:42:40 +08:00
|
|
|
|
2019-11-02 05:09:48 +08:00
|
|
|
namespace mlir {
|
|
|
|
|
|
|
|
class ONNXOpsDialect : public Dialect {
|
|
|
|
public:
|
|
|
|
ONNXOpsDialect(MLIRContext* context);
|
|
|
|
|
|
|
|
/// Provide a utility accessor to the dialect namespace. This is used by
|
|
|
|
/// several utilities for casting between dialects.
|
|
|
|
static StringRef getDialectNamespace() { return "onnx"; }
|
|
|
|
};
|
|
|
|
|
|
|
|
/// Include the auto-generated header file containing the declarations of the
|
|
|
|
/// ONNX operations.
|
|
|
|
#define GET_OP_CLASSES
|
2020-03-20 22:40:51 +08:00
|
|
|
#include "src/Dialect/ONNX/ONNXOps.hpp.inc"
|
2019-11-02 05:09:48 +08:00
|
|
|
|
|
|
|
} // end namespace mlir
|
|
|
|
|
2020-03-17 21:16:33 +08:00
|
|
|
namespace onnx_mlir {}
|