mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-10 11:50:52 +00:00
- Fixes https://github.com/termux/termux-packages/issues/27525 - Fixes https://github.com/termux/termux-packages/issues/25792 - Enable `USE_DISTRIBUTED` and apply patches necessary for it to compile and run properly
29 lines
835 B
Diff
29 lines
835 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;
|
|
--- a/torch/csrc/distributed/c10d/TCPStore.cpp
|
|
+++ b/torch/csrc/distributed/c10d/TCPStore.cpp
|
|
@@ -177,7 +177,11 @@ void TCPClient::setTimeout(std::chrono::milliseconds value) {
|
|
static_cast<long>((value.count() % 1000) * 1000)};
|
|
#else
|
|
struct timeval timeoutTV = {
|
|
+#ifndef __LP64__
|
|
+ .tv_sec = static_cast<time_t>(value.count() / 1000),
|
|
+#else
|
|
.tv_sec = value.count() / 1000,
|
|
+#endif
|
|
.tv_usec = static_cast<suseconds_t>((value.count() % 1000) * 1000),
|
|
};
|
|
#endif
|