mirror of
https://github.com/termux/termux-packages
synced 2024-06-26 21:37:07 +00:00
a9c646f6b4
python-torch does not build against Python 3.11. python-torchvision depends on python-torch.
13 lines
688 B
Diff
13 lines
688 B
Diff
diff -uNr pytorch-v1.12.1/torch/csrc/init_flatbuffer_module.cpp pytorch-v1.12.1.mod/torch/csrc/init_flatbuffer_module.cpp
|
|
--- pytorch-v1.12.1/torch/csrc/init_flatbuffer_module.cpp 2022-08-06 04:37:12.000000000 +0900
|
|
+++ pytorch-v1.12.1.mod/torch/csrc/init_flatbuffer_module.cpp 2022-09-05 00:27:22.542774737 +0900
|
|
@@ -27,7 +27,7 @@
|
|
std::shared_ptr<char> bytes_copy(
|
|
static_cast<char*>(_aligned_malloc(size, FLATBUFFERS_MAX_ALIGNMENT)),
|
|
_aligned_free);
|
|
-#elif defined(__APPLE__)
|
|
+#elif defined(__APPLE__) || defined(__ANDROID__)
|
|
void* p;
|
|
::posix_memalign(&p, FLATBUFFERS_MAX_ALIGNMENT, size);
|
|
TORCH_INTERNAL_ASSERT(p, "Could not allocate memory for flatbuffer");
|