From 12cb161256bfc6718f47d509c5d704232bb0dbab Mon Sep 17 00:00:00 2001 From: Victor Mustya Date: Wed, 29 Oct 2025 10:45:58 -0700 Subject: [PATCH] [SPIR-V][DOC] Add SPV_INTEL_sigmoid extension specification --- .../SPV_INTEL_sigmoid.asciidoc | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 sycl/doc/design/spirv-extensions/SPV_INTEL_sigmoid.asciidoc diff --git a/sycl/doc/design/spirv-extensions/SPV_INTEL_sigmoid.asciidoc b/sycl/doc/design/spirv-extensions/SPV_INTEL_sigmoid.asciidoc new file mode 100644 index 0000000000000..cd02c62eb75ce --- /dev/null +++ b/sycl/doc/design/spirv-extensions/SPV_INTEL_sigmoid.asciidoc @@ -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} +| __ + +_Result Type_ +| _Result _ +| __ + +_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* +|========================================