This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vulkan-runner] Avoid dependency on LLVM libraries
ClosedPublic

Authored by antiagainst on May 13 2020, 7:01 AM.

Details

Summary

The Vulkan runtime wrapper will be compiled to a shared library
that are loaded by the JIT runner. Depending on LLVM libraries
means that LLVM symbols will be compiled into the shared library.
That can cause problems if we are using it with other shared
libraries depending on LLVM, notably Mesa, the open-source graphics
driver framework. The Vulkan API wrappers invoked by the JIT runner
links to the system libvulkan.so. If it's Mesa providing the
implementation, Mesa will normally try to load the system libLLVM.so
for its shader compilation. That causes issues because the JIT runner
already loaded the Vulkan runtime wrapper which has LLVM sybmols
compiled in. So system linker will instruct Mesa to use those symbols
instead.

Diff Detail

Event Timeline

antiagainst created this revision.May 13 2020, 7:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 13 2020, 7:01 AM
denis13 accepted this revision.May 13 2020, 7:07 AM

LGTM! Thanks!

This revision is now accepted and ready to land.May 13 2020, 7:07 AM
This revision was automatically updated to reflect the committed changes.