diff --git a/packages/python-torch/0002-fix-macros.patch b/packages/python-torch/0002-fix-macros.patch index 23ea6c4be0..7433ae2fff 100644 --- a/packages/python-torch/0002-fix-macros.patch +++ b/packages/python-torch/0002-fix-macros.patch @@ -1,7 +1,6 @@ -diff -uNr pytorch/c10/macros/Macros.h pytorch.mod/c10/macros/Macros.h ---- pytorch/c10/macros/Macros.h 2022-10-04 19:55:33.000000000 +0900 -+++ pytorch.mod/c10/macros/Macros.h 2022-10-04 23:41:33.513647184 +0900 -@@ -390,7 +390,7 @@ +--- a/torch/headeronly/macros/Macros.h ++++ b/torch/headeronly/macros/Macros.h +@@ -482,7 +482,7 @@ __host__ __device__ #include #endif diff --git a/packages/python-torch/0004-memalign.patch b/packages/python-torch/0004-memalign.patch index 12a8c7d5fa..208832761a 100644 --- a/packages/python-torch/0004-memalign.patch +++ b/packages/python-torch/0004-memalign.patch @@ -1,15 +1,3 @@ -diff -u -r ../cache/tmp-checkout/third_party/pocketfft/pocketfft_hdronly.h ./third_party/pocketfft/pocketfft_hdronly.h ---- ../cache/tmp-checkout/third_party/pocketfft/pocketfft_hdronly.h 2024-10-02 13:08:14.683993465 +0000 -+++ ./third_party/pocketfft/pocketfft_hdronly.h 2024-10-02 13:17:29.799680354 +0000 -@@ -152,7 +152,7 @@ - // the __MINGW32__ part in the conditional below works around the problem that - // the standard C++ library on Windows does not provide aligned_alloc() even - // though the MinGW compiler and MSVC may advertise C++17 compliance. --#if (__cplusplus >= 201703L) && (!defined(__MINGW32__)) && (!defined(_MSC_VER)) -+#if (__cplusplus >= 201703L) && (!defined(__MINGW32__)) && (!defined(_MSC_VER)) && (!defined(__ANDROID__)) - inline void *aligned_alloc(size_t align, size_t size) - { - // aligned_alloc() requires that the requested size is a multiple of "align" diff -u -r ../cache/tmp-checkout/torch/csrc/jit/python/script_init.cpp ./torch/csrc/jit/python/script_init.cpp --- ../cache/tmp-checkout/torch/csrc/jit/python/script_init.cpp 2024-10-02 13:05:35.577599122 +0000 +++ ./torch/csrc/jit/python/script_init.cpp 2024-10-02 13:16:36.541910940 +0000 diff --git a/packages/python-torch/0006-fix-for-format-string.patch b/packages/python-torch/0006-fix-for-format-string.patch index cd2a2462f6..18c1762016 100644 --- a/packages/python-torch/0006-fix-for-format-string.patch +++ b/packages/python-torch/0006-fix-for-format-string.patch @@ -3,15 +3,14 @@ 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 " -diff -u -r ../cache/tmp-checkout/torch/csrc/autograd/python_function.cpp ./torch/csrc/autograd/python_function.cpp ---- ../cache/tmp-checkout/torch/csrc/autograd/python_function.cpp 2024-10-03 18:00:30.204986580 +0000 -+++ ./torch/csrc/autograd/python_function.cpp 2024-10-04 15:06:58.912498321 +0000 -@@ -795,7 +795,7 @@ - throw torch::TypeError( - "save_for_backward can only save variables, but argument %ld is of " - "type %s", -- i, -+ (long) i, - Py_TYPE(obj)->tp_name); +--- 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)); } } diff --git a/packages/python-torch/build.sh b/packages/python-torch/build.sh index d40891ed9f..e64bab0479 100644 --- a/packages/python-torch/build.sh +++ b/packages/python-torch/build.sh @@ -2,8 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://pytorch.org/ TERMUX_PKG_DESCRIPTION="Tensors and Dynamic neural networks in Python" TERMUX_PKG_LICENSE="BSD 3-Clause" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION="2.6.0" -TERMUX_PKG_REVISION=1 +TERMUX_PKG_VERSION="2.9.0" TERMUX_PKG_SRCURL=git+https://github.com/pytorch/pytorch TERMUX_PKG_UPDATE_TAG_TYPE="latest-release-tag" TERMUX_PKG_DEPENDS="abseil-cpp, libc++, libopenblas, libprotobuf, python, python-numpy, python-pip"