[mlir][GPUToSPIRV] Modify the lowering of gpu.block_dim to be consistent with Vulkan SPEC
The existing lowering of gpu.block_dim added a global variable with the WorkGroupSize decoration. This raises an error within Vulkan/SPIR-V validation since Vulkan requires this to have a constant initializer. This is not yet supported in SPIR-V dialect. Changing the lowering to return the workgroup size as a constant value instead, obtained from spv.entry_point_abi attribute gets around the issue for now. The validation goes through since the workgroup size is specified using spv.execution_mode operation.
Loading
Please sign in to comment