pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/math/py-torch
Module Name: pkgsrc
Committed By: ryoon
Date: Thu Jan 23 14:31:16 UTC 2025
Modified Files:
pkgsrc/math/py-torch: Makefile PLIST distinfo
Added Files:
pkgsrc/math/py-torch/patches:
patch-third__party_tensorpipe_tensorpipe_common_system.cc
patch-torch_csrc_distributed_c10d_ProcessGroupGloo.cpp
patch-torch_csrc_distributed_c10d_socket.cpp
Log Message:
math/py-torch: Enable distributed API
* Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/math/py-torch/Makefile \
pkgsrc/math/py-torch/PLIST pkgsrc/math/py-torch/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/math/py-torch/patches/patch-third__party_tensorpipe_tensorpipe_common_system.cc \
pkgsrc/math/py-torch/patches/patch-torch_csrc_distributed_c10d_ProcessGroupGloo.cpp \
pkgsrc/math/py-torch/patches/patch-torch_csrc_distributed_c10d_socket.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/math/py-torch/Makefile
diff -u pkgsrc/math/py-torch/Makefile:1.1 pkgsrc/math/py-torch/Makefile:1.2
--- pkgsrc/math/py-torch/Makefile:1.1 Tue Jan 21 13:36:49 2025
+++ pkgsrc/math/py-torch/Makefile Thu Jan 23 14:31:16 2025
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1 2025/01/21 13:36:49 ryoon Exp $
+# $NetBSD: Makefile,v 1.2 2025/01/23 14:31:16 ryoon Exp $
DISTNAME= pytorch-v2.5.1
PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S,pytorch-v,torch-,}
+PKGREVISION= 1
CATEGORIES= math
MASTER_SITES= ${MASTER_SITE_GITHUB:=pytorch/}
GITHUB_PROJECT= pytorch
@@ -62,6 +63,7 @@ MAKE_ENV+= USE_MKLDNN=0
MAKE_ENV+= BUILD_TEST=0
MAKE_ENV+= USE_CUDNN=0
MAKE_ENV+= USE_QNNPACK=0
+MAKE_ENV+= USE_DISTRIBUTED=1
post-extract:
# For mkpatches(1) and developers only.
Index: pkgsrc/math/py-torch/PLIST
diff -u pkgsrc/math/py-torch/PLIST:1.1 pkgsrc/math/py-torch/PLIST:1.2
--- pkgsrc/math/py-torch/PLIST:1.1 Tue Jan 21 13:36:49 2025
+++ pkgsrc/math/py-torch/PLIST Thu Jan 23 14:31:16 2025
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2025/01/21 13:36:49 ryoon Exp $
+@comment $NetBSD: PLIST,v 1.2 2025/01/23 14:31:16 ryoon Exp $
bin/convert-caffe2-to-onnx
bin/convert-onnx-to-caffe2
bin/torch_shm_manager
@@ -20386,6 +20386,28 @@ ${PYSITELIB}/torch/include/pybind11/stl_
${PYSITELIB}/torch/include/pybind11/type_caster_pyobject_ptr.h
${PYSITELIB}/torch/include/pybind11/typing.h
${PYSITELIB}/torch/include/sleef.h
+${PYSITELIB}/torch/include/tensorpipe/channel/basic/factory.h
+${PYSITELIB}/torch/include/tensorpipe/channel/context.h
+${PYSITELIB}/torch/include/tensorpipe/channel/error.h
+${PYSITELIB}/torch/include/tensorpipe/channel/mpt/factory.h
+${PYSITELIB}/torch/include/tensorpipe/channel/xth/factory.h
+${PYSITELIB}/torch/include/tensorpipe/common/buffer.h
+${PYSITELIB}/torch/include/tensorpipe/common/cpu_buffer.h
+${PYSITELIB}/torch/include/tensorpipe/common/device.h
+${PYSITELIB}/torch/include/tensorpipe/common/error.h
+${PYSITELIB}/torch/include/tensorpipe/common/optional.h
+${PYSITELIB}/torch/include/tensorpipe/config.h
+${PYSITELIB}/torch/include/tensorpipe/core/context.h
+${PYSITELIB}/torch/include/tensorpipe/core/error.h
+${PYSITELIB}/torch/include/tensorpipe/core/listener.h
+${PYSITELIB}/torch/include/tensorpipe/core/message.h
+${PYSITELIB}/torch/include/tensorpipe/core/pipe.h
+${PYSITELIB}/torch/include/tensorpipe/tensorpipe.h
+${PYSITELIB}/torch/include/tensorpipe/transport/context.h
+${PYSITELIB}/torch/include/tensorpipe/transport/error.h
+${PYSITELIB}/torch/include/tensorpipe/transport/uv/error.h
+${PYSITELIB}/torch/include/tensorpipe/transport/uv/factory.h
+${PYSITELIB}/torch/include/tensorpipe/transport/uv/utility.h
${PYSITELIB}/torch/include/torch/csrc/CudaIPCTypes.h
${PYSITELIB}/torch/include/torch/csrc/DataLoader.h
${PYSITELIB}/torch/include/torch/csrc/Device.h
@@ -22475,6 +22497,8 @@ ${PYSITELIB}/torch/share/cmake/Caffe2/pu
${PYSITELIB}/torch/share/cmake/Caffe2/public/protobuf.cmake
${PYSITELIB}/torch/share/cmake/Caffe2/public/utils.cmake
${PYSITELIB}/torch/share/cmake/Caffe2/public/xpu.cmake
+${PYSITELIB}/torch/share/cmake/Tensorpipe/TensorpipeTargets-release.cmake
+${PYSITELIB}/torch/share/cmake/Tensorpipe/TensorpipeTargets.cmake
${PYSITELIB}/torch/share/cmake/Torch/TorchConfig.cmake
${PYSITELIB}/torch/share/cmake/Torch/TorchConfigVersion.cmake
${PYSITELIB}/torch/signal/__init__.py
@@ -23625,20 +23649,3 @@ share/cmake/kineto/kinetoLibraryConfig.c
share/cpuinfo/cpuinfo-config.cmake
share/cpuinfo/cpuinfo-targets-release.cmake
share/cpuinfo/cpuinfo-targets.cmake
-@pkgdir include/torch/csrc/jit/tensorexpr/scripts
-@pkgdir include/torch/csrc/jit/docs
-@pkgdir include/torch/csrc/jit/backends/nnapi
-@pkgdir include/torch/csrc/deploy
-@pkgdir include/torch/csrc/cuda/shared
-@pkgdir include/torch/csrc/autograd/generated/templates
-@pkgdir include/torch/csrc/api/src/serialize
-@pkgdir include/torch/csrc/api/src/python
-@pkgdir include/torch/csrc/api/src/optim/schedulers
-@pkgdir include/torch/csrc/api/src/nn/options
-@pkgdir include/torch/csrc/api/src/nn/modules/container
-@pkgdir include/torch/csrc/api/src/data/samplers
-@pkgdir include/torch/csrc/api/src/data/datasets
-@pkgdir include/c10/test/core/impl
-@pkgdir include/c10/hip
-@pkgdir include/c10/cuda/test/impl
-@pkgdir include/c10/benchmark
Index: pkgsrc/math/py-torch/distinfo
diff -u pkgsrc/math/py-torch/distinfo:1.1 pkgsrc/math/py-torch/distinfo:1.2
--- pkgsrc/math/py-torch/distinfo:1.1 Tue Jan 21 13:36:49 2025
+++ pkgsrc/math/py-torch/distinfo Thu Jan 23 14:31:16 2025
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2025/01/21 13:36:49 ryoon Exp $
+$NetBSD: distinfo,v 1.2 2025/01/23 14:31:16 ryoon Exp $
BLAKE2s (pytorch-v2.5.1.tar.gz) = 299bbffbdde5673d420cf21f08c3bcc518b233e63a19231e6a631980849bd8b9
SHA512 (pytorch-v2.5.1.tar.gz) = a8882608c2ab6467a58d60c6df84c9f1004b43eafeba57db499dbbfdecc09db2e221b9d4c344c8af7c0bea6252e874c400483502dca24a0b474c376b9fef1dd4
@@ -17,4 +17,7 @@ SHA1 (patch-third__party_cpuinfo_src_x86
SHA1 (patch-third__party_fbgemm_third__party_cpuinfo_src_init.c) = 0bb63c242f06cb189a24c4dbfad77bdc59d6b092
SHA1 (patch-third__party_kineto_libkineto_src_ThreadUtil.cpp) = cb6462eea995445c8f65592bf427605e781000f9
SHA1 (patch-third__party_protobuf_post__process__dist.sh) = b27d6497f8649491441ef3a2bfc9eb5fa22ba474
+SHA1 (patch-third__party_tensorpipe_tensorpipe_common_system.cc) = 6f714d89681c245d531809fbf64b2b9c77fce84d
+SHA1 (patch-torch_csrc_distributed_c10d_ProcessGroupGloo.cpp) = 3c3e96f4ff9fca29b9aca65ba3dab4d87782e682
+SHA1 (patch-torch_csrc_distributed_c10d_socket.cpp) = cace5d33d59bb8fec1933e74223049e5d63aa0a9
SHA1 (patch-torch_csrc_utils_byte__order.h) = 089495773fbd7e7340dbd7545341c56d2f4de9b3
Added files:
Index: pkgsrc/math/py-torch/patches/patch-third__party_tensorpipe_tensorpipe_common_system.cc
diff -u /dev/null pkgsrc/math/py-torch/patches/patch-third__party_tensorpipe_tensorpipe_common_system.cc:1.1
--- /dev/null Thu Jan 23 14:31:16 2025
+++ pkgsrc/math/py-torch/patches/patch-third__party_tensorpipe_tensorpipe_common_system.cc Thu Jan 23 14:31:16 2025
@@ -0,0 +1,18 @@
+$NetBSD: patch-third__party_tensorpipe_tensorpipe_common_system.cc,v 1.1 2025/01/23 14:31:16 ryoon Exp $
+
+* Retern fake boot ID under NetBSD.
+
+--- third_party/tensorpipe/tensorpipe/common/system.cc.orig 2025-01-21 15:51:15.145360508 +0000
++++ third_party/tensorpipe/tensorpipe/common/system.cc
+@@ -101,7 +101,10 @@ std::string getPathForLinuxNamespace(Lin
+ }
+ return oss.str();
+ }
+-
++#elif defined(__NetBSD__)
++optional<std::string> getBootIDInternal() {
++ return std::string("00000000-0000-0000-0000-000000000000");
++}
+ #endif
+
+ } // namespace
Index: pkgsrc/math/py-torch/patches/patch-torch_csrc_distributed_c10d_ProcessGroupGloo.cpp
diff -u /dev/null pkgsrc/math/py-torch/patches/patch-torch_csrc_distributed_c10d_ProcessGroupGloo.cpp:1.1
--- /dev/null Thu Jan 23 14:31:16 2025
+++ pkgsrc/math/py-torch/patches/patch-torch_csrc_distributed_c10d_ProcessGroupGloo.cpp Thu Jan 23 14:31:16 2025
@@ -0,0 +1,26 @@
+$NetBSD: patch-torch_csrc_distributed_c10d_ProcessGroupGloo.cpp,v 1.1 2025/01/23 14:31:16 ryoon Exp $
+
+* Support NetBSD.
+
+--- /usr/tmp/pkgsrc/math/py-torch/work/pytorch-v2.5.1/torch/csrc/distributed/c10d/ProcessGroupGloo.cpp.orig 2025-01-21 17:59:06.880466509 +0000
++++ /usr/tmp/pkgsrc/math/py-torch/work/pytorch-v2.5.1/torch/csrc/distributed/c10d/ProcessGroupGloo.cpp
+@@ -16,6 +16,10 @@
+ #include <netdb.h>
+ #include <sys/socket.h>
+ #include <unistd.h>
++#if !defined(HOST_NAME_MAX)
++#include <limits.h>
++#define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
++#endif
+ #endif
+ #include <sys/types.h>
+
+@@ -693,7 +697,7 @@ std::shared_ptr<::gloo::transport::Devic
+ return ::c10d::GlooDeviceFactory::makeDeviceForHostname(hostname);
+ }
+
+-#if defined(__linux__) || defined(_WIN32)
++#if defined(__linux__) || defined(_WIN32) || defined(__NetBSD__)
+ std::shared_ptr<::gloo::transport::Device> ProcessGroupGloo::
+ createDefaultDevice() {
+ // Use the hostname to resolve the network address to
Index: pkgsrc/math/py-torch/patches/patch-torch_csrc_distributed_c10d_socket.cpp
diff -u /dev/null pkgsrc/math/py-torch/patches/patch-torch_csrc_distributed_c10d_socket.cpp:1.1
--- /dev/null Thu Jan 23 14:31:16 2025
+++ pkgsrc/math/py-torch/patches/patch-torch_csrc_distributed_c10d_socket.cpp Thu Jan 23 14:31:16 2025
@@ -0,0 +1,20 @@
+$NetBSD: patch-torch_csrc_distributed_c10d_socket.cpp,v 1.1 2025/01/23 14:31:16 ryoon Exp $
+
+* NetBSD has no AI_V4MAPPED and AI_ALL.
+
+--- torch/csrc/distributed/c10d/socket.cpp.orig 2025-01-21 16:40:38.577733771 +0000
++++ torch/csrc/distributed/c10d/socket.cpp
+@@ -809,6 +809,13 @@ std::unique_ptr<SocketImpl> SocketConnec
+ SocketError, fmt::format("{} {}", msg, fmt::join(errors_, " ")));
+ }
+
++#if !defined(AI_V4MAPPED)
++#define AI_V4MAPPED 0x00000000
++#endif
++#if !defined(AI_ALL)
++#define AI_ALL 0x00000000
++#endif
++
+ bool SocketConnectOp::tryConnect(int family) {
+ ::addrinfo hints{};
+ hints.ai_flags = AI_V4MAPPED | AI_ALL | AI_NUMERICSERV;
Home |
Main Index |
Thread Index |
Old Index