[all-commits] [llvm/llvm-project] 733be4: [mlir][spirv] Add GpuToLLVM cconv suited to Vulkan...
Andrea Faulds via All-commits
all-commits at lists.llvm.org
Tue Jan 21 04:28:08 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 733be4ed7dcf976719f424c0cb81b77a14f91f5a
https://github.com/llvm/llvm-project/commit/733be4ed7dcf976719f424c0cb81b77a14f91f5a
Author: Andrea Faulds <andrea.faulds at amd.com>
Date: 2025-01-21 (Tue, 21 Jan 2025)
Changed paths:
M mlir/include/mlir/Conversion/GPUCommon/GPUCommonPass.h
M mlir/include/mlir/Conversion/Passes.td
M mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp
A mlir/test/Conversion/GPUCommon/lower-launch-func-bare-ptr-intersperse-size.mlir
M mlir/test/lib/Pass/TestVulkanRunnerPipeline.cpp
M mlir/test/mlir-vulkan-runner/addi.mlir
M mlir/test/mlir-vulkan-runner/addi8.mlir
M mlir/test/mlir-vulkan-runner/mulf.mlir
M mlir/test/mlir-vulkan-runner/subf.mlir
M mlir/tools/mlir-vulkan-runner/vulkan-runtime-wrappers.cpp
Log Message:
-----------
[mlir][spirv] Add GpuToLLVM cconv suited to Vulkan, migrate last tests (#123384)
This commit is a follow-up to 99a562b3cb17e89273ba0fe77129f2fb17a19381,
which migrated some of the mlir-vulkan-runner tests to mlir-cpu-runner
using a new pipeline and set of wrappers. That commit could not migrate
all the tests, because the existing calling conventions/ABIs for kernel
arguments generated by GPUToLLVMConversionPass were not a good fit for
the Vulkan runtime. This commit fixes this and migrates the remaining
tests. With this commit, mlir-vulkan-runner and many related components
are now unused, and they will be removed in a later commit (see #73457).
The old calling conventions require both the caller (host LLVM code) and
callee (device code) to have compile-time knowledge of the precise
argument types. This works for CUDA, ROCm and SYCL, where there is a
C-like calling convention agreed between the host and device code, and
the runtime passes through arguments as raw data without comprehension.
For Vulkan, however, the interface declared by the shader/kernel is in a
more abstract form, so the device code has indirect access to the
argument data, and the runtime must process the arguments to set up and
bind appropriately-sized buffer descriptors.
This commit introduces a new calling convention option to meet the
Vulkan runtime's needs. It lowers memref arguments to {void*, size_t}
pairs, which can be trivially interpreted by the runtime without it
needing to know the original argument types. Unlike the stopgap measure
in the previous commit, this system can support memrefs of various ranks
and element types, which unblocked migrating the remaining tests.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list