1 =============================
2 User Guide for SPIR-V Target
3 =============================
14 The SPIR-V target provides code generation for the SPIR-V binary format described
15 in `the official SPIR-V specification <https://www.khronos.org/registry/SPIR-V/>`_.
17 .. _spirv-target-triples:
22 For cross-compilation into SPIR-V use option
24 ``-target <Architecture><Subarchitecture>-<Vendor>-<OS>-<Environment>``
26 to specify the target triple:
28 .. table:: SPIR-V Architectures
30 ============ ==============================================================
31 Architecture Description
32 ============ ==============================================================
33 ``spirv32`` SPIR-V with 32-bit pointer width.
34 ``spirv64`` SPIR-V with 64-bit pointer width.
35 ============ ==============================================================
37 .. table:: SPIR-V Subarchitectures
39 =============== ==============================================================
40 Subarchitecture Description
41 =============== ==============================================================
42 *<empty>* SPIR-V version deduced by tools based on the compiled input.
43 ``v1.0`` SPIR-V version 1.0.
44 ``v1.1`` SPIR-V version 1.1.
45 ``v1.2`` SPIR-V version 1.2.
46 ``v1.3`` SPIR-V version 1.3.
47 ``v1.4`` SPIR-V version 1.4.
48 ``v1.5`` SPIR-V version 1.5.
49 =============== ==============================================================
51 .. table:: SPIR-V Vendors
53 ===================== ==============================================================
55 ===================== ==============================================================
56 *<empty>*/``unknown`` Generic SPIR-V target without any vendor-specific settings.
57 ===================== ==============================================================
59 .. table:: Operating Systems
61 ===================== ============================================================
63 ===================== ============================================================
64 *<empty>*/``unknown`` Defaults to the OpenCL runtime.
65 ===================== ============================================================
67 .. table:: SPIR-V Environments
69 ===================== ==============================================================
70 Environment Description
71 ===================== ==============================================================
72 *<empty>*/``unknown`` Defaults to the OpenCL environment.
73 ===================== ==============================================================
77 ``-target spirv64v1.0`` can be used to compile for SPIR-V version 1.0 with 64-bit pointer width.