1.. _torch_environment_variables: 2 3Torch Environment Variables 4=============================== 5 6PyTorch leverages environment variables for adjusting various settings that influence its runtime behavior. 7These variables offer control over key functionalities, such as displaying the C++ stack trace upon encountering errors, synchronizing the execution of CUDA kernels, 8specifying the number of threads for parallel processing tasks and many more. 9 10Moreover, PyTorch leverages several high-performance libraries, such as MKL and cuDNN, 11which also utilize environment variables to modify their functionality. 12This interplay of settings allows for a highly customizable development environment that can be 13optimized for efficiency, debugging, and computational resource management. 14 15Please note that while this documentation covers a broad spectrum of environment variables relevant to PyTorch and its associated libraries, it is not exhaustive. 16If you find anything in this documentation that is missing, incorrect, or could be improved, please let us know by filing an issue or opening a pull request. 17 18 19.. toctree:: 20 :maxdepth: 1 21 22 threading_environment_variables 23 cuda_environment_variables 24 mps_environment_variables 25 debugging_environment_variables 26 miscellaneous_environment_variables 27 logging 28 torch_nccl_environment_variables 29