[Openmp-commits] [PATCH] D156387: [OpenMP][Docs] Added offloading command line reference to OpenMP FAQ
Johannes Doerfert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jul 27 14:27:35 PDT 2023
jdoerfert added reviewers: tianshilei1992, jhuber6, JonChesterfield, jplehr.
jdoerfert added inline comments.
================
Comment at: openmp/docs/SupportAndFAQ.rst:462
+Specify which OpenMP offloading targets should be supported. For example, you
+may specify ``-fopenmp-targets=amdgcn-amd-amdhsa,nvptx-none``.
+
----------------
Add sth like: Note that this option is often not needed anymore if ``--offload-arch` is provided.
================
Comment at: openmp/docs/SupportAndFAQ.rst:468
+``--offload-arch=sm_80`` to target an Nvidia Tesla A100 or
+``--offload-arch=gfx90a`` to target an AMD Instinct MI250X.
+
----------------
Mention auto detection (for the machine used for compiling) and mention {amdgpu,nvptx}-arch executables together with the "key" that corresponds to the sub architecture.
================
Comment at: openmp/docs/SupportAndFAQ.rst:473
+Compile the target regions for the device only. All target regions will be
+compiled for both host and device if not specified.
+
----------------
This is not what this does. It will compile only the code that goes on the device, not the code for the host. Mention this is for debug purposes mostly, or if device only runtimes are created.
================
Comment at: openmp/docs/SupportAndFAQ.rst:504-507
+``-foffload-lto``
+"""""""""""""""""
+Enable ``full`` link time optimization on the device. This option is equivalent to
+``-foffload-lto=full``.
----------------
Just make arg above optional and say what the default is `[=<arg>]` ...
================
Comment at: openmp/docs/SupportAndFAQ.rst:513
+when offloading to the device fails. An example use case of this option is to
+verify that code is being offloaded to the device.
+
----------------
I would not propose this to verify anything, honestly. Actually, mention that this is not to verify and mention how you should verify (with the env var set to mandatory). Instead, this is to avoid the host fallback which can help if the target contains code that cannot be compiled for the host (like unguarded device intrinsics), or if you want to save compile time.
================
Comment at: openmp/docs/SupportAndFAQ.rst:533-535
+``--no-offload-new-driver``
+"""""""""""""""""""""""""""
+Do not use the new driver for offloading compilation.
----------------
@jhuber6, am I correct in assuming there is no "old" driver for OpenMP, and we should tell people this is only for HIP/CUDA? (even there it seems silly, this is probably not of use right now)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156387/new/
https://reviews.llvm.org/D156387
More information about the Openmp-commits
mailing list