-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding INTEL global variable extensions #205
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
202 changes: 202 additions & 0 deletions
202
extensions/INTEL/SPV_INTEL_global_variable_fpga_decorations.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
= SPV_INTEL_global_variable_fpga_decorations | ||
:source-highlighter: coderay | ||
:coderay-linenums-mode: table | ||
|
||
// This section needs to be after the document title. | ||
:doctype: book | ||
:toc2: | ||
:toc: left | ||
:encoding: utf-8 | ||
:lang: en | ||
|
||
== Name Strings | ||
|
||
SPV_INTEL_global_variable_fpga_decorations | ||
|
||
== Contact | ||
|
||
To report problems with this extension, please open a new issue at: | ||
|
||
https://github.com/KhronosGroup/SPIRV-Registry | ||
|
||
== Contributors | ||
|
||
- Artem Radzikhovskyy, Intel | ||
- Michael Kinsner, Intel | ||
- Joe Garvey, Intel | ||
- Mohammad Fawaz, Intel | ||
- Gregory Lueck, Intel | ||
|
||
== Notice | ||
|
||
Copyright (c) 2021-2023 Intel Corporation. All rights reserved. | ||
|
||
== Status | ||
|
||
* Complete | ||
|
||
== Version | ||
|
||
[width="40%",cols="25,25"] | ||
|======================================== | ||
| Last Modified Date | {docdate} | ||
| Revision | 1 | ||
|======================================== | ||
|
||
== Dependencies | ||
|
||
This extension is written against the SPIR-V Specification, | ||
Version 1.6 Revision 2. | ||
|
||
This extension requires SPIR-V 1.0. | ||
|
||
== Overview | ||
|
||
This extension adds decorations that can be applied to global (module scope) | ||
variables. These decorations are intended to help code generation for | ||
FPGA devices, they can be ignored by all other consumers of this extension. | ||
|
||
== Extension Name | ||
To use this extension within a SPIR-V module, the following *OpExtension* must | ||
be present in the module: | ||
|
||
---- | ||
OpExtension "SPV_INTEL_global_variable_fpga_decorations" | ||
---- | ||
|
||
== New Capabilities | ||
This extension introduces a new capability: | ||
|
||
---- | ||
GlobalVariableFPGADecorationsINTEL | ||
---- | ||
|
||
== Token Number Assignments | ||
|
||
-- | ||
[width="40%"] | ||
[cols="70%,30%"] | ||
[grid="rows"] | ||
|==== | ||
|GlobalVariableFPGADecorationsINTEL | 6146 | ||
|InitModeINTEL | 6147 | ||
|ImplementInRegisterMapINTEL | 6148 | ||
|==== | ||
-- | ||
|
||
== Modifications to the SPIR-V Specification, Version 1.6 | ||
|
||
=== Initialization Mode Qualifier | ||
|
||
After Section 3.18, add a new section "3.18a Initialization Mode Qualifier" as follows | ||
|
||
Defines how the initialization should be triggered. | ||
|
||
Used by InitModeINTEL. | ||
|
||
-- | ||
[options="header"] | ||
|==== | ||
2+^| Initialization Mode Qualifier ^| Enabling Capabilities | ||
// --- ROW BREAK --- | ||
| 0 | ||
| *InitOnDeviceReprogramINTEL* | ||
|
||
Initialization is performed by reprogramming | ||
the device. This may require more frequent reprogramming but may reduce | ||
area. | ||
|
||
| *GlobalVariableFPGADecorationsINTEL* | ||
|
||
// --- ROW BREAK --- | ||
| 1 | ||
| *InitOnDeviceResetINTEL* | ||
|
||
Initialization is performed by sending a reset | ||
signal to the device. This may increase area but may reduce reprogramming | ||
frequency. | ||
| *GlobalVariableFPGADecorationsINTEL* | ||
|
||
|==== | ||
-- | ||
|
||
=== Decoration | ||
|
||
Modify Section 3.20, Decoration, adding these rows to the Decoration table: | ||
|
||
-- | ||
[cols="^4,20,2*5,22",options="header"] | ||
|==== | ||
2+^.^| Decoration 2+<.^| Extra Operands | Enabling Capabilities | ||
|
||
// --- ROW BREAK --- | ||
| 6147 | ||
a| | ||
*InitModeINTEL* + | ||
Only valid on global (module scope) *OpVariable* which has an _Initializer_ | ||
operand. | ||
|
||
This decoration only has an effect when the consumer is an FPGA or similar | ||
device. The _Trigger_ value tells how the global variable should be | ||
initialized. | ||
|
||
If a global *OpVariable* with an _Initializer_ operand is not decorated with | ||
*InitModeINTEL*, the method by which the variable's value is initialized is | ||
implementation defined. | ||
|
||
2+| Initialization Mode Qualifier + | ||
_Trigger_ | ||
| *GlobalVariableFPGADecorationsINTEL* | ||
|
||
// --- ROW BREAK --- | ||
| 6148 | ||
a| | ||
*ImplementInRegisterMapINTEL* + | ||
Only valid on global (module scope) *OpVariable*. | ||
|
||
This decoration only has an effect when the consumer is an FPGA or similar | ||
device. The _Value_ value controls the interface of this global variable with | ||
hardware outside the boundary of the SPIR-V module. | ||
|
||
Legal values of _Value_: | ||
|
||
* 0 [False] - Access to this memory is through a dedicated interface. | ||
* 1 [True] - Access to this memory is through a common register map interface that may be shared by other control or data inputs and outputs. | ||
|
||
If a global *OpVariable* is not decorated with *ImplementInRegisterMapINTEL*, the | ||
interface for the variable is implementation defined. | ||
|
||
2+| Literal Number + | ||
_Value_ | ||
| *GlobalVariableFPGADecorationsINTEL* | ||
|
||
|==== | ||
-- | ||
|
||
=== Capability | ||
|
||
Modify Section 3.31, Capability, adding a row to the Capability table: | ||
-- | ||
[options="header"] | ||
|==== | ||
2+^| Capability ^| Implicitly Declares | ||
| 6146 | ||
| GlobalVariableFPGADecorationsINTEL | ||
| | ||
|==== | ||
-- | ||
|
||
== Issues | ||
|
||
None. | ||
|
||
== Revision History | ||
|
||
[cols="5,15,15,70"] | ||
[grid="rows"] | ||
[options="header"] | ||
|======================================== | ||
|Rev|Date|Author|Changes | ||
|1|2022-11-1|Gregory Lueck|Initial revision | ||
|2|2023-04-25|Artem Radzikhovskyy| Seperated the FPGA specific decorations from the generic ones | ||
|======================================== |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please check that this extension is linked properly?
This all looks correct here, but the filename appears to be
SPV_INTEL_global_variable_host_acces_decoration
. I think the filename is incorrect and should be renamed, but this would be good to confirm.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch - fixed