Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions sycl/doc/design/spirv-extensions/SPV_INTEL_sigmoid.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
:extension_name: SPV_INTEL_sigmoid
:capability_name: SigmoidINTEL
:capability_token: 6167
:instruction_name: OpFSigmoidINTEL
:instruction_token: 6168

= {extension_name}

== Name Strings

{extension_name}

== Contact

To report problems with this extension, please open a new issue at:

https://github.com/intel/llvm

== Contributors

* Ben Ashbaugh, Intel
* Victor Mustya, Intel

== Notice

Copyright (c) 2025 Intel Corporation. All rights reserved.

== Status

* Working Draft

This is a preview extension specification, intended to provide early access to
a feature for review and community feedback. When the feature matures, this
specification may be released as a formal extension.

Because the interfaces defined by this specification are not final and are
subject to change they are not intended to be used by shipping software
products. If you are interested in using this feature in your software product,
please let us know!

== Version

[width="40%",cols="25,25"]
|========================================
| Last Modified Date | 2025-10-29
| Revision | 1
|========================================

== Dependencies

This extension is written against the SPIR-V Specification, Version 1.6 Revision 6.

This extension requires SPIR-V 1.0.

== Overview

This extension adds instruction computing the sigmoid function as follows: *sigma*(x) = 1/(1 + e^-x^)

== Extension Name

To use this extension within a SPIR-V module, the following
*OpExtension* must be present in the module:

[subs="attributes"]
----
OpExtension "{extension_name}"
----

== New Capabilities

This extension introduces new capabilities:

[subs="attributes"]
----
{capability_name}
----

== New Instructions

Instructions added under the *{capability_name}* capability:

[subs="attributes"]
----
{instruction_name}
----

== Modifications to the SPIR-V Specification, Version 1.6

=== Capabilities

Modify Section 3.31, "Capability", adding these rows to the Capability table:

--
[cols="^.^2,16,15",options="header"]
|====
2+^.^| Capability | Implicitly Declares
| {capability_token} | *{capability_name}* |
|====
--

=== Instructions

Add to Section 3.42.13, Arithmetic Instructions:

[cols="1,1,3*3",width="100%"]
|=====
4+|[[{instruction_name}]]*{instruction_name}* +
+
Compute sigmoid function of _Value_. +
+
_Result Type_ must be a scalar or vector of
https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#Floating[floating-point type].
The component width must be 16 or 32 bits and must not have a Floating Point
Encoding operand. +
+
The type of _Value_ must be the same as _Result Type_. +
+
Results are computed per component. +
+
1+|Capability: +
*{capability_name}*
1+| 4 | {instruction_token}
| _<id>_ +
_Result Type_
| _Result <id>_
| _<id>_ +
_Value_
|=====

== Issues

None.

== Revision History

[cols="5,15,15,70"]
[grid="rows"]
[options="header"]
|========================================
|Rev|Date|Author|Changes
|1|2025-10-29|Victor Mustya|*Initial revision*
|========================================