-
Notifications
You must be signed in to change notification settings - Fork 799
[SPIR-V][DOC]Add extension doc for SPV_INTEL_memory_access_aliasing #3426
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
Conversation
sycl/doc/extensions/SPIRV/SPV_INTEL_memory_access_aliasing.asciidoc
Outdated
Show resolved
Hide resolved
scope. When evaluating an aliasing query if two memory access instructions that | ||
have _AliasScopeMaskINTEL_ and _NoAliasMaskINTEL_ memory operands or decorated | ||
with _AliasScopeINTEL_ and _NoAliasINTEL_ decorations and if for some domain, | ||
the set of scopes with that domain in one instruction’s aliasing scope list is a | ||
subset of (or equal to) the set of scopes for that domain in another | ||
instruction’s noalias list, then the two memory accesses are assumed not to | ||
alias. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a pretty generic description of the overall mechanism/idea, should it be moved somewhere else, like overview?
Also,
if two memory access instructions that have AliasScopeMaskINTEL and NoAliasMaskINTEL memory operands
Does this spelling assume that those memory instructions have both of those operands at the same time? Or one has the first one and another the second one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have moved this text to overview and explicitly specify "Or one has the first one and another the second one?".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this spelling assume that those memory instructions have both of those operands at the same time? Or one has the first one and another the second one?
Yes, a single instruction can have both memory operands simultaneously in case if they have different scope, like
%var = OpLoad %type %ptr1 (noalias 1, alias 2)
OpStore %ptr2 %var (noalias 1)
OpStore %ptr3 %var (alias 2)
|
||
|
||
Optional <id> _Name_ parameter is used to specify an unique domain in global | ||
scope. If this rule is violated in runtime - behaviour is undefined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which rule?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved it to overview.
sycl/doc/extensions/SPIRV/SPV_INTEL_memory_access_aliasing.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/SPIRV/SPV_INTEL_memory_access_aliasing.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/SPIRV/SPV_INTEL_memory_access_aliasing.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/SPIRV/SPV_INTEL_memory_access_aliasing.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/SPIRV/SPV_INTEL_memory_access_aliasing.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/SPIRV/SPV_INTEL_memory_access_aliasing.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/SPIRV/SPV_INTEL_memory_access_aliasing.asciidoc
Outdated
Show resolved
Hide resolved
Thanks for the suggestions! I'll apply them a bit later. For now I answer the most important one, that affects the actual implementation. |
This extension adds analogs of alias.scope and noalias metadata in SPIR-V. These metadata is being used to annotate non-aliasing memory accesses and being generated, for example, during inlining of functions with restrict pointer parameters. This patch also casually adds OpDecorateId in the translator flow. Spec: intel/llvm#3426 Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
* Implement SPV_INTEL_memory_access_aliasing extension This extension adds analogs of alias.scope and noalias metadata in SPIR-V. These metadata is being used to annotate non-aliasing memory accesses and being generated, for example, during inlining of functions with restrict pointer parameters. Spec: intel/llvm#3426 This patch also casually adds OpDecorateId in the translator flow. Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
* Implement SPV_INTEL_memory_access_aliasing extension This extension adds analogs of alias.scope and noalias metadata in SPIR-V. These metadata is being used to annotate non-aliasing memory accesses and being generated, for example, during inlining of functions with restrict pointer parameters. Spec: intel#3426 This patch also casually adds OpDecorateId in the translator flow. Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com> Original commit: KhronosGroup/SPIRV-LLVM-Translator@974749c
Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
c7cf02d
to
2431e36
Compare
Resolved comments with a simple fix, answered others. |
It should be a valid case if alias.scope and noalias mask/decoration be applied to the same instruction. Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
sycl/doc/extensions/SPIRV/SPV_INTEL_memory_access_aliasing.asciidoc
Outdated
Show resolved
Hide resolved
* Implement SPV_INTEL_memory_access_aliasing extension This extension adds analogs of alias.scope and noalias metadata in SPIR-V. These metadata is being used to annotate non-aliasing memory accesses and being generated, for example, during inlining of functions with restrict pointer parameters. Spec: intel/llvm#3426 This patch also casually adds OpDecorateId in the translator flow. Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
* Implement SPV_INTEL_memory_access_aliasing extension This extension adds analogs of alias.scope and noalias metadata in SPIR-V. These metadata is being used to annotate non-aliasing memory accesses and being generated, for example, during inlining of functions with restrict pointer parameters. Spec: intel/llvm#3426 This patch also casually adds OpDecorateId in the translator flow. Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
* Implement SPV_INTEL_memory_access_aliasing extension This extension adds analogs of alias.scope and noalias metadata in SPIR-V. These metadata is being used to annotate non-aliasing memory accesses and being generated, for example, during inlining of functions with restrict pointer parameters. Spec: intel/llvm#3426 This patch also casually adds OpDecorateId in the translator flow. Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
* Implement SPV_INTEL_memory_access_aliasing extension This extension adds analogs of alias.scope and noalias metadata in SPIR-V. These metadata is being used to annotate non-aliasing memory accesses and being generated, for example, during inlining of functions with restrict pointer parameters. Spec: intel/llvm#3426 This patch also casually adds OpDecorateId in the translator flow. Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
* Implement SPV_INTEL_memory_access_aliasing extension This extension adds analogs of alias.scope and noalias metadata in SPIR-V. These metadata is being used to annotate non-aliasing memory accesses and being generated, for example, during inlining of functions with restrict pointer parameters. Spec: intel/llvm#3426 This patch also casually adds OpDecorateId in the translator flow. Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
* Implement SPV_INTEL_memory_access_aliasing extension This extension adds analogs of alias.scope and noalias metadata in SPIR-V. These metadata is being used to annotate non-aliasing memory accesses and being generated, for example, during inlining of functions with restrict pointer parameters. Spec: intel/llvm#3426 This patch also casually adds OpDecorateId in the translator flow. Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
* Implement SPV_INTEL_memory_access_aliasing extension This extension adds analogs of alias.scope and noalias metadata in SPIR-V. These metadata is being used to annotate non-aliasing memory accesses and being generated, for example, during inlining of functions with restrict pointer parameters. Spec: intel/llvm#3426 This patch also casually adds OpDecorateId in the translator flow. Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
* Implement SPV_INTEL_memory_access_aliasing extension This extension adds analogs of alias.scope and noalias metadata in SPIR-V. These metadata is being used to annotate non-aliasing memory accesses and being generated, for example, during inlining of functions with restrict pointer parameters. Spec: intel/llvm#3426 This patch also casually adds OpDecorateId in the translator flow. Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
* Implement SPV_INTEL_memory_access_aliasing extension This extension adds analogs of alias.scope and noalias metadata in SPIR-V. These metadata is being used to annotate non-aliasing memory accesses and being generated, for example, during inlining of functions with restrict pointer parameters. Spec: intel/llvm#3426 This patch also casually adds OpDecorateId in the translator flow. Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
@MrSidims any plans finishing this PR? |
I was thinking, that everything is in place. Let me double check/resolve comments. |
Modify headers to include declarations of tokens described by this spec: intel/llvm#3426
Modify headers to include declarations of tokens described by this spec: intel/llvm#3426
This extension adds *AliasDomainDeclINTEL*, *AliasScopeINTEL* and | ||
*AliasScopeListDeclINTEL* instructions that serve a purpose to | ||
specify aliasing scopes within which annotated memory accesses don't alias. | ||
Results of these instructios are used by *AliasScopeINTEL* and *NoAliasINTEL* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Results of these instructios are used by *AliasScopeINTEL* and *NoAliasINTEL* | |
Results of these instructions are used by *AliasScopeINTEL* and *NoAliasINTEL* |
[width="40%",cols="25,25"] | ||
|======================================== | ||
| Last Modified Date | 2021-02-15 | ||
| Revision | A |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Revision | A | |
| Revision | 2 |
Signed-off-by: Dmitry Sidorov dmitry.sidorov@intel.com