SWDEV-288929 - Add hiprtc support in programming guide

Change-Id: I22d69801bbb36b610c855657a7248c24b9981b80


[ROCm/hip commit: 3f503283e1]
This commit is contained in:
Julia Jiang
2021-06-14 19:19:30 -04:00
committed by Julia Jiang
parent 26f834670a
commit afd774c477
2 changed files with 12 additions and 3 deletions
@@ -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.