Differential D76059 Diff 250728 mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
Changeset View
Changeset View
Standalone View
Standalone View
mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
Show All 27 Lines | |||||
using namespace mlir; | using namespace mlir; | ||||
static constexpr const char *kSPIRVBlobAttrName = "spirv_blob"; | static constexpr const char *kSPIRVBlobAttrName = "spirv_blob"; | ||||
static constexpr const char *kSPIRVEntryPointAttrName = "spirv_entry_point"; | static constexpr const char *kSPIRVEntryPointAttrName = "spirv_entry_point"; | ||||
static constexpr const char *kVulkanLaunch = "vulkanLaunch"; | static constexpr const char *kVulkanLaunch = "vulkanLaunch"; | ||||
namespace { | namespace { | ||||
// A pass to convert gpu launch op to vulkan launch call op, by creating a | /// A pass to convert gpu launch op to vulkan launch call op, by creating a | ||||
// SPIR-V binary shader from `spirv::ModuleOp` using `spirv::serialize` | /// SPIR-V binary shader from `spirv::ModuleOp` using `spirv::serialize` | ||||
// function and attaching binary data and entry point name as an attributes to | /// function and attaching binary data and entry point name as an attributes to | ||||
// created vulkan launch call op. | /// created vulkan launch call op. | ||||
class ConvertGpuLaunchFuncToVulkanLaunchFunc | class ConvertGpuLaunchFuncToVulkanLaunchFunc | ||||
: public ModulePass<ConvertGpuLaunchFuncToVulkanLaunchFunc> { | : public ModulePass<ConvertGpuLaunchFuncToVulkanLaunchFunc> { | ||||
public: | public: | ||||
void runOnModule() override; | void runOnModule() override; | ||||
private: | private: | ||||
/// Creates a SPIR-V binary shader from the given `module` using | /// Creates a SPIR-V binary shader from the given `module` using | ||||
/// `spirv::serialize` function. | /// `spirv::serialize` function. | ||||
▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines |