This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][GPU] Drop mgpuMemHostRegisterMemRef's dependence on LLVM Support
ClosedPublic

Authored by bondhugula on Aug 24 2021, 9:26 PM.

Details

Summary

Drop mgpuMemHostRegisterMemRef's dependence on LLVM Support. This
method is the only one in CUDA runtime wrappers library that creates
a dependence on libLLVMSupport due to its use of SmallVector and
ArrayRef. The code can be as easily/compactly written without those ADT.
The dependence on LLVMSupport adds a significant amount of additional
complexity for external things that want to link this library in (both
statically or as a shared object) since libLLVMSupport includes numerous
other objects that are sensitive to C++ compiler version and ABI.

Diff Detail

Event Timeline

bondhugula created this revision.Aug 24 2021, 9:26 PM
bondhugula requested review of this revision.Aug 24 2021, 9:26 PM

Use uint64_t for size.

herhut accepted this revision.Aug 26 2021, 2:29 AM

Thanks, makes sense to keep the runtime as self contained as possible. Should this also reflect in cmake somewhere?

mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp
14–15

Is this still needed?

This revision is now accepted and ready to land.Aug 26 2021, 2:29 AM
bondhugula marked an inline comment as done.

Remove unused headers.

Thanks, makes sense to keep the runtime as self contained as possible. Should this also reflect in cmake somewhere?

I checked the cmake file and I couldn't find anything to remove for mlir_cuda_runtime.

mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp
14–15

Thanks, removed.

This revision was landed with ongoing or failed builds.Aug 27 2021, 11:14 PM
This revision was automatically updated to reflect the committed changes.