[all-commits] [llvm/llvm-project] 9c21dd: [MLIR] Make MLIR cmake variable names consistent

Uday Bondhugula via All-commits all-commits at lists.llvm.org
Sun May 23 20:14:53 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9c21ddb70ab56eb3ca5b0f99faa18bb3af17b3df
      https://github.com/llvm/llvm-project/commit/9c21ddb70ab56eb3ca5b0f99faa18bb3af17b3df
  Author: Uday Bondhugula <uday at polymagelabs.com>
  Date:   2021-05-24 (Mon, 24 May 2021)

  Changed paths:
    M mlir/CMakeLists.txt
    M mlir/cmake/modules/AddMLIRPython.cmake
    M mlir/docs/Bindings/Python.md
    M mlir/docs/SPIRVToLLVMDialectConversion.md
    M mlir/docs/Tools/LinalgOpDsl.md
    M mlir/lib/Bindings/CMakeLists.txt
    M mlir/lib/Conversion/GPUCommon/CMakeLists.txt
    M mlir/lib/Dialect/GPU/CMakeLists.txt
    M mlir/lib/ExecutionEngine/CMakeLists.txt
    M mlir/test/CMakeLists.txt
    M mlir/test/lit.site.cfg.py.in

  Log Message:
  -----------
  [MLIR] Make MLIR cmake variable names consistent

Fix inconsistent MLIR CMake variable names. Consistently name them as
MLIR_ENABLE_<feature>.

Eg: MLIR_CUDA_RUNNER_ENABLED -> MLIR_ENABLE_CUDA_RUNNER

MLIR follows (or has mostly followed) the convention of naming
cmake enabling variables in the from MLIR_ENABLE_... etc. Using a
convention here is easy and also important for convenience. A counter
pattern was started with variables named MLIR_..._ENABLED. This led to a
sequence of related counter patterns: MLIR_CUDA_RUNNER_ENABLED,
MLIR_ROCM_RUNNER_ENABLED, etc.. From a naming standpoint, the imperative
form is more meaningful. Additional discussion at:
https://llvm.discourse.group/t/mlir-cmake-enable-variable-naming-convention/3520

Switch all inconsistent ones to the ENABLE form. Keep the couple of old
mappings needed until buildbot config is migrated.

Differential Revision: https://reviews.llvm.org/D102976




More information about the All-commits mailing list