infrt_phi_kernel.td 937 字节
Newer Older
1 2 3
#ifndef PHI_KERNEL
#define PHI_KERNEL

4 5
include "mlir/Interfaces/SideEffectInterfaces.td"
include "mlir/IR/OpBase.td"
6
include "paddle/infrt/dialect/infrt/ir/infrt_base.td"
7
include "paddle/infrt/dialect/phi/ir/infrt_phi_base.td"
8

9 10
def PHI_CPUKernelDialect : Dialect {
  let name = "phi_cpu";
11 12

  let description = [{
13 14 15 16 17 18 19 20 21 22 23
    The PHI CPU Kernel dialect.
  }];

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

def PHI_GPUKernelDialect : Dialect {
  let name = "phi_gpu";

  let description = [{
    The PHI GPU Kernel dialect.
24 25 26 27 28 29
  }];

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

// PHI Kernel related ops.
30
class PDTCPU_Kernel<string mnemonic, list<OpTrait> traits = []> : Op<PHI_CPUKernelDialect, mnemonic, !listconcat(traits, [PhiOpTrait, IsolatedFromAbove])> {
31 32
}

33 34
// PHI Kernel related ops.
class PDTGPU_Kernel<string mnemonic, list<OpTrait> traits = []> : Op<PHI_GPUKernelDialect, mnemonic, !listconcat(traits, [PhiOpTrait, IsolatedFromAbove])> {
35 36 37
}

#endif