Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: MKKnorr <[email protected]>
  • Loading branch information
neon60 and MKKnorr authored Oct 10, 2024
1 parent 2193ebc commit fcabc3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/how-to/hip_runtime_api/error_handling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions docs/how-to/hip_runtime_api/initialization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
================================================================================
Expand Down

0 comments on commit fcabc3f

Please sign in to comment.