40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
|
//===- onnx_ops.hpp - MLIR ONNX Operations --------------------------------===//
|
||
|
//
|
||
|
// Copyright 2019 The IBM Research Authors.
|
||
|
//
|
||
|
// =============================================================================
|
||
|
//
|
||
|
// This file defines ONNX operations in the MLIR operation set.
|
||
|
//
|
||
|
//===----------------------------------------------------------------------===//
|
||
|
|
||
|
#ifndef MLIR_DIALECT_ONNX_ONNXOPS_H
|
||
|
#define MLIR_DIALECT_ONNX_ONNXOPS_H
|
||
|
|
||
|
#include "mlir/IR/Builders.h"
|
||
|
#include "mlir/IR/Dialect.h"
|
||
|
#include "mlir/IR/OpDefinition.h"
|
||
|
#include "mlir/IR/StandardTypes.h"
|
||
|
|
||
|
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
|
||
|
#include "src/compiler/onnx.hpp.inc"
|
||
|
|
||
|
} // end namespace mlir
|
||
|
|
||
|
namespace onnf {}
|
||
|
|
||
|
#endif // MLIR_DIALECT_ONNX_ONNXOPS_H
|