cuDSS Logging Features#

Logging mechanism in cuDSS can be enabled by setting the following cuDSS-specific environment variables before running the target application. For a complete list of cuDSS environment variables, refer to Environment variables.

CUDSS_LOG_LEVEL=<level>

where level is one of the following levels:

  • 0: Off - logging is disabled (default)

  • 1: Error - only errors will be logged

  • 2: Trace - API calls that launch CUDA kernels will log their parameters and important information

  • 3: Hints - hints that can potentially improve the application’s performance

  • 4: Info - provides general information about the library execution, may contain details about heuristic status

  • 5: API Trace - API calls will log their parameter and important information

CUDSS_LOG_MASK=<mask>

where mask is a combination of the following masks:

  • 0: Off

  • 1: Error

  • 2: Trace

  • 4: Hints

  • 8: Info

  • 16: API Trace

CUDSS_LOG_FILE=<file_name>

where file_name is a path to a logging file. File name may contain %i, that will be replaced with the process id. E.g. <file_name>_%i.log.

If CUDSS_LOG_FILE is not defined, the log messages are printed to stdout.

Note

MGMN Mode: The logging feature works with the MGMN mode, but each process has its own independent logger state and prints logging messages independently.

Multiple processes writing to the same log file concurrently is not safe and may result in corrupted or interleaved output. When using MGMN mode with file logging, users need to set separate log filenames per process.

Logger API Functions#

In addition to the environment variables CUDSS_LOG_LEVEL, CUDSS_LOG_MASK, and CUDSS_LOG_FILE, cuDSS provides experimental Logger API functions for programmatic control over logging behavior. These functions allow to set log levels, configure custom callbacks, and redirect output to files at runtime. When both the environment variables and the Logger API functions are used, the API function calls take precedence and override the settings from environment variables.

For detailed API reference, see:

For callback type definitions, see: