diff --git a/sycl/doc/extensions/SPIRV/SPV_INTEL_hw_thread_queries.asciidoc b/sycl/doc/extensions/SPIRV/SPV_INTEL_hw_thread_queries.asciidoc new file mode 100644 index 0000000000000..95729bb88a44f --- /dev/null +++ b/sycl/doc/extensions/SPIRV/SPV_INTEL_hw_thread_queries.asciidoc @@ -0,0 +1,162 @@ +:extension_name: SPV_INTEL_hw_thread_queries +:capability_name: HWThreadQueryINTEL +:capability_token: 6134 +:SubDeviceIDINTEL_token: 6135 +:GlobalHWThreadIDINTEL_token: 6136 + +{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 + +- Dmitry Sidorov, Intel + +- Mariya Podchishchaeva, Intel + +- Patrick Steinbrecher, Intel + +- Ben Ashbaugh, Intel + +- Mateusz Belicki, Intel + + +== Notice + +Copyright (c) 2021 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 | {docdate} +| Revision | A +|======================================== + +== Dependencies + +This extension is written against the SPIR-V Specification, +Version 1.5 Revision 5. + +This extension requires SPIR-V 1.0. + +== Overview + +The extension adds BuiltIn Decorations to query sub-device ID created from the root device and global H/W thread ID within the root device. + + +== Extension Name + + +To use this extension within a SPIR-V module, the appropriate *OpExtension* must +be present in the module: + +[subs="attributes"] +---- +OpExtension "{extension_name}" +---- + +== New Capabilities + +This extension introduces new capabilities: + +[subs="attributes"] +---- +{capability_name} +---- + +== New BuiltIn Decorations + +BuiltIn Decorations added under the *{capability_name}* capability: + +---- + +SubDeviceIDINTEL +GlobalHWThreadIDINTEL + +---- + +== Token Number Assignments + +[width="40%"] +[cols="70%,30%"] +[grid="rows"] +|==== +|*{capability_name}* | {capability_token} +|*SubDeviceIDINTEL* | {SubDeviceIDINTEL_token} +|*GlobalHWThreadIDINTEL* | {GlobalHWThreadIDINTEL_token} +|==== + +== Modifications to the SPIR-V Specification, Version 1.5 + + +=== Capabilities + +Modify Section 3.31, Capability, adding rows to the Capability table: + +-- +[options="header"] +|==== +2+^| Capability ^| Implicitly Declares +| {capability_token} | *{capability_name}* +| Reserved. + + + +See also extension: *{extension_name}* +|==== +-- + + +=== Decorations + +Modify Section 3.21, BuiltIn, adding these rows to the BuiltIn table: + +==== 3.21 BuiltIn + +-- +[options="header"] +|==== +2+^| BuiltIn 2+^| Enabling Capabilities +| {SubDeviceIDINTEL_token} | [[SubDeviceIDINTEL]]*SubDeviceIDINTEL* + + Sub-device ID on which the code is running within the root device, + +2+| *{capability_name}* +| {GlobalHWThreadIDINTEL_token} | [[GlobalHWThreadIDINTEL]]*GlobalHWThreadIDINTEL* + + Global ID of the H/W thread within the root device on which the code is running. + +2+| *{capability_name}* +|==== +-- + + +=== Issues + +None + +Revision History +---------------- + +[cols="5,15,15,70"] +[grid="rows"] +[options="header"] +|======================================== +|Rev|Date|Author|Changes +|1|2021-09-20|Dmitry Sidorov|Initial revision +|2|2021-12-1|Dmitry Sidorov|Replace local id with global id +|========================================