fulqrum.gpu.configure_gpu_logging¶
- configure_gpu_logging(mode='summary', *, stream=None, rank=0, ranks='primary', formatter=None)[source]¶
Configure GPU log output and return the installed stream handler.
Modes control which records this handler displays:
quiet: warnings and errors only.summary: INFO messages, warnings and errors.detailed: also normal DEBUG messages.trace: also records fromfulqrum.gpu.diagnostics.
Warning and error records bypass rank filtering in every mode. Timing and debug configuration flags are unchanged.
Reconfiguration replaces handlers previously installed by this function. Caller-owned handlers remain attached. The
fulqrum.gpulogger’s level is updated and propagation to parent loggers is disabled; root logger settings remain unchanged.- Parameters:
mode –
quiet,summary(default),detailedortrace.stream – Text stream for output; defaults to stderr.
rank – Fallback rank ID for filtering records without
gpu_rankmetadata; defaults to 0. For MPI, pass this process’s communicator rank.ranks – Routine-output filter:
"primary"selects rank 0 (default),"all"selects every rank, or supply an iterable of rank IDs.formatter – Optional
logging.Formatter. The default prints only the message, without timestamps or level prefixes.
- Returns:
The new
logging.StreamHandlerattached tofulqrum.gpu.- Raises:
ValueError – The mode, rank or rank selection is invalid.