0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-05-11 08:35:47 +00:00
Files
termux-packages/packages/python-torch/0008-fix-for-narrowing.patch
Fredrik Fornwall 3e14806ae6 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 15:07:54 +02: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;