Files
termux-packages/packages/python-torch/0006-fix-for-format-string.patch
termux-pacman-bot 0934d9e3fe bump(main/python-torch): 2.9.0
- minor rebasing
2025-11-13 07:06:40 +00:00

17 lines
662 B
Diff

Fix 32-bit builds, which otherwise fail with:
python_function.cpp:798:15: error: format specifies type 'long' but the argument has type 'int' [-Werror,-Wformat]
796 | "save_for_backward can only save variables, but argument %ld is of "
--- a/torch/csrc/autograd/python_function.cpp
+++ b/torch/csrc/autograd/python_function.cpp
@@ -798,7 +798,7 @@ static void _get_tensors_to_save(
fmt::format(
"save_for_backward can only save variables, but argument {} is of "
"type {}",
- i,
+ (long) i,
Py_TYPE(obj)->tp_name));
}
}