Files
termux-packages/x11-packages/python-torch/0004-memalign.patch
termux-pacman-bot 9c67005bc6 bump(main/python-numpy): 2.1.1 and update revdeps
Update to numpy 2, and update reverse dependencies:

- matplotlib from 3.9.1 to 3.9.2
- python-contourpy from 1.2.1 to 1.3.0
- python-numpy from 1.26.5 to 2.1.1
- python-onnxruntime from 1.19.0 to 1.19.2
- python-scipy from 1.14.0 to 1.14.1
- python-torch from 2.1.2 to 2.4.1
- python-torchaudio from 2.0.1 to 2.4.1
- python-torchvision from 0.15.1 to `0.19.1
- Revbump: python-pyarrow, inkscape and opencv

Some of these packages does not currently build before this PR. Getting these updated and buildable is a nice step to prepare for [python 3.12](https://github.com/termux/termux-packages/pull/18078).

Fixes #21059, #21110, #21194 and #21284.

Co-authored-by: Chongyun Lee <45286352+licy183@users.noreply.github.com>
2024-10-04 19:08:43 +00:00

25 lines
1.5 KiB
Diff

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
@@ -722,7 +722,7 @@
std::shared_ptr<char> bytes_copy(
static_cast<char*>(_aligned_malloc(size, kFlatbufferDataAlignmentBytes)),
_aligned_free);
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__ANDROID__)
void* p;
::posix_memalign(&p, kFlatbufferDataAlignmentBytes, size);
TORCH_INTERNAL_ASSERT(p, "Could not allocate memory for flatbuffer");