This patch adds the new pass option 'use-opaque-pointers' to -launch-func-to-vulkan instructing the pass to emit LLVM opaque pointers instead of typed pointers.
Note that the pass as it was previously implemented relied on the fact LLVM pointers carried an element type. The passed used this information to deduce both the rank of a "lowered-to-llvm" MemRef as well as the element type. Since the element type when using LLVM opaque pointers is completely erased it is not possible to deduce the element type.
I therefore added a new attribute that is attached to the vulkanLaunch call alongside the binary blob and entry point name by the -convert-gpu-launch-to-vulkan-launch pass. It simply attaches a type array specifying the element types of each memref. This way the -launch-func-to-vulkan can simply read out the element type from the attribute.
The rank can still be deduced from the auto-generated C interface from FinalizeMemRefToLLVM. This is admittedly a bit fragile but I was not sure whether it was worth the effort to also add a rank array attribute.
As a last step, the use of opaque-pointers in mlir-vulkan-runners codegen pipeline was also enabled, since all covnersion passes used fully support it.
Is the blob the actual compiled kernel? If yes, what about calling it binary, shaderBinary, kernelBinary or similar? Or, is blob SPIRV-terminology.