infrt_base.td 1020 字节
Newer Older
Y
Yan Chunwei 已提交
1 2 3 4
#ifndef INFRT_BASE
#define INFRT_BASE

include "mlir/IR/OpBase.td"
5
include "paddle/infrt/dialect/infrt/infrt_ops_base.td"
Y
Yan Chunwei 已提交
6 7

def INFRT_Dialect : Dialect {
8
  let name = "Infrt";
Y
Yan Chunwei 已提交
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

  let description = [{
    The INFRT host dialect.
  }];

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

// Type definitions
def StringType :
    Type<CPred<"$_self.isa<::infrt::dt::StringType>()">, "!infrt.string type">,
    BuildableType<"$_builder.getType<::infrt::dt::StringType>()">;

def TensorMapType :
    Type<CPred<"$_self.isa<::infrt::dt::TensorMapType>()">, "!infrt.tensor_map type">,
    BuildableType<"$_builder.getType<::infrt::dt::TensorMapType>()">;

def BufferType : OpaqueType<"b", "buffer", "buffer">;

class INFRT_createI32Attr<string value> : NativeCodeCall<
29
    "infrt::createI32Attr($_builder, $_loc, " # value # ")">;
Y
Yan Chunwei 已提交
30 31

def INFRT_cvtValueToValueRange : NativeCodeCall<
32
    "infrt::cvtValueToValueRange($0)">;
Y
Yan Chunwei 已提交
33 34

def INFRT_concatTwoValueRange : NativeCodeCall<
35
    "infrt::concatTwoValueRange($0, $1)">;
Y
Yan Chunwei 已提交
36
#endif  // INFRT_BASE