[llvm] [mlir] [mlir] Expose MLIR_CUDA_CONVERSIONS_ENABLED in mlir-config.h. (PR #83004)

Ingo Müller via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 07:49:31 PST 2024


ingomueller-net wrote:

> As an FYI, the code relying on this does specifically: [`#if MLIR_CUDA_CONVERSIONS_ENABLED == 1`](https://github.com/llvm/llvm-project/blob/f2bb6c4415954535b32780cd5fb48411ebe0042c/mlir/lib/Target/LLVM/NVVM/Target.cpp#L159) so you may want to define the expected value here, or update that code to use an `#ifdef` instead.

@joker-eph raised [arguments](https://github.com/llvm/llvm-project/pull/82988#pullrequestreview-1902317048) against using `#ifdef` in #82988. I have thus rewritten this commit to use only `#if X`.

Note that this includes changes from `#if X == 1` to `#if X` because I don't see any argument in favor of the former but the discussion in the other PR was still open, so I am still happy to revert that part.

I have compiled with OSS Bazel with `-Wundef` and don't get any warnings for this variable anymore. Also, I have compiled with CMake successfully. I still need to test the current form against our internal code base and will report back as soon as I have results.

https://github.com/llvm/llvm-project/pull/83004


More information about the llvm-commits mailing list