2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
11 On the hardware side, there is the hierarchy (fine to coarse):
19 * streaming multiprocessor
21 All OpenMP and OpenACC levels are used, i.e.
23 * OpenMP's simd and OpenACC's vector map to threads
25 * OpenMP's threads ('parallel') and OpenACC's workers map to warps
27 * OpenMP's teams and OpenACC's gang use a threadpool with the
28 size of the number of teams or gangs, respectively.
32 * The ``warp_size`` is always 32
34 * CUDA kernel launched: ``dim={#teams,1,1}, blocks={#threads,warp_size,1}``.
36 Additional information can be obtained by setting the environment variable to
37 ``GOMP_DEBUG=1`` (very verbose; grep for ``kernel.*launch`` for launch
40 GCC generates generic PTX ISA code, which is just-in-time compiled by CUDA,
41 which caches the JIT in the user's directory (see CUDA documentation; can be
42 tuned by the environment variables ``CUDA_CACHE_{DISABLE,MAXSIZE,PATH}``.
44 Note: While PTX ISA is generic, the ``-mptx=`` and ``-march=`` commandline
45 options still affect the used PTX ISA code and, thus, the requirments on
46 CUDA version and hardware.
48 The implementation remark:
50 * I/O within OpenMP target regions and OpenACC parallel/kernels is supported
51 using the C library ``printf`` functions. Note that the Fortran
52 ``print`` / ``write`` statements are not supported, yet.
54 * Compilation OpenMP code that contains ``requires reverse_offload``
55 requires at least ``-march=sm_35``, compiling for ``-march=sm_30``