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 · 3 comments
Open
5 of 6 tasks

Missing SPIR-V 1.4 features/changes #2460

MrSidims opened this issue Mar 25, 2024 · 3 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!

@bashbaug
Copy link
Contributor

bashbaug commented Aug 9, 2024

I created internal SPIR-V issue 810 to clarify OpDecorateString vs. OpDecorate, FYI.

MrSidims pushed a commit that referenced this issue Aug 20, 2024
…ng (#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see #2460 and #2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for #2670, but I'll do that in a separate PR.
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 18, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 18, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh added a commit that referenced this issue Oct 18, 2024
…emberDecorateString (#2677) (#2767)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see #2460 and #2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for #2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)

Co-authored-by: Ben Ashbaugh <[email protected]>
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 22, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 22, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 22, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 22, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 22, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 22, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 22, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 22, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 22, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 22, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 22, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 22, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 22, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 22, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Oct 22, 2024
…emberDecorateString (KhronosGroup#2677)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see KhronosGroup#2460 and KhronosGroup#2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for KhronosGroup#2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)
svenvh added a commit that referenced this issue Oct 23, 2024
…emberDecorateString (#2677) (#2774)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see #2460 and #2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for #2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)

Co-authored-by: Ben Ashbaugh <[email protected]>
svenvh added a commit that referenced this issue Oct 23, 2024
…emberDecorateString (#2677) (#2775)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see #2460 and #2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for #2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)

Co-authored-by: Ben Ashbaugh <[email protected]>
svenvh added a commit that referenced this issue Oct 23, 2024
…emberDecorateString (#2677) (#2776)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see #2460 and #2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for #2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)

Co-authored-by: Ben Ashbaugh <[email protected]>
svenvh added a commit that referenced this issue Oct 23, 2024
…emberDecorateString (#2677) (#2777)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see #2460 and #2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for #2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)

Co-authored-by: Ben Ashbaugh <[email protected]>
svenvh added a commit that referenced this issue Oct 23, 2024
…emberDecorateString (#2677) (#2778)

This PR adds "reverse translation" (from SPIR-V to LLVM IR) support for OpDecorateString and OpMemberDecorateString, see #2460 and #2670. These instructions are currently treated as synonyms for OpDecorate and OpMemberDecorate. We'll want to tidy this up at some point, but at least for now we won't crash if we see these instructions.

I'll still need to add proper support for decorating variables in the input storage class for #2670, but I'll do that in a separate PR.

(cherry picked from commit f7057b4)

Co-authored-by: Ben Ashbaugh <[email protected]>
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Nov 22, 2024
…up#2484)

There is no mapping to LLVM instructions, so it can be used only via SPIR-V friendly translation.

This addresses p1. of KhronosGroup#2460

(cherry picked from commit 8518a6f)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Nov 22, 2024
There is no mapping to LLVM instructions, so it can be used only via SPIR-V friendly translation.

This addresses p1. of KhronosGroup#2460

(cherry picked from commit 8518a6f)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Nov 22, 2024
There is no mapping to LLVM instructions, so it can be used only via SPIR-V friendly translation.

This addresses p1. of KhronosGroup#2460

(cherry picked from commit 8518a6f)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Nov 22, 2024
There is no mapping to LLVM instructions, so it can be used only via SPIR-V friendly translation.

This addresses p1. of KhronosGroup#2460

(cherry picked from commit 8518a6f)
svenvh pushed a commit to svenvh/SPIRV-LLVM-Translator that referenced this issue Nov 22, 2024
There is no mapping to LLVM instructions, so it can be used only via SPIR-V friendly translation.

This addresses p1. of KhronosGroup#2460

(cherry picked from commit 8518a6f)
svenvh pushed a commit that referenced this issue Nov 25, 2024
There is no mapping to LLVM instructions, so it can be used only via SPIR-V friendly translation.

This addresses p1. of #2460

(cherry picked from commit 8518a6f)
svenvh pushed a commit that referenced this issue Nov 25, 2024
There is no mapping to LLVM instructions, so it can be used only via SPIR-V friendly translation.

This addresses p1. of #2460

(cherry picked from commit 8518a6f)
svenvh pushed a commit that referenced this issue Nov 25, 2024
There is no mapping to LLVM instructions, so it can be used only via SPIR-V friendly translation.

This addresses p1. of #2460

(cherry picked from commit 8518a6f)
svenvh pushed a commit that referenced this issue Nov 25, 2024
There is no mapping to LLVM instructions, so it can be used only via SPIR-V friendly translation.

This addresses p1. of #2460

(cherry picked from commit 8518a6f)
svenvh pushed a commit that referenced this issue Nov 25, 2024
There is no mapping to LLVM instructions, so it can be used only via SPIR-V friendly translation.

This addresses p1. of #2460

(cherry picked from commit 8518a6f)
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

3 participants