add new line in log (#164240)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/164240
Approved by: https://github.com/ColinPeppler, https://github.com/Skylion007, https://github.com/ezyang
ghstack dependencies: #164075
This commit is contained in:
Laith Sakka 2025-09-30 07:21:44 -07:00 committed by PyTorch MergeBot
parent 5cdbcb5233
commit 14102fb1f3

View File

@ -6612,13 +6612,13 @@ class ShapeEnv:
desc = "Could not guard on data-dependent expression" desc = "Could not guard on data-dependent expression"
size_oblivious_result_msg = ( size_oblivious_result_msg = (
"consider using data-dependent friendly APIs such as " "consider using data-dependent friendly APIs such as "
"guard_or_false, guard_or_true and statically_known_true" "guard_or_false, guard_or_true and statically_known_true."
) )
msg = ( msg = (
f"{desc} {expr} (unhinted: {unhinted_expr}). " f"{desc} {expr} (unhinted: {unhinted_expr}). "
f"(Size-like symbols: {', '.join(map(str, size_like_symbols)) or 'none'})\n\n" f"(Size-like symbols: {', '.join(map(str, size_like_symbols)) or 'none'})\n\n"
f"{size_oblivious_result_msg}" f"{size_oblivious_result_msg}\n"
f"Caused by: {sloc}\n" f"Caused by: {sloc}\n"
'For more information, run with TORCH_LOGS="dynamic"\n' 'For more information, run with TORCH_LOGS="dynamic"\n'
"For extended logs when we create symbols, also add " "For extended logs when we create symbols, also add "