This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Fix CMake build for libMLIR.so with MLIR_ENABLE_CUDA_RUNNER=ON
AcceptedPublic

Authored by christopherbate on Oct 14 2022, 11:59 AM.

Details

Reviewers
mehdi_amini
csigg
Summary

When configured with LLVM_BUILD_LLVM_DYLIB=ON and MLIR_ENABLE_CUDA_RUNNER=ON,
the build will fail at the link stage of libMLIR.so because symbols
for the CUDA driver libcuda.so are not available but required by
MLIRGPUTransforms. In the future, this should probably evolve to link
the library stubs/libcuda.so shipped with the CUDA toolkit rather than
the system libcuda.so.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptOct 14 2022, 11:59 AM
christopherbate requested review of this revision.Oct 14 2022, 11:59 AM
mehdi_amini accepted this revision.Oct 23 2022, 7:03 PM

This option (MLIR_ENABLE_CUDA_RUNNER) looks terribly named unfortunately.

This revision is now accepted and ready to land.Oct 23 2022, 7:03 PM