SWDEV-420314 - document inconsistent behavior of abort(trap) on HIP vs CUDA

Change-Id: I6e02318d0b7bfeeed771b6519430a94c0cdb2bb0
This commit is contained in:
jujiang
2024-02-05 15:19:37 -05:00
parent e2dcda002d
commit dc8e9b11c8
+7 -1
View File
@@ -418,7 +418,7 @@ Following is the list of supported floating-point intrinsics. Note that intrinsi
| double __dsqrt_rn ( double x ) <br><sub>Compute `√x` in round-to-nearest-even mode.</sub> |
## Texture Functions
The supported Texture functions are listed in header files "texture_fetch_functions.h"(https://github.com/ROCm-Developer-Tools/HIP/blob/main/include/hip/amd_detail/texture_fetch_functions.h) and"texture_indirect_functions.h" (https://github.com/ROCm-Developer-Tools/HIP/blob/main/include/hip/amd_detail/texture_indirect_functions.h).
The supported Texture functions are listed in header files "texture_fetch_functions.h" and "texture_indirect_functions.h" in [HIP-AMD backend repository](https://github.com/ROCm/clr/blob/develop/hipamd/include/hip/amd_detail).
Texture functions are not supported on some devices.
Macro __HIP_NO_IMAGE_SUPPORT == 1 can be used to check whether texture functions are not supported in device code.
@@ -679,6 +679,12 @@ There are two kinds of implementations for assert functions depending on the use
- Another is the device version of assert, which is implemented in hip/hip_runtime.h.
Users need to include assert.h to use assert. For assert to work in both device and host functions, users need to include "hip/hip_runtime.h".
HIP provides the function abort() which can be used to terminate the application when terminal failures are detected. It is implemented using the `__builtin_trap()` function.
This function produces the effects of using `asm("trap")` in the CUDA code.
Note, in HIP, the function terminates the entire application, while in CUDA, `asm("trap")`only terminates the dispatch and the application continues to run.
## Printf
Printf function is supported in HIP.