|
MLIR 22.0.0git
|
Vulkan runtime. More...
#include "ExecutionEngine/VulkanRuntime.h"
Public Member Functions | |
| VulkanRuntime ()=default | |
| VulkanRuntime (const VulkanRuntime &)=delete | |
| VulkanRuntime & | operator= (const VulkanRuntime &)=delete |
| void | setResourceData (const ResourceData &resData) |
| Sets needed data for Vulkan runtime. | |
| void | setResourceData (const DescriptorSetIndex desIndex, const BindingIndex bindIndex, const VulkanHostMemoryBuffer &hostMemBuffer) |
| void | setShaderModule (uint8_t *shader, uint32_t size) |
| void | setNumWorkGroups (const NumWorkGroups &numberWorkGroups) |
| void | setResourceStorageClassBindingMap (const ResourceStorageClassBindingMap &stClassData) |
| void | setEntryPoint (const char *entryPointName) |
| LogicalResult | initRuntime () |
| Runtime initialization. | |
| LogicalResult | run () |
| Runs runtime. | |
| LogicalResult | updateHostMemoryBuffers () |
| Updates host memory buffers. | |
| LogicalResult | destroy () |
| Destroys all created vulkan objects and resources. | |
Vulkan runtime.
The purpose of this class is to run SPIR-V compute shader on Vulkan device. Before the run, user must provide and set resource data with descriptors, SPIR-V shader, number of work groups and entry point. After the creation of VulkanRuntime, special methods must be called in the following sequence: initRuntime(), run(), updateHostMemoryBuffers(), destroy(); each method in the sequence returns success or failure depends on the Vulkan result code.
Definition at line 93 of file VulkanRuntime.h.
|
explicitdefault |
Referenced by operator=(), and VulkanRuntime().
|
delete |
References VulkanRuntime().
| LogicalResult VulkanRuntime::destroy | ( | ) |
Destroys all created vulkan objects and resources.
Definition at line 121 of file VulkanRuntime.cpp.
References RETURN_ON_VULKAN_ERROR, and success().
| LogicalResult VulkanRuntime::initRuntime | ( | ) |
|
delete |
References VulkanRuntime().
| LogicalResult VulkanRuntime::run | ( | ) |
Runs runtime.
Definition at line 162 of file VulkanRuntime.cpp.
References RETURN_ON_VULKAN_ERROR, and success().
| void VulkanRuntime::setEntryPoint | ( | const char * | entryPointName | ) |
Definition at line 52 of file VulkanRuntime.cpp.
| void VulkanRuntime::setNumWorkGroups | ( | const NumWorkGroups & | numberWorkGroups | ) |
Definition at line 35 of file VulkanRuntime.cpp.
| void VulkanRuntime::setResourceData | ( | const DescriptorSetIndex | desIndex, |
| const BindingIndex | bindIndex, | ||
| const VulkanHostMemoryBuffer & | hostMemBuffer ) |
Definition at line 44 of file VulkanRuntime.cpp.
References StorageBuffer.
| void VulkanRuntime::setResourceData | ( | const ResourceData & | resData | ) |
Sets needed data for Vulkan runtime.
Definition at line 56 of file VulkanRuntime.cpp.
| void VulkanRuntime::setResourceStorageClassBindingMap | ( | const ResourceStorageClassBindingMap & | stClassData | ) |
Definition at line 39 of file VulkanRuntime.cpp.
| void VulkanRuntime::setShaderModule | ( | uint8_t * | shader, |
| uint32_t | size ) |
Definition at line 60 of file VulkanRuntime.cpp.
| LogicalResult VulkanRuntime::updateHostMemoryBuffers | ( | ) |
Updates host memory buffers.
Definition at line 870 of file VulkanRuntime.cpp.
References RETURN_ON_VULKAN_ERROR, and success().