Skip to main content
`Ctrl`+`K`

# Debugging rocSPARSE functions

This module contains all routines useful for debugging rocSPARSE programs.

## rocsparse_enable_debug_kernel_launch()

void rocsparse_enable_debug_kernel_launch()

  Enable debug kernel launch.

  If the debug kernel launch is enabled then hip errors are checked before and after every kernel launch.

  Note

  This routine ignores the environment variable ROCSPARSE_DEBUG_KERNEL_LAUNCH.

## rocsparse_disable_debug_kernel_launch()

void rocsparse_disable_debug_kernel_launch()

  Disable debug kernel launch.

  Note

  This routine ignores the environment variable ROCSPARSE_DEBUG_KERNEL_LAUNCH.

## rocsparse_state_debug_kernel_launch()

int rocsparse_state_debug_kernel_launch()

  Query whether debugging kernel launch has been enabled. See rocsparse_enable_debug_kernel_launch.

  Returns:

    1 if enabled, 0 otherwise.

## rocsparse_enable_debug_arguments()

void rocsparse_enable_debug_arguments()

  Enable debug arguments.

  If the debug arguments is enabled then messages are displayed when errors occur during argument checking. It provide information to the user depending of the setup of the verbosity rocsparse_enable_debug_arguments_verbose, rocsparse_disable_debug_arguments_verbose and rocsparse_state_debug_arguments_verbose.

  Note

  This routine ignores the environment variable ROCSPARSE_DEBUG_ARGUMENTS.

  Note

  This routine enables debug arguments verbose with rocsparse_enable_debug_arguments_verbose.

## rocsparse_disable_debug_arguments()

void rocsparse_disable_debug_arguments()

  Disable debug arguments.

  Note

  This routine ignores the environment variable ROCSPARSE_DEBUG_ARGUMENTS.

  Note

  This routines disables debug arguments verbose.

## rocsparse_state_debug_arguments()

int rocsparse_state_debug_arguments()

  Query whether debugging arguments has been enabled. See rocsparse_enable_debug_arguments.

  Returns:

    1 if enabled, 0 otherwise.

## rocsparse_enable_debug_arguments_verbose()

void rocsparse_enable_debug_arguments_verbose()

  Enable debug arguments verbose.

  If the debug arguments (verbose) is enabled then messages are displayed when errors occur during argument checking. It provide information to the user depending of the setup of the verbosity

  Note

  This routine ignores the environment variable ROCSPARSE_DEBUG_ARGUMENTS_VERBOSE)

## rocsparse_disable_debug_arguments_verbose()

void rocsparse_disable_debug_arguments_verbose()

  Disable debug arguments verbose.

  Note

  This routine ignores the environment variable ROCSPARSE_DEBUG_ARGUMENTS_VERBOSE)

## rocsparse_state_debug_arguments_verbose()

int rocsparse_state_debug_arguments_verbose()

  Query whether debugging arguments (verbose) has been enabled. See rocsparse_enable_debug_arguments_verbose.

  Returns:

    1 if enabled, 0 otherwise.

## rocsparse_enable_debug()

void rocsparse_enable_debug()

  Enable debug.

  If the debug is enabled then code traces are generated when unsuccessful status returns occur. It provides information to the user depending of the set of the verbosity (rocsparse_enable_debug_verbose, rocsparse_disable_debug_verbose and rocsparse_state_debug_verbose).

  Note

  This routine ignores the environment variable ROCSPARSE_DEBUG.

  Note

  rocsparse_enable_debug_verbose and rocsparse_enable_debug_arguments are called.

## rocsparse_disable_debug()

void rocsparse_disable_debug()

  Disable debug.

  Note

  This routine also disables debug arguments with rocsparse_disable_debug_arguments.

  Note

  This routine ignores the environment variable ROCSPARSE_DEBUG.

## rocsparse_state_debug()

int rocsparse_state_debug()

  Query whether debug has been enabled. See rocsparse_enable_debug.

  Returns:

    1 if enabled, 0 otherwise.

## rocsparse_enable_debug_warnings()

void rocsparse_enable_debug_warnings()

  Enable debug warnings.

  If the debug warnings are enabled, then some specific warnings could be printed during the execution.

  Note

  This routine ignores the environment variable ROCSPARSE_DEBUG_WARNINGS.

## rocsparse_disable_debug_warnings()

void rocsparse_disable_debug_warnings()

  Disable debug warnings.

  Note

  This routine ignores the environment variable ROCSPARSE_DEBUG_WARNINGS.

## rocsparse_enable_debug_verbose()

void rocsparse_enable_debug_verbose()

  Enable debug verbose.

  The debug verbose displays a stack of code traces showing where the code is handling a unsuccessful status.

  Note

  This routine enables debug arguments verbose with rocsparse_enable_debug_arguments_verbose.

  Note

  This routine ignores the environment variable ROCSPARSE_DEBUG_VERBOSE.

## rocsparse_disable_debug_verbose()

void rocsparse_disable_debug_verbose()

  Disable debug verbose.

  Note

  This routine disables debug arguments verbose with rocsparse_disable_debug_arguments.

  Note

  This routine ignores the environment variable ROCSPARSE_DEBUG_VERBOSE.

## rocsparse_state_debug_verbose()

int rocsparse_state_debug_verbose()

  Query whether debug (verbose) has been enabled. See rocsparse_enable_debug_verbose.

  Returns:

    1 if enabled, 0 otherwise.

## rocsparse_enable_debug_force_host_assert()

void rocsparse_enable_debug_force_host_assert()

  Enable debug force host assert.

  The debug force host assert forces the evaluation of assert on host when the compiler directive NDEBUG is used.

## rocsparse_disable_debug_force_host_assert()

void rocsparse_disable_debug_force_host_assert()

  Disable debug force host assert.

## rocsparse_state_debug_force_host_assert()

int rocsparse_state_debug_force_host_assert()

  Query whether debug force host assert has been enabled. See rocsparse_enable_debug_force_host_assert.

  Returns:

    1 if enabled, 0 otherwise.