Files
termux-packages/packages/python-torch/0008-fix-for-narrowing.patch
termux-pacman-bot cef74b4e03 chore(main/python-{torch,torchaudio,torchvision}) Move to main
Move pytorch from x11 to main after removal of opencv dependencies
in #21764.
2024-10-12 13:10:02 +00:00

15 lines
340 B
Diff

--- a/torch/csrc/jit/python/python_list.cpp.orig
+++ b/torch/csrc/jit/python/python_list.cpp
@@ -28,7 +28,11 @@
namespace {
py::list scriptListToPyList(const ScriptList& src) {
+#ifndef __LP64__
+ py::list out(static_cast<ptrdiff_t>(src.len()));
+#else
py::list out(src.len());
+#endif
auto iter = src.iter();
size_t i = 0;