diff options
| author | Jacques Pienaar <jpienaar@google.com> | 2024-01-03 20:37:19 -0800 |
|---|---|---|
| committer | Jacques Pienaar <jpienaar@google.com> | 2024-01-03 20:37:20 -0800 |
| commit | 6ae7f66ff5169ddc5a7b9ab545707042c77e036c (patch) | |
| tree | 9e08a3271b9790676647494bfdf342c3d33f5072 /mlir/CMakeLists.txt | |
| parent | cda388c4407e0fe42faa82c015ee77da160ebd25 (diff) | |
[mlir] Add config for PDL (#69927)
Make it so that PDL in pattern rewrites can be optionally disabled.
PDL is still enabled by default and not optional bazel. So this should
be a NOP for most folks, while enabling other to disable.
This only works with tests disabled. With tests enabled this still
compiles but tests fail as there is no lit config to disable tests that
depend on PDL rewrites yet.
Diffstat (limited to 'mlir/CMakeLists.txt')
| -rw-r--r-- | mlir/CMakeLists.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mlir/CMakeLists.txt b/mlir/CMakeLists.txt index 16ff95008973..2d9f78e03ba7 100644 --- a/mlir/CMakeLists.txt +++ b/mlir/CMakeLists.txt @@ -133,6 +133,8 @@ set(MLIR_ENABLE_NVPTXCOMPILER 0 CACHE BOOL "Statically link the nvptxlibrary instead of calling ptxas as a subprocess \ for compiling PTX to cubin") +set(MLIR_ENABLE_PDL_IN_PATTERNMATCH 1 CACHE BOOL "Enable PDL in PatternMatch") + option(MLIR_INCLUDE_TESTS "Generate build targets for the MLIR unit tests." ${LLVM_INCLUDE_TESTS}) @@ -178,10 +180,9 @@ include_directories( ${MLIR_INCLUDE_DIR}) # Adding tools/mlir-tblgen here as calling add_tablegen sets some variables like # MLIR_TABLEGEN_EXE in PARENT_SCOPE which gets lost if that folder is included # from another directory like tools -add_subdirectory(tools/mlir-tblgen) add_subdirectory(tools/mlir-linalg-ods-gen) add_subdirectory(tools/mlir-pdll) - +add_subdirectory(tools/mlir-tblgen) set(MLIR_TABLEGEN_EXE "${MLIR_TABLEGEN_EXE}" CACHE INTERNAL "") set(MLIR_TABLEGEN_TARGET "${MLIR_TABLEGEN_TARGET}" CACHE INTERNAL "") set(MLIR_PDLL_TABLEGEN_EXE "${MLIR_PDLL_TABLEGEN_EXE}" CACHE INTERNAL "") |
