[PATCH] D154123: [HIP] Start document HIP support by clang
Ronan Keryell via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 14 14:04:21 PDT 2023
keryell added inline comments.
================
Comment at: clang/docs/HIPSupport.rst:24
+
+Clang supports HIP on `ROCm platform <https://rocm.docs.amd.com/en/latest/#>`_.
+
----------------
I thought the idea of HIP was to also target Nvidia GPU? Otherwise I do not understand "portable applications for GPUs" above.
================
Comment at: clang/docs/HIPSupport.rst:33
+
+ clang++ -c --offload-arch=gfx906 -xhip test.cpp -o test.o
+
----------------
I suggest giving also a simpler example without `-c` to generate directly an executable without split compile and link.
Also avoid using `test` as an example as it is confusing as it is also a shell builtin on Unix and it might take sometime to understand why the `test` does not use the GPU. :-)
================
Comment at: clang/docs/HIPSupport.rst:35-37
+This command will compile a .cpp file with the -xhip option to indicate that
+the source is a HIP program. However, if the file has a .hip extension, you
+don't need the -xhip option. Clang will automatically recognize it as a HIP
----------------
================
Comment at: clang/docs/HIPSupport.rst:141
+ - Defined with a value of 1 when the target device lacks support for HIP image functions.
+ * - ``HIP_API_PER_THREAD_DEFAULT_STREAM``
+ - Defined when the GPU default stream is set to per-thread mode.
----------------
Should this one be with underscores too?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154123/new/
https://reviews.llvm.org/D154123
More information about the cfe-commits
mailing list