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

13 lines
675 B
Diff

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");