diff --git a/docs/how-to/hip_runtime_api/error_handling.rst b/docs/how-to/hip_runtime_api/error_handling.rst index bcfe3f9538..e36403e65f 100644 --- a/docs/how-to/hip_runtime_api/error_handling.rst +++ b/docs/how-to/hip_runtime_api/error_handling.rst @@ -7,8 +7,8 @@ Error handling ******************************************************************************** HIP provides functionality to detect, report, and manage errors that occur during the execution of HIP runtime functions or when launching kernels. Every HIP runtime function, apart from launching kernels, has `hipError_t` as return type. -using functions like :cpp:func:`hipGetErrorString()`, :cpp:func:`hipGetLastError()`, -and :cpp:func:`hipPeekAtLastError()`, and adopting best practices like defining +:cpp:func:`hipGetLastError()` and :cpp:func:`hipPeekAtLastError()` can be used for catching errors from kernel launches, as kernel launches don't return an error directly. HIP maintains an internal state, that includes the last error code. hipGetLastError returns and resets that error to hipSuccess, while hipPeekAtLastError just returns the error without changing it. +To get a human readable version of the errors, :cpp:func:`hipGetErrorString()` and hipGetErrorName() can be used. error-checking macros, developers can ensure their HIP applications are robust, easier to debug, and more reliable. Proper error handling is crucial for identifying issues early in the development process and ensuring that diff --git a/docs/how-to/hip_runtime_api/initialization.rst b/docs/how-to/hip_runtime_api/initialization.rst index b30bdff8f3..ea6de2c961 100644 --- a/docs/how-to/hip_runtime_api/initialization.rst +++ b/docs/how-to/hip_runtime_api/initialization.rst @@ -6,8 +6,8 @@ Initialization ******************************************************************************** -Initialization involves setting up the environment and resources needed for GPU -computation. The following steps are covered with the initialization: +The initialization involves setting up the environment and resources needed for +using GPUs. The following steps are covered with the initialization: - Setting up the HIP runtime @@ -47,7 +47,6 @@ initialization example code: Include the HIP runtime header in your source file, if you want access HIP functions. -The initialization includes the following steps: Querying and setting GPUs ================================================================================