Rate this Page

torchao.prototype.quant_logger#

Created On: Mar 25, 2026 | Last Updated On: Mar 25, 2026

Main API#

add_activation_loggers

Wraps nn.Linear weights with ActivationLoggingTensor so that input activations are logged each time F.linear is called.

log_parameter_info

Logs summary statistics for every parameter in the model.

log_tensor

Logs summary statistics for a tensor.

Customizations#

enable_log_stats_to_file

Redefines quant_logger::log_tensor to append summary statistics to a CSV file.

enable_log_tensor_save_tensors_to_disk

Redefines quant_logger::log_tensor to save full tensors to disk.

reset_counter

Resets the global logging counter to zero.