rocsparse_handle_create Interface Reference#
hipfort_rocsparse::rocsparse_handle_create Interface Reference
Create a rocSPARSE handle on a user-defined stream. More...
Public Member Functions | |
| integer(kind(rocsparse_status_success)) function | rocsparse_handle_create_ (handle, stream, p_error) |
Detailed Description
Create a rocSPARSE handle on a user-defined stream.
rocsparse_handle_create associates the handle with the user-provided stream before performing any setup work. All device memory allocation and initialization are enqueued on stream using stream-ordered operations, so handle creation is asynchronous with respect to the host: it returns to the caller without blocking the calling CPU thread or any GPU stream.
- Note
- This routine is not compatible with HIP graph stream capture. It performs stream-ordered device allocations and a warm-up kernel launch, so it must not be called while
stream(or any other stream) is being captured into a HIP graph. -
The handle is fully initialized for operations submitted on
stream(stream ordering guarantees correctness). If the handle must be used on a different stream beforestreamhas finished executing, the caller must first synchronizestream(e.g. viahipStreamSynchronizeor a HIP event dependency).
The handle should be destroyed at the end using rocsparse_handle_destroy or rocsparse_destroy_handle.
- Parameters
-
[out] handle - the pointer to the handle to the rocSPARSE library context. [in] stream - the user-defined stream to associate with the handle and to use for all stream-ordered setup work during creation. [out] p_error - error descriptor created if the returned status is not rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.
- Return values
-
rocsparse_status_success the initialization succeeded. rocsparse_status_invalid_pointer handlepointer is invalid.rocsparse_status_internal_error an internal error occurred.
Member Function/Subroutine Documentation
◆ rocsparse_handle_create_()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_handle_create::rocsparse_handle_create_ | ( | type(c_ptr) | handle, |
| type(c_ptr), value | stream, | ||
| type(c_ptr) | p_error | ||
| ) |
The documentation for this interface was generated from the following file: