Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPIR-V] Allow setting SPIR-V version via target triple.
Currently added versions are from v1.0 to v1.5, other versions can be added as needed. This change also adds documentation about SPIR-V target support in LLVM. Differential Revision: https://reviews.llvm.org/D124776
- Loading branch information
Anastasia Stulova
committed
May 23, 2022
1 parent
0eccc92
commit 72832ef
Showing
5 changed files
with
180 additions
and
5 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
============================= | ||
User Guide for SPIR-V Target | ||
============================= | ||
|
||
.. contents:: | ||
:local: | ||
|
||
.. toctree:: | ||
:hidden: | ||
|
||
Introduction | ||
============ | ||
|
||
The SPIR-V target provides code generation for the SPIR-V binary format described | ||
in `the official SPIR-V specification <https://www.khronos.org/registry/SPIR-V/>`_. | ||
|
||
.. _spirv-target-triples: | ||
|
||
Target Triples | ||
============== | ||
|
||
For cross-compilation into SPIR-V use option | ||
|
||
``-target <Architecture><Subarchitecture>-<Vendor>-<OS>-<Environment>`` | ||
|
||
to specify the target triple: | ||
|
||
.. table:: SPIR-V Architectures | ||
|
||
============ ============================================================== | ||
Architecture Description | ||
============ ============================================================== | ||
``spirv32`` SPIR-V with 32-bit pointer width. | ||
``spirv64`` SPIR-V with 64-bit pointer width. | ||
============ ============================================================== | ||
|
||
.. table:: SPIR-V Subarchitectures | ||
|
||
============ ============================================================== | ||
Architecture Description | ||
============ ============================================================== | ||
*<empty>* SPIR-V version deduced by tools based on the compiled input. | ||
``v1.0`` SPIR-V version 1.0. | ||
``v1.1`` SPIR-V version 1.1. | ||
``v1.2`` SPIR-V version 1.2. | ||
``v1.3`` SPIR-V version 1.3. | ||
``v1.4`` SPIR-V version 1.4. | ||
``v1.5`` SPIR-V version 1.5. | ||
============ ============================================================== | ||
|
||
.. table:: SPIR-V Vendors | ||
|
||
===================== ============================================================== | ||
Vendor Description | ||
===================== ============================================================== | ||
*<empty>*/``unknown`` Generic SPIR-V target without any vendor-specific settings. | ||
===================== ============================================================== | ||
|
||
.. table:: Operating Systems | ||
|
||
===================== ============================================================ | ||
OS Description | ||
===================== ============================================================ | ||
*<empty>*/``unknown`` Defaults to the OpenCL runtime. | ||
===================== ============================================================ | ||
|
||
.. table:: SPIR-V Environments | ||
|
||
===================== ============================================================== | ||
Environment Description | ||
===================== ============================================================== | ||
*<empty>*/``unknown`` Defaults to the OpenCL environment. | ||
===================== ============================================================== |
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
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
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
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