Do not build the CUBIN conversion pass when NVPTX Backend isn't configured
authorMehdi Amini <joker-eph@gmail.com>
Fri, 14 Feb 2020 09:12:41 +0000 (09:12 +0000)
committerMehdi Amini <joker-eph@gmail.com>
Fri, 14 Feb 2020 09:33:12 +0000 (09:33 +0000)
commit850cb135a3b8f7e226a40186954599187fe0f6b2
tree30b76eb73eae82d54172241fb7a32a93041e1090
parent07211d951d584b19951ad8dedbaf7c728297f4b5
Do not build the CUBIN conversion pass when NVPTX Backend isn't configured

This pass would currently build, but fail to run when this backend isn't
linked in. On the other hand, we'd like it to initialize only the NVPTX
backend, which isn't possible if we continue to build it without the
backend available. Instead of building a broken configuration, let's
skip building the pass entirely.

Differential Revision: https://reviews.llvm.org/D74592
mlir/CMakeLists.txt
mlir/include/mlir/InitAllPasses.h
mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
mlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp