You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the introduction of kernel entry point wrappers within
KhronosGroup/SPIRV-LLVM-Translator@85815e7, initial approach to avoiding kernel
metadata duplication within our internal SPIR-V consumer has been to skip
metadata generation whenever we encounter the entry point kernel (we would
assume that all necessary metadata had already been assigned to the LLVM
function upon encountering the "actual" SPIR-V kernel). For more details on the
initial approach, see 12332c1.
The change, however, did not take into account that all SPIR-V information
regarding the kernel execution mode was being stored exclusively for the entry
point wrapper kernel. Therefore, by skipping the SPIR-V entry point wrappers we
end up losing certain metadata entries, e.g. "required WG size".
Assume that the entry point wrappers contain fuller information and generate
LLVM metadata based on these SPIR-V functions instead. This fixes kernel
attributes' lowering with LLVM 14.
An alternative SPIR-V Reader solution would imply copying over all SPIR-V
information from entry point wrappers to the actual kernel body, and then
dropping entry point wrappers from the `SPIRVModule`'s/`SPIRVToLLVM`'s
function collections.
0 commit comments