[PATCH] D75192: [mlir][spirv] Update mlir-vulkan-runner execution driver.

Denis Khalikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 09:03:07 PST 2020


denis13 added a comment.

To eliminate static construction and desctruction of `VulkanRuntimeManager`, we need to instrument runtime calls with first argument as a generic pointer to `VulkanRuntimeManager`, but the `setResource` function based on std dialect, which fills the given memref with the given value, could not accept generic pointers, because std dialect does not have generic pointer types. So, to solve it, I added new pass which serializes `spirv::Module` to binary form appends it as a string attribute to vulkan launch call op. Erases all `gpu.module` and `spirv::Module`, so we can lower it to LLVM directly, then we instrument host part with runtime calls as before, but adding initVulkan, deinitVulkan calls and for each lowered memref we create call to `bindResource` according the current `GPUToSPIRV` convention (Each resource binds to `0` descriptor set and descriptor binding argument order lined up in argument order.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75192/new/

https://reviews.llvm.org/D75192





More information about the llvm-commits mailing list