Index: mlir/examples/toy/Ch2/include/toy/Ops.td =================================================================== --- mlir/examples/toy/Ch2/include/toy/Ops.td +++ 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 Index: mlir/examples/toy/Ch3/include/toy/Ops.td =================================================================== --- mlir/examples/toy/Ch3/include/toy/Ops.td +++ 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 Index: mlir/examples/toy/Ch4/include/toy/Ops.td =================================================================== --- mlir/examples/toy/Ch4/include/toy/Ops.td +++ 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 Index: mlir/examples/toy/Ch5/include/toy/Ops.td =================================================================== --- mlir/examples/toy/Ch5/include/toy/Ops.td +++ 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 Index: mlir/examples/toy/Ch6/include/toy/Ops.td =================================================================== --- mlir/examples/toy/Ch6/include/toy/Ops.td +++ 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 Index: mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td =================================================================== --- mlir/include/mlir/Dialect/LLVMIR/NVVMOps.td +++ 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 Index: mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td =================================================================== --- mlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td +++ 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 Index: mlir/test/python/python_test_ops.td =================================================================== --- mlir/test/python/python_test_ops.td +++ mlir/test/python/python_test_ops.td @@ -20,6 +20,7 @@ let useDefaultTypePrinterParser = 1; let useDefaultAttributePrinterParser = 1; + let useFoldAPI = kEmitFoldAdaptorFolder; } class TestType