[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic (PR #113623)

David Neto via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 5 06:45:44 PST 2024


dneto0 wrote:

Hi, former SPIR WG chair here, and long time maintainer of spirv-as and spirv-dis.

@s-perron is correct: only the numbers in the binary are normative.

> I think implementing a way to differentiate capabilities that have the same value is out of scope for this pr.

I recommend not addressing this, ever.   It's not worth it. 

spirv-as will map both the old and new string names to the number; it is driven from the grammar file and knows all registered names for numbers.  (e.g. see [here](https://github.com/KhronosGroup/SPIRV-Headers/blob/cb6b2c32dbfc3257c1e9142a116fe9ee3d9b80a2/include/spirv/unified1/spirv.core.grammar.json#L16408) for the declaration that capability strings `DotProduct` and `DotProductKHR` both map to 6019.

spirv-dis maps the number to what it considers the best name, which is the string listed for the `enumerant`, field and not any of the `alias` names.  By convention, the most standardized name is put in that slot. So the standard core name is better than the KHR, which is better than an EXT, which is better than a vendor-specific name.





https://github.com/llvm/llvm-project/pull/113623


More information about the cfe-commits mailing list