Skip to content

Commit decaa0e

Browse files
authored
Added new conversion instructions instead of changing the behaviour of the existing ones.
1 parent 1475d09 commit decaa0e

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

sycl/doc/extensions/SPIRV/SPV_INTEL_usm_storage_classes.asciidoc

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ This extension requires SPIR-V 1.0.
3939

4040
== Overview
4141

42-
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.
42+
This extension introduces two new storage classes that are sub classes of the CrossWorkgroup storage class.
43+
Using these more specific storage classes provides additional information that can enable optimization.
44+
The extension also introduces two new conversion instructions to enable converting pointers from and to these storage classes.
4345

4446
== Extension Name
4547
To use this extension within a SPIR-V module, the following *OpExtension* must be present in the module:
@@ -61,9 +63,11 @@ USMStorageClassesINTEL
6163
[cols="70%,30%"]
6264
[grid="rows"]
6365
|====
66+
| OpPtrCastToCrossWorkgroupINTEL | 5934
6467
| USMStorageClassesINTEL | 5935
6568
| DeviceOnlyINTEL | 5936
6669
| HostOnlyINTEL | 5937
70+
| OpCrossWorkgroupCastToPtrINTEL | 5938
6771
|====
6872

6973
== 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:
96100

97101
=== Instructions
98102

99-
Modify Section 3.36.11, Conversion Instructions, replacing the descriptions of *OpPtrCastToGeneric* and *OpGenericCastToPtr* with the following. Their required capabilities and operands remain unchanged.
103+
Modify Section 3.36.11, Conversion Instructions, adding two new instructions as follows:
100104

101105
|===
102-
*OpPtrCastToGeneric*
106+
3+^| *OpPtrCastToCrossWorkgroupINTEL*
103107

104-
Converts a pointer's Storage Class to a more generic class.
108+
Converts a pointer's Storage Class from a more specific class to *CrossWorkgroup*.
105109

106-
_Result Type_ must be an OpTypePointer. Its Storage Class must be *Generic* or *CrossWorkgroup*.
110+
_Result Type_ must be an OpTypePointer. Its Storage Class must be *CrossWorkgroup*.
107111

108-
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.
112+
_Pointer_ must point to the *DeviceOnlyINTEL* or *HostOnlyINTEL* Storage Class.
109113

110-
_Result Type_ and _Pointer_ must point to the same type.
114+
_Result Type_ and _Pointer_ must point to the same type. 2+^| Capability: +
115+
*USMStorageClassesINTEL*
116+
| 4 | 5934 | <id> +
117+
Result Type | Result <id> | <id> +
118+
Pointer
111119
|===
112120

113121
|===
114-
*OpGenericCastToPtr*
122+
3+^| *OpCrossWorkgroupCastToPtrINTEL*
115123

116-
Convert a pointer's Storage Class to a more specific class.
124+
Convert a pointer's Storage Class from *CrossWorkgroup* to a more specific class.
117125

118-
_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*.
126+
_Result Type_ must be an OpTypePointer. _Result Type_'s Storage Class must be *DeviceOnlyINTEL* or *HostOnlyINTEL*.
119127

120-
_Pointer_ must point to the *Generic* or *CrossWorkgroup* Storage Class.
128+
_Pointer_ must point to the *CrossWorkgroup* Storage Class.
121129

122-
_Result Type_ and _Pointer_ must point to the same type.
130+
_Result Type_ and _Pointer_ must point to the same type. 2+^| Capability: +
131+
*USMStorageClassesINTEL*
132+
| 4 | 5938 | <id> +
133+
Result Type | Result <id> | <id> +
134+
Pointer
123135
|===
124136

125137
=== Validation Rules
@@ -144,4 +156,5 @@ None.
144156
|========================================
145157
|Rev|Date|Author|Changes
146158
|A|2020-06-08|Joe Garvey|*First public draft*
159+
|B|2020-06-18|Joe Garvey|*Added new conversion instructions*
147160
|========================================

0 commit comments

Comments
 (0)