git: 7a13465225ad - main - misc/py-pytorch: update 2.4.1 → 2.5.1
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 18 Dec 2024 11:12:12 UTC
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=7a13465225ad7ea53f061b6cf79e4bfcd1112d78 commit 7a13465225ad7ea53f061b6cf79e4bfcd1112d78 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2024-12-18 11:11:15 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2024-12-18 11:12:01 +0000 misc/py-pytorch: update 2.4.1 → 2.5.1 --- misc/py-pytorch/Makefile | 5 ++-- misc/py-pytorch/distinfo | 10 +++---- misc/py-pytorch/files/patch-CMakeLists.txt | 10 +++---- misc/py-pytorch/files/patch-caffe2_CMakeLists.txt | 28 ------------------ .../patch-third__party_cpuinfo_CMakeLists.txt | 34 +++++++++++----------- 5 files changed, 29 insertions(+), 58 deletions(-) diff --git a/misc/py-pytorch/Makefile b/misc/py-pytorch/Makefile index cd0526f193f0..4ebe7c603a99 100644 --- a/misc/py-pytorch/Makefile +++ b/misc/py-pytorch/Makefile @@ -1,7 +1,6 @@ PORTNAME= pytorch DISTVERSIONPREFIX= v -DISTVERSION= 2.4.1 -PORTREVISION= 2 +DISTVERSION= 2.5.1 CATEGORIES= misc # machine-learning MASTER_SITES= https://github.com/pytorch/pytorch/releases/download/v${DISTVERSION}/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -45,7 +44,7 @@ USES= compiler:c++17-lang localbase:ldflags python USE_PYTHON= distutils autoplist USE_GITHUB= nodefault -GH_TUPLE= pytorch:cpuinfo:3a3b76bc8845d0f4a2ea3108e256313458c5de03:cpuinfo/cpuinfo-with-freebsd-support # https://github.com/pytorch/cpuinfo/pull/230/commits +GH_TUPLE= pytorch:cpuinfo:1e83a2f:cpuinfo/cpuinfo-with-freebsd-support # https://github.com/pytorch/cpuinfo/pull/230/commits MAKE_ENV= USE_NINJA=no # ninja breaks for some reason MAKE_ENV+= BUILD_TEST=0 # ninja breaks for some reason diff --git a/misc/py-pytorch/distinfo b/misc/py-pytorch/distinfo index c011a12dc0fa..4b1c5737b490 100644 --- a/misc/py-pytorch/distinfo +++ b/misc/py-pytorch/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1728092741 -SHA256 (pytorch/pytorch-v2.4.1.tar.gz) = 39666a43c0c10f5fd46c1a7ca95dc74d3bc39de2678b70066481cbf02e58384f -SIZE (pytorch/pytorch-v2.4.1.tar.gz) = 296932555 -SHA256 (pytorch/pytorch-cpuinfo-3a3b76bc8845d0f4a2ea3108e256313458c5de03_GH0.tar.gz) = 658acaf67573484abc7a093066d3766f9a3b94aff5b77e0f4e9c72cee5ebaa4a -SIZE (pytorch/pytorch-cpuinfo-3a3b76bc8845d0f4a2ea3108e256313458c5de03_GH0.tar.gz) = 3534893 +TIMESTAMP = 1734497159 +SHA256 (pytorch/pytorch-v2.5.1.tar.gz) = 740eb5fff95e33cfe699bad43be83523f569c7cc7f9c285c2a255416443dd266 +SIZE (pytorch/pytorch-v2.5.1.tar.gz) = 298929057 +SHA256 (pytorch/pytorch-cpuinfo-1e83a2f_GH0.tar.gz) = b8945cf45d4f13054d7f52e8bd9314690ea840d4d0ff21febd95ff04de3c613e +SIZE (pytorch/pytorch-cpuinfo-1e83a2f_GH0.tar.gz) = 3541839 diff --git a/misc/py-pytorch/files/patch-CMakeLists.txt b/misc/py-pytorch/files/patch-CMakeLists.txt index 968de704b3c4..ea1c77c75a0a 100644 --- a/misc/py-pytorch/files/patch-CMakeLists.txt +++ b/misc/py-pytorch/files/patch-CMakeLists.txt @@ -1,4 +1,4 @@ ---- CMakeLists.txt.orig 2024-07-24 18:41:35 UTC +--- CMakeLists.txt.orig 2024-10-29 18:00:43 UTC +++ CMakeLists.txt @@ -181,7 +181,7 @@ set(CPU_INTEL OFF) set(CPU_AARCH64 OFF) @@ -9,16 +9,16 @@ set(CPU_INTEL ON) elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)") set(CPU_AARCH64 ON) -@@ -210,7 +210,7 @@ option(BUILD_CUSTOM_PROTOBUF +@@ -209,7 +209,7 @@ option(BUILD_CUSTOM_PROTOBUF + option(ATEN_NO_TEST "Do not build ATen test binaries" OFF) option(BUILD_BINARY "Build C++ binaries" OFF) - option(BUILD_DOCS "Build Caffe2 documentation" OFF) option(BUILD_CUSTOM_PROTOBUF - "Build and use Caffe2's own protobuf under third_party" ON) + "Build and use Caffe2's own protobuf under third_party" OFF) option(BUILD_PYTHON "Build Python binaries" ON) option(BUILD_LITE_INTERPRETER "Master flag to build Lite Interpreter" OFF) option(BUILD_SHARED_LIBS "Build libcaffe2.so" ON) -@@ -258,7 +258,7 @@ option(USE_GLOG "Use GLOG" OFF) +@@ -267,7 +267,7 @@ option(USE_GLOG "Use GLOG" OFF) option(USE_FAKELOWP "Use FakeLowp operators" OFF) option(USE_GFLAGS "Use GFLAGS" OFF) option(USE_GLOG "Use GLOG" OFF) @@ -27,7 +27,7 @@ option(USE_MAGMA "Use MAGMA" ON) option(USE_PYTORCH_METAL "Use Metal for PyTorch iOS build" OFF) option(USE_PYTORCH_METAL_EXPORT "Export Metal models on MacOSX desktop" OFF) -@@ -451,15 +451,15 @@ option(USE_SYSTEM_CPUINFO "Use system-provided cpuinfo +@@ -460,15 +460,15 @@ option(USE_SYSTEM_CPUINFO "Use system-provided cpuinfo # USE_SYSTEM_LIBS being "OFF". option(USE_SYSTEM_LIBS "Use all available system-provided libraries." OFF) option(USE_SYSTEM_CPUINFO "Use system-provided cpuinfo." OFF) diff --git a/misc/py-pytorch/files/patch-caffe2_CMakeLists.txt b/misc/py-pytorch/files/patch-caffe2_CMakeLists.txt deleted file mode 100644 index 21b4acf07bc2..000000000000 --- a/misc/py-pytorch/files/patch-caffe2_CMakeLists.txt +++ /dev/null @@ -1,28 +0,0 @@ -- fix regression in python install path in 2.4.0 - ---- caffe2/CMakeLists.txt.orig 2024-07-24 18:41:35 UTC -+++ caffe2/CMakeLists.txt -@@ -1897,8 +1897,22 @@ if(BUILD_PYTHON) - # only rerun when needed. - - if(BUILD_PYTHON) -+ # Python site-packages -+ # Get canonical directory for python site packages (relative to install -+ # location). It varies from system to system. -+ # We should pin the path separator to the forward slash on Windows. -+ # More details can be seen at -+ # https://github.com/pytorch/pytorch/tree/main/tools/build_pytorch_libs.bat#note-backslash-munging-on-windows -+ pycmd(PYTHON_SITE_PACKAGES " -+ import os -+ import sysconfig -+ relative_site_packages = sysconfig.get_path('purelib').replace(sysconfig.get_path('data'), '').lstrip(os.path.sep) -+ print(relative_site_packages) -+ ") -+ file(TO_CMAKE_PATH ${PYTHON_SITE_PACKAGES} PYTHON_SITE_PACKAGES) -+ set(PYTHON_SITE_PACKAGES ${PYTHON_SITE_PACKAGES} PARENT_SCOPE) # for Summary - # ---[ Options. -- set(PYTHON_LIB_REL_PATH "${Python_SITELIB}" CACHE STRING "Python installation path (relative to CMake installation prefix)") -+ set(PYTHON_LIB_REL_PATH "${PYTHON_SITE_PACKAGES}" CACHE STRING "Python installation path (relative to CMake installation prefix)") - message(STATUS "Using ${PYTHON_LIB_REL_PATH} as python relative installation path") - - diff --git a/misc/py-pytorch/files/patch-third__party_cpuinfo_CMakeLists.txt b/misc/py-pytorch/files/patch-third__party_cpuinfo_CMakeLists.txt index cb63845b4f12..7a3ac5e3ece6 100644 --- a/misc/py-pytorch/files/patch-third__party_cpuinfo_CMakeLists.txt +++ b/misc/py-pytorch/files/patch-third__party_cpuinfo_CMakeLists.txt @@ -1,24 +1,15 @@ ---- third_party/cpuinfo/CMakeLists.txt.orig 2024-06-05 19:17:57 UTC +--- third_party/cpuinfo/CMakeLists.txt.orig 2024-10-29 18:00:44 UTC +++ third_party/cpuinfo/CMakeLists.txt -@@ -92,7 +92,7 @@ IF(NOT CMAKE_SYSTEM_PROCESSOR) +@@ -95,7 +95,7 @@ IF(NOT CMAKE_SYSTEM_PROCESSOR) "cpuinfo will compile, but cpuinfo_initialize() will always fail.") SET(CPUINFO_SUPPORTED_PLATFORM FALSE) ENDIF() --ELSEIF(NOT CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?|armv[5-8].*|aarch64|arm64.*|ARM64.*)$") -+ELSEIF(NOT CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|amd64|x86(_64)?|armv[5-8].*|aarch64|arm64.*|ARM64.*)$") +-ELSEIF(NOT CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?|armv[5-8].*|aarch64|arm64.*|ARM64.*|riscv(32|64))$") ++ELSEIF(NOT CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|amd64|x86(_64)?|armv[5-8].*|aarch64|arm64.*|ARM64.*|riscv(32|64))$") MESSAGE(WARNING "Target processor architecture \"${CPUINFO_TARGET_PROCESSOR}\" is not supported in cpuinfo. " "cpuinfo will compile, but cpuinfo_initialize() will always fail.") -@@ -105,7 +105,7 @@ IF(NOT CMAKE_SYSTEM_NAME) - "Target operating system is not specified. " - "cpuinfo will compile, but cpuinfo_initialize() will always fail.") - SET(CPUINFO_SUPPORTED_PLATFORM FALSE) --ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|WindowsStore|CYGWIN|MSYS|Darwin|Linux|Android)$") -+ELSEIF(NOT CMAKE_SYSTEM_NAME MATCHES "^(Windows|WindowsStore|CYGWIN|MSYS|Darwin|Linux|FreeBSD|Android)$") - IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14" AND NOT IS_APPLE_OS) - MESSAGE(WARNING - "Target operating system \"${CMAKE_SYSTEM_NAME}\" is not supported in cpuinfo. " -@@ -158,7 +158,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM) +@@ -161,7 +161,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM) SET(CPUINFO_SRCS src/api.c src/cache.c src/init.c src/log.c) IF(CPUINFO_SUPPORTED_PLATFORM) @@ -27,7 +18,7 @@ LIST(APPEND CPUINFO_SRCS src/x86/init.c src/x86/info.c -@@ -354,7 +354,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_MOCK_T +@@ -373,7 +373,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_MOCK_T # ---[ cpuinfo mock library and mock tests IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_MOCK_TESTS) SET(CPUINFO_MOCK_SRCS "${CPUINFO_SRCS}") @@ -36,7 +27,7 @@ LIST(APPEND CPUINFO_MOCK_SRCS src/x86/mockcpuid.c) ENDIF() IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android") -@@ -798,7 +798,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_UNIT_T +@@ -822,7 +822,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_UNIT_T ADD_TEST(NAME get-current-test COMMAND get-current-test) ENDIF() @@ -45,7 +36,16 @@ ADD_EXECUTABLE(brand-string-test test/name/brand-string.cc) CPUINFO_TARGET_ENABLE_CXX11(brand-string-test) CPUINFO_TARGET_RUNTIME_LIBRARY(brand-string-test) -@@ -865,7 +865,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_TOOLS) +@@ -878,7 +878,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_TOOLS) + TARGET_LINK_LIBRARIES(cache-info PRIVATE cpuinfo) + INSTALL(TARGETS cache-info RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + +- IF(CMAKE_SYSTEM_NAME MATCHES "^(Android|Linux)$" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv[5-8].*|aarch64)$") ++ IF(CMAKE_SYSTEM_NAME MATCHES "^(Android|Linux|FreeBSD)$" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv[5-8].*|aarch64)$") + ADD_EXECUTABLE(auxv-dump tools/auxv-dump.c) + CPUINFO_TARGET_ENABLE_C99(auxv-dump) + CPUINFO_TARGET_RUNTIME_LIBRARY(auxv-dump) +@@ -889,7 +889,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_TOOLS) CPUINFO_TARGET_RUNTIME_LIBRARY(cpuinfo-dump) ENDIF()