diff --git a/mlir/examples/toy/Ch2/include/toy/Ops.td b/mlir/examples/toy/Ch2/include/toy/Ops.td --- a/mlir/examples/toy/Ch2/include/toy/Ops.td +++ b/mlir/examples/toy/Ch2/include/toy/Ops.td @@ -23,6 +23,7 @@ def Toy_Dialect : Dialect { let name = "toy"; let cppNamespace = "::mlir::toy"; + let useFoldAPI = kEmitFoldAdaptorFolder; } // Base class for toy dialect operations. This operation inherits from the base diff --git a/mlir/examples/toy/Ch3/include/toy/Ops.td b/mlir/examples/toy/Ch3/include/toy/Ops.td --- a/mlir/examples/toy/Ch3/include/toy/Ops.td +++ b/mlir/examples/toy/Ch3/include/toy/Ops.td @@ -22,6 +22,7 @@ def Toy_Dialect : Dialect { let name = "toy"; let cppNamespace = "::mlir::toy"; + let useFoldAPI = kEmitFoldAdaptorFolder; } // Base class for toy dialect operations. This operation inherits from the base diff --git a/mlir/examples/toy/Ch4/include/toy/Ops.td b/mlir/examples/toy/Ch4/include/toy/Ops.td --- a/mlir/examples/toy/Ch4/include/toy/Ops.td +++ b/mlir/examples/toy/Ch4/include/toy/Ops.td @@ -25,6 +25,7 @@ def Toy_Dialect : Dialect { let name = "toy"; let cppNamespace = "::mlir::toy"; + let useFoldAPI = kEmitFoldAdaptorFolder; } // Base class for toy dialect operations. This operation inherits from the base diff --git a/mlir/examples/toy/Ch5/include/toy/Ops.td b/mlir/examples/toy/Ch5/include/toy/Ops.td --- a/mlir/examples/toy/Ch5/include/toy/Ops.td +++ b/mlir/examples/toy/Ch5/include/toy/Ops.td @@ -25,6 +25,7 @@ def Toy_Dialect : Dialect { let name = "toy"; let cppNamespace = "::mlir::toy"; + let useFoldAPI = kEmitFoldAdaptorFolder; } // Base class for toy dialect operations. This operation inherits from the base diff --git a/mlir/examples/toy/Ch6/include/toy/Ops.td b/mlir/examples/toy/Ch6/include/toy/Ops.td --- a/mlir/examples/toy/Ch6/include/toy/Ops.td +++ b/mlir/examples/toy/Ch6/include/toy/Ops.td @@ -25,6 +25,7 @@ def Toy_Dialect : Dialect { let name = "toy"; let cppNamespace = "::mlir::toy"; + let useFoldAPI = kEmitFoldAdaptorFolder; } // Base class for toy dialect operations. This operation inherits from the base diff --git a/mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td b/mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td --- a/mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td +++ b/mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td @@ -29,6 +29,7 @@ let cppNamespace = "::mlir::NVVM"; let dependentDialects = ["LLVM::LLVMDialect"]; let hasOperationAttrVerify = 1; + let useFoldAPI = kEmitFoldAdaptorFolder; let extraClassDeclaration = [{ /// Get the name of the attribute used to annotate external kernel diff --git a/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td b/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td --- a/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td +++ b/mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td @@ -25,6 +25,7 @@ let cppNamespace = "::mlir::ROCDL"; let dependentDialects = ["LLVM::LLVMDialect"]; let hasOperationAttrVerify = 1; + let useFoldAPI = kEmitFoldAdaptorFolder; let extraClassDeclaration = [{ /// Get the name of the attribute used to annotate external kernel diff --git a/mlir/test/python/python_test_ops.td b/mlir/test/python/python_test_ops.td --- a/mlir/test/python/python_test_ops.td +++ b/mlir/test/python/python_test_ops.td @@ -20,6 +20,7 @@ let useDefaultTypePrinterParser = 1; let useDefaultAttributePrinterParser = 1; + let useFoldAPI = kEmitFoldAdaptorFolder; } class TestType