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

Finn Plummer via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 4 20:04:40 PST 2024


inbelic wrote:

Regarding the comments about differentiating between `OpSDot/DotProduct` and `OpSDotKHR/DotProductKHR`:

I agree that these are different ops/capabilities in the SPIR-V spec.

However from a quick attempt to implement this, I found that since the Capabilities share the same bit value of (`6016, 6017,...`), we do not have a way to differentiate between these capabilities when checking requirements and adding available capabilities. This is because `SPIRV::Capability::DotProduct == SPIRV::Capability::DotProductKHR = 6019`.

I think implementing a way to differentiate capabilities that have the same value is out of scope for this pr. So I would propose that we file a follow-up issue to deal with that and either:
- Merge as-is
- Remove the extension based changes from this pr, so only use `OpSDot` and the `DotProduct` capability when we have a version that fits
- Remove the version based changes from this pr, so only use `OpSDotKHR` and the `DotProductKHR` capability when the extension is provided
- Remove both optimized versions and only lower to the expansion

WDYT?

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


More information about the cfe-commits mailing list