Skip to content

Commit 5604623

Browse files
authored
[SPIR-V][DOC] Add SPV_INTEL_sigmoid extension specification (#20504)
1 parent abde64e commit 5604623

File tree

1 file changed

+142
-0
lines changed

1 file changed

+142
-0
lines changed
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
:extension_name: SPV_INTEL_sigmoid
2+
:capability_name: SigmoidINTEL
3+
:capability_token: 6167
4+
:instruction_name: OpFSigmoidINTEL
5+
:instruction_token: 6168
6+
7+
= {extension_name}
8+
9+
== Name Strings
10+
11+
{extension_name}
12+
13+
== Contact
14+
15+
To report problems with this extension, please open a new issue at:
16+
17+
https://github.com/intel/llvm
18+
19+
== Contributors
20+
21+
* Ben Ashbaugh, Intel
22+
* Victor Mustya, Intel
23+
24+
== Notice
25+
26+
Copyright (c) 2025 Intel Corporation. All rights reserved.
27+
28+
== Status
29+
30+
* Working Draft
31+
32+
This is a preview extension specification, intended to provide early access to
33+
a feature for review and community feedback. When the feature matures, this
34+
specification may be released as a formal extension.
35+
36+
Because the interfaces defined by this specification are not final and are
37+
subject to change they are not intended to be used by shipping software
38+
products. If you are interested in using this feature in your software product,
39+
please let us know!
40+
41+
== Version
42+
43+
[width="40%",cols="25,25"]
44+
|========================================
45+
| Last Modified Date | 2025-10-29
46+
| Revision | 1
47+
|========================================
48+
49+
== Dependencies
50+
51+
This extension is written against the SPIR-V Specification, Version 1.6 Revision 6.
52+
53+
This extension requires SPIR-V 1.0.
54+
55+
== Overview
56+
57+
This extension adds instruction computing the sigmoid function as follows: *sigma*(x) = 1/(1 + e^-x^)
58+
59+
== Extension Name
60+
61+
To use this extension within a SPIR-V module, the following
62+
*OpExtension* must be present in the module:
63+
64+
[subs="attributes"]
65+
----
66+
OpExtension "{extension_name}"
67+
----
68+
69+
== New Capabilities
70+
71+
This extension introduces new capabilities:
72+
73+
[subs="attributes"]
74+
----
75+
{capability_name}
76+
----
77+
78+
== New Instructions
79+
80+
Instructions added under the *{capability_name}* capability:
81+
82+
[subs="attributes"]
83+
----
84+
{instruction_name}
85+
----
86+
87+
== Modifications to the SPIR-V Specification, Version 1.6
88+
89+
=== Capabilities
90+
91+
Modify Section 3.31, "Capability", adding these rows to the Capability table:
92+
93+
--
94+
[cols="^.^2,16,15",options="header"]
95+
|====
96+
2+^.^| Capability | Implicitly Declares
97+
| {capability_token} | *{capability_name}* |
98+
|====
99+
--
100+
101+
=== Instructions
102+
103+
Add to Section 3.42.13, Arithmetic Instructions:
104+
105+
[cols="1,1,3*3",width="100%"]
106+
|=====
107+
4+|[[{instruction_name}]]*{instruction_name}* +
108+
+
109+
Compute sigmoid function of _Value_. +
110+
+
111+
_Result Type_ must be a scalar or vector of
112+
https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#Floating[floating-point type].
113+
The component width must be 16 or 32 bits and must not have a Floating Point
114+
Encoding operand. +
115+
+
116+
The type of _Value_ must be the same as _Result Type_. +
117+
+
118+
Results are computed per component. +
119+
+
120+
1+|Capability: +
121+
*{capability_name}*
122+
1+| 4 | {instruction_token}
123+
| _<id>_ +
124+
_Result Type_
125+
| _Result <id>_
126+
| _<id>_ +
127+
_Value_
128+
|=====
129+
130+
== Issues
131+
132+
None.
133+
134+
== Revision History
135+
136+
[cols="5,15,15,70"]
137+
[grid="rows"]
138+
[options="header"]
139+
|========================================
140+
|Rev|Date|Author|Changes
141+
|1|2025-10-29|Victor Mustya|*Initial revision*
142+
|========================================

0 commit comments

Comments
 (0)