[PATCH] D79860: [mlir][vulkan-runner] Avoid dependency on LLVM libraries

Lei Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 07:01:06 PDT 2020


antiagainst created this revision.
antiagainst added a reviewer: denis13.
Herald added subscribers: llvm-commits, Kayjukh, frgossen, grosul1, Joonsoo, stephenneuendorffer, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, shauheen, jpienaar, rriddle, mehdi_amini, mgorny.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79860

Files:
  mlir/tools/mlir-vulkan-runner/CMakeLists.txt
  mlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp
  mlir/tools/mlir-vulkan-runner/VulkanRuntime.h
  mlir/tools/mlir-vulkan-runner/vulkan-runtime-wrappers.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79860.263705.patch
Type: text/x-patch
Size: 15704 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200513/0081a13b/attachment.bin>


More information about the llvm-commits mailing list