trt_op_base.td 831 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
// This file defines some basic elements of Paddle(alias trt) dialect.
// We learned much from TensorFlow mlir dialect https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/mlir/tensorflow/ir/tf_op_base.td

#ifndef TRT_OP_BASE
#define TRT_OP_BASE

include "mlir/IR/OpBase.td"
include "mlir/Interfaces/SideEffectInterfaces.td"

def TRT_Dialect : Dialect {
  let name = "trt";

  let description = [{
    The PaddlePaddle dialect.

    This dialect contains the PaddlePaddle operators.
  }];

  let cppNamespace = "::infrt::trt";
}

class TRT_Op<string mnemonic, list<OpTrait> traits = []> :
      Op<TRT_Dialect, mnemonic, traits>;

W
Wilber 已提交
25 26 27
def TRT_EngineType :
      Type<CPred<"$_self.isa<::infrt::trt::EngineType>()">, "!trt.engine">,
      BuildableType<"getType<::infrt::trt::EngineType>()">;
28 29

#endif // TRT_OP_BASE