hipDNN backend callback types C API#

2026-03-31

2 min read time

Applies to Linux and Windows

Defines

HIPDNN_CALLBACK_TYPES_DEFINED#

Typedefs

typedef void (*hipdnnCallback_t)(hipdnnSeverity_t severity, const char *message)#

Callback function type used by hipDNN sinks to relay messages to clients.

Param severity:

The severity level of the log message.

Param message:

The log message, formatted by the logger.

typedef void *hipdnnUserLogCallbackHandle_t#

User-defined opaque handle passed to callback and used as unique ID.

The userHandle serves two purposes:

  1. Passed back as parameter to the user callback function

  2. Used as part of the unique identifier for the callback (callback, userHandle)

typedef void (*hipdnnUserLogCallback_t)(hipdnnUserLogCallbackHandle_t userHandle, hipdnnSeverity_t severity, const char *message)#

User callback signature - includes user handle as first parameter.

Note

Callback should return promptly. For blocking operations (network, disk I/O), queue work to a separate thread to avoid impacting hipDNN performance.

Param userHandle:

[in] User-provided context handle

Param severity:

[in] Log message severity level

Param message:

[in] The log message (null-terminated string, includes component name)

Enums

enum hipdnnSeverity_t#

Severity levels for logging in hipDNN.

Values:

enumerator HIPDNN_SEV_INFO#
enumerator HIPDNN_SEV_WARN#
enumerator HIPDNN_SEV_ERROR#
enumerator HIPDNN_SEV_FATAL#
enumerator HIPDNN_SEV_OFF#
enumerator HIPDNN_SEV_INFO
enumerator HIPDNN_SEV_WARN
enumerator HIPDNN_SEV_ERROR
enumerator HIPDNN_SEV_FATAL
enumerator HIPDNN_SEV_OFF