File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -687,6 +687,35 @@ added by the extension:
687687
688688%endif
689689
690+ Global Variables
691+ ----------------
692+
693+ ${OneApi} Level-Zero API environments must accept SPIR-V modules that
694+ declare use of the ``SPV_INTEL_global_variable_host_access `` extension via
695+ **OpExtension **.
696+
697+ When use of the ``SPV_INTEL_global_variable_host_access `` extension is declared in the
698+ module via **OpExtension **, the environment must accept modules that
699+ declare the **GlobalVariableHostAccessINTEL ** SPIR-V capability:
700+
701+ The function ${x}ModuleGetGlobalPointer can be used to retrieve a pointer to a global variable.
702+
703+ ${x}ModuleGetGlobalPointer takes a ``pGlobalName `` parameter which identifies the variable. For a ``${x}_module_handle `` created
704+ from SPIR-V this parameter is interpreted as follows:
705+
706+ - The implementation first looks for an **OpVariable ** that is decorated with **HostAccessINTEL ** where
707+ the *Name * operand is the same as ``pGlobalName ``
708+
709+ - If no such variable is found the implementation then looks for an **OpVariable ** that is decorated with
710+ **LinkageAttributes ** where the *Name * operand is the same as ``pGlobalName ``. (The implementation considers both
711+ exported and imported variables as candidates)
712+
713+ If the module was created from native code that came form a previous call to ${x}ModuleGetNativeBinary and that
714+ other module was created from SPIR-V, then the interpretation of ``pGlobalName `` is the same as the SPIR-V case.
715+
716+ If ``pGlobalName `` identifies an imported SPIR-V variable, the module must be dynamically linked before the variable's pointer
717+ may be queried.
718+
690719Numerical Compliance
691720====================
692721
Original file line number Diff line number Diff line change @@ -242,8 +242,8 @@ desc: "Retrieve global variable pointer from Module."
242242class : $xModule
243243name : GetGlobalPointer
244244details :
245- - " The application may query global pointer from any module that either exports or imports it ."
246- - " The application must dynamically link a module that imports a global before the global pointer can be queried from it ."
245+ - " For modules created from SPIR-V the interpretation of `pGlobalName` is described in the SPIR-V programming guide ."
246+ - " For native modules not created from SPIR-V the interpretation of `pGlobalName` is implementation defined ."
247247 - " The application may call this function from simultaneous threads."
248248 - " The implementation of this function should be lock-free."
249249params :
You can’t perform that action at this time.
0 commit comments