-
Notifications
You must be signed in to change notification settings - Fork 744
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
[SYCL][DOC][SPIRV] Added a SPIR-V extension that introduces two new storage classes. #1840
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -39,7 +39,9 @@ This extension requires SPIR-V 1.0. | |||||||||
|
||||||||||
== Overview | ||||||||||
|
||||||||||
This extension introduces two new storage classes that are sub classes of the CrossWorkgroup storage class. Using these more specific storage classes provides additional information that can enable optimization. | ||||||||||
This extension introduces two new storage classes that are sub classes of the CrossWorkgroup storage class. | ||||||||||
Using these more specific storage classes provides additional information that can enable optimization. | ||||||||||
The extension also introduces two new conversion instructions to enable converting pointers from and to these storage classes. | ||||||||||
|
||||||||||
== Extension Name | ||||||||||
To use this extension within a SPIR-V module, the following *OpExtension* must be present in the module: | ||||||||||
|
@@ -61,9 +63,11 @@ USMStorageClassesINTEL | |||||||||
[cols="70%,30%"] | ||||||||||
[grid="rows"] | ||||||||||
|==== | ||||||||||
| OpPtrCastToCrossWorkgroupINTEL | 5934 | ||||||||||
| USMStorageClassesINTEL | 5935 | ||||||||||
| DeviceOnlyINTEL | 5936 | ||||||||||
| HostOnlyINTEL | 5937 | ||||||||||
| OpCrossWorkgroupCastToPtrINTEL | 5938 | ||||||||||
|==== | ||||||||||
|
||||||||||
== Modifications to the SPIR-V Specification, Version 1.5 Revision 3 | ||||||||||
|
@@ -96,30 +100,38 @@ Modify Section 3.31, Capability, adding a row to the Capability table: | |||||||||
|
||||||||||
=== Instructions | ||||||||||
|
||||||||||
Modify Section 3.36.11, Conversion Instructions, replacing the descriptions of *OpPtrCastToGeneric* and *OpGenericCastToPtr* with the following. Their required capabilities and operands remain unchanged. | ||||||||||
Modify Section 3.36.11, Conversion Instructions, adding two new instructions as follows: | ||||||||||
|
||||||||||
|=== | ||||||||||
*OpPtrCastToGeneric* | ||||||||||
3+^| *OpPtrCastToCrossWorkgroupINTEL* | ||||||||||
|
||||||||||
Converts a pointer's Storage Class to a more generic class. | ||||||||||
Converts a pointer's Storage Class from a more specific class to *CrossWorkgroup*. | ||||||||||
MrSidims marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
||||||||||
_Result Type_ must be an OpTypePointer. Its Storage Class must be *Generic* or *CrossWorkgroup*. | ||||||||||
_Result Type_ must be an OpTypePointer. Its Storage Class must be *CrossWorkgroup*. | ||||||||||
|
||||||||||
If _Result Type_'s Storage Class is *Generic*, _Pointer_ must point to the *Workgroup*, *CrossWorkgroup*, *Function*, *DeviceOnlyINTEL*, or *HostOnlyINTEL* Storage Class. If _Result Type_'s Storage Class is *CrossWorkgroup*, _Pointer_ must point to the *DeviceOnlyINTEL* or *HostOnlyINTEL* Storage Class. | ||||||||||
_Pointer_ must point to the *DeviceOnlyINTEL* or *HostOnlyINTEL* Storage Class. | ||||||||||
|
||||||||||
_Result Type_ and _Pointer_ must point to the same type. | ||||||||||
_Result Type_ and _Pointer_ must point to the same type. 2+^| Capability: + | ||||||||||
*USMStorageClassesINTEL* | ||||||||||
Comment on lines
+114
to
+115
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| 4 | 5934 | <id> + | ||||||||||
Result Type | Result <id> | <id> + | ||||||||||
Pointer | ||||||||||
|=== | ||||||||||
|
||||||||||
|=== | ||||||||||
*OpGenericCastToPtr* | ||||||||||
3+^| *OpCrossWorkgroupCastToPtrINTEL* | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
Convert a pointer's Storage Class to a more specific class. | ||||||||||
Convert a pointer's Storage Class from *CrossWorkgroup* to a more specific class. | ||||||||||
|
||||||||||
_Result Type_ must be an OpTypePointer. If _Pointer_ points to the *Generic* Storage Class, _Result Type_'s Storage Class must be *Workgroup*, *CrossWorkgroup*, *Function*, *DeviceOnlyINTEL*, or *HostOnlyINTEL*. If _Pointer_ points to the *CrossWorkgroup* storage class, _Result Type_'s Storage Class must be *DeviceOnlyINTEL* or *HostOnlyINTEL*. | ||||||||||
_Result Type_ must be an OpTypePointer. _Result Type_'s Storage Class must be *DeviceOnlyINTEL* or *HostOnlyINTEL*. | ||||||||||
|
||||||||||
_Pointer_ must point to the *Generic* or *CrossWorkgroup* Storage Class. | ||||||||||
_Pointer_ must point to the *CrossWorkgroup* Storage Class. | ||||||||||
|
||||||||||
_Result Type_ and _Pointer_ must point to the same type. | ||||||||||
_Result Type_ and _Pointer_ must point to the same type. 2+^| Capability: + | ||||||||||
*USMStorageClassesINTEL* | ||||||||||
Comment on lines
+130
to
+131
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
| 4 | 5938 | <id> + | ||||||||||
Result Type | Result <id> | <id> + | ||||||||||
Pointer | ||||||||||
|=== | ||||||||||
|
||||||||||
=== Validation Rules | ||||||||||
|
@@ -144,4 +156,5 @@ None. | |||||||||
|======================================== | ||||||||||
|Rev|Date|Author|Changes | ||||||||||
|A|2020-06-08|Joe Garvey|*First public draft* | ||||||||||
|B|2020-06-18|Joe Garvey|*Added new conversion instructions* | ||||||||||
|======================================== |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.