Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing SPIR-V 1.4 features/changes #2460

Open
5 of 6 tasks
MrSidims opened this issue Mar 25, 2024 · 2 comments
Open
5 of 6 tasks

Missing SPIR-V 1.4 features/changes #2460

MrSidims opened this issue Mar 25, 2024 · 2 comments
Assignees

Comments

@MrSidims
Copy link
Contributor

MrSidims commented Mar 25, 2024

Following my AR from OpenCL Tooling TSG. The translator claims SPIR-V 1.4 support, yet there are few features missing

  • OpCopyLogical instruction
  • OpPtrEqual and OpPtrNotEqual instructions
  • OpPtrDiff instruction
  • OpCopyMemory and OpCopyMemorySized instructions since 1.4 have optional Memory Operands
  • DecorateString and OpMemberDecorateString instructions
  • CounterBuffer decoration
@MrSidims
Copy link
Contributor Author

MrSidims commented Mar 25, 2024

Comments:

  1. At this point of time I don't see an LLVM counterpart, so guess it's implementable only via SPIR-V friendly translation;

2 and 3. We can consider translating ptrtoint + cmp / sub to these instructions during forward translation, but probably we should instead just recognize SPIR-V friendly input and then during reverse translation generate ptrtoint + cmp / sub (either way with Builder::CreatePtrDiff)

  1. Pretty much straightforward;

  2. these decoration instructions are odd. I only see a single use-case for UserSemantic decorations for them, meanwhile the translator uses OpDecorate and OpMemberDecorate to store UserSemantic. And the translator is right in doing so as the spec puts no restrictions of what kind of literals to used for these 2 instructions;

  3. unlikely to represent right now, but probably should recognize it and skip.

MrSidims pushed a commit that referenced this issue Apr 3, 2024
… Source and Target (#2470)

This change addresses p.4 of #2460.
No changes for OpCopyMemory as we currently don't use it in translation.
vmaksimo added a commit to vmaksimo/SPIRV-LLVM-Translator that referenced this issue Apr 3, 2024
…perands for both Source and Target

This change addresses p.4 of KhronosGroup#2460.
No changes for OpCopyMemory as we currently don't use it in translation.
vmaksimo added a commit to vmaksimo/SPIRV-LLVM-Translator that referenced this issue Apr 3, 2024
Do nothing for now, as it's not used in translator.

Addresses p.6 of KhronosGroup#2460
MrSidims pushed a commit that referenced this issue Apr 4, 2024
…perands for both Source and Target (#2473)

This change addresses p.4 of #2460.
No changes for OpCopyMemory as we currently don't use it in translation.
MrSidims pushed a commit that referenced this issue Apr 9, 2024
Do nothing for now, as it's not used in translator.

Addresses p.6 of #2460
MrSidims pushed a commit that referenced this issue Apr 12, 2024
There is no mapping to LLVM instructions, so it can be used only via SPIR-V friendly translation.

This addresses p1. of #2460
MrSidims pushed a commit that referenced this issue Apr 15, 2024
@vmaksimo
Copy link
Contributor

The only thing left is to clarify the possible cases where we actually need to use DecorateString and MemberDecorateString instructions.
@MrSidims please link registry issue here once it's created. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants