SPV_INTEL_global_variable_host_access
SPV_INTEL_global_variable_host_access
Table of Contents
Name Strings
Contact
Contributors
Notice
Status
Version
Dependencies
Overview
Extension Name
New Capabilities
Token Number Assignments
Modifications to the SPIR-V Specification, Version 1.6
Issues
Revision History
Name Strings
SPV_INTEL_global_variable_host_access
Contact
To report problems with this extension, please open a new issue at:
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
Last Modified Date
2023-10-27
Revision
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 a decoration that can be applied to global (module scope)
variables. This decoration explicitly asserts that the global variable can be accessed outside the SPIR-V module.
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_host_access"
New Capabilities
This extension introduces a new capability:
GlobalVariableHostAccessINTEL
Token Number Assignments
GlobalVariableHostAccessINTEL
6187
HostAccessINTEL
6188
Modifications to the SPIR-V Specification, Version 1.6
Host Access Qualifier
After Section 3.18, add a new section "3.18a Host Access Qualifier" as follows
Defines the host system access permissions.
Used by HostAccessINTEL.
Host Access Qualifier
Enabling Capabilities
NoneINTEL
The execution environment may neither read nor write the variable
from the host. On an FPGA device, no memory port is exposed.
GlobalVariableHostAccessINTEL
ReadINTEL
The execution environment may read the variable from the host but
will never write it. On an FPGA device, only a read memory port is exposed.
GlobalVariableHostAccessINTEL
WriteINTEL
The execution environment may write the variable from the host
but will never read it. On an FPGA device, only a write memory port is
exposed.
GlobalVariableHostAccessINTEL
ReadWriteINTEL
The execution environment may read or write the variable
from the host. On an FPGA device, a read/write memory port is exposed.
GlobalVariableHostAccessINTEL
Decoration
Modify Section 3.20, Decoration, adding these rows to the Decoration table:
Decoration
Extra Operands
Enabling Capabilities
6188
HostAccessINTEL
Only valid on global (module scope)
OpVariable
The client API’s execution environment may provide a way to access a global
variable’s value from the host system. If it does, this decoration provides
two pieces of information.
Access
is an assertion by the producer about the
types of these accesses, which may allow the consumer to perform certain
optimizations.
Name
is a name which the client
API’s execution environment may use to identify this variable.
If a global
OpVariable
is not decorated with
HostAccessINTEL
, the default behavior is defined by the client API specification.
Host Access Qualifier
Access
Literal String
Name
GlobalVariableHostAccessINTEL
Capability
Modify Section 3.31, Capability, adding a row to the Capability table:
Capability
Implicitly Declares
6187
GlobalVariableHostAccessINTEL
Validation Rules
It is invalid for two
HostAccessINTEL
decorations in the same module to
have the same
Name
operand.
Issues
None.
Revision History
Rev
Date
Author
Changes
2022-11-1
Gregory Lueck
Initial revision
2023-04-25
Artem Radzikhovskyy
Address default behavior
2023-06-30
Artem Radzikhovskyy
Typo in capability
2023-10-27
Artem Radzikhovskyy
Reverting Capability ID
US