SWDEV-288929 - Add hiprtc support in programming guide

Change-Id: I22d69801bbb36b610c855657a7248c24b9981b80


[ROCm/hip commit: 3f503283e1]
Tento commit je obsažen v:
Julia Jiang authored and Julia Jiang committed 2021-06-18 19:57:16 -04:00
1 rodič 26f834670a
revize afd774c477
2 files changed
+12 -3

No files matched your search

+9
Zobrazit soubor
@@ -98,6 +98,15 @@ In case events are used across multiple dispatches, for example, start and stop
- Coherent host memory is the default and is the easiest to use since the memory is visible to the CPU at typical synchronization points. This memory allows in-kernel synchronization commands such as threadfence_system to work transparently.
- HIP/ROCm also supports the ability to cache host memory in the GPU using the "Non-Coherent" host memory allocations. This can provide performance benefit, but care must be taken to use the correct synchronization.
## HIP Runtime Compilation
HIP now supports runtime compilation (hipRTC), the usage of which will provide the possibility of optimizations and performance improvement compared with other APIs via regular offline static compilation.
hipRTC APIs accept HIP source files in character string format as input parameters and create handles of programs by compiling the HIP source files without spawning separate processes.
For more details on hipRTC APIs, refer to HIP-API.pdf in GitHub (https://github.com/RadeonOpenCompute/ROCm).
The link here(https://github.com/ROCm-Developer-Tools/HIP/blob/main/tests/src/hiprtc/saxpy.cpp) shows an example how to program HIP application using runtime compilation mechanism.
## Device-Side Malloc
HIP-Clang currently doesn't supports device-side malloc and free.