This document describes the environment variables and runtime configuration options for hipDNN.
hipDNN provides two environment variables to control logging behavior:
Sets the minimum severity that will be emitted. Levels are inclusive: choosing a level enables messages at that level and all higher severities.
| Level | Description |
|---|---|
off |
Disables all logging (default) |
info |
General informational messages |
warn |
Potential issues that do not interrupt execution |
error |
Recoverable errors that may affect results or performance |
fatal |
Unrecoverable errors; the operation will not continue |
Example:
export HIPDNN_LOG_LEVEL=infoSpecifies the file path where logs will be appended. If not set, logs are written to stderr.
Example:
export HIPDNN_LOG_FILE=/path/to/hipdnn.logThe frontend and plugins can be configured to use the same logging destination as the backend, which is lazy-initialized automatically:
- Initialize logging using the
initializeCallbackLoggingfunction - Pass
hipdnnLoggingCallback_extas the callback function (accessible via plugin API or backend header) - This ensures all components log to the same destination
Tip
💡 When using the MIOpen legacy plugin, you can use MIOpen-specific environment variables to control the underlying library's logging behavior.
For more details about MIOpen logging, see the latest MIOpen Debug and Logging documentation. All MIOpen environment variables remain compatible with hipDNN's MIOpen legacy plugin.
hipDNN provides functions for retrieving error information:
// Convert status code to string
const char* error_str = hipdnnGetErrorString(status);
// Get detailed error message for the current thread
char message[HIPDNN_ERROR_STRING_MAX_LENGTH];
hipdnnGetLastErrorString(message, sizeof(message));- Check return status codes from all hipDNN API calls
- Use
hipdnnGetLastErrorStringfor detailed error context - Enable appropriate logging levels during development and debugging
- Configure logging to files for production deployments