Replies: 1 comment 1 reply
-
SPIR-V is a common binary intermediate language for multiple Khoronos APIs. SPIR-V dialect in MLIR repo support whatever SPIR-V spec means to accommodate. So it is certainly possible to generate GPU program using
Let me know whether the above is clear. Happy to explain more. :) |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm trying to leverage the existing SPIR-V codegen path to generate SPIR-V code with Kernel capability (Not the Shader capability). Because some backend driver APIs requires that the entry_points' execution model in SPIR-V module must be
ExecutionModel::Kernel
, and in SPIRV Dialect, only the Kernel capability will be mapped to Kernel execution model.But when I trying to change the capability to Kernel, I got an error: failed to legalize operation 'hal.interface.binding.subspan'. After some investigation, I found that we have to use the
SPV_KHR_storage_buffer_storage_class
extension, even we use Shader capability.So, may I ask why the
hal.interface.binding.subspan
legalization relies on theSPV_KHR_storage_buffer_storage_class
extension? And is there any simple solution to generate SPIR-V code with Kernel capability?Thanks
Beta Was this translation helpful? Give feedback.
All reactions