Rate this Page

Debugging Environment Variables#

Created On: Feb 15, 2024 | Last Updated On: Jun 06, 2025

Variable

Description

TORCH_SHOW_CPP_STACKTRACES

If set to1, makes PyTorch print out a stack trace when it detects a C++ error.

TORCH_CPP_LOG_LEVEL

Set the log level of c10 logging facility (supports both GLOG and c10 loggers). Valid values areINFO,WARNING,ERROR, andFATAL or their numerical equivalents0,1,2, and3.

TORCH_LOGS

For a more in depth explanation of this environment variable, seetorch._logging.