Date: Fri, 22 Mar 2024 04:11:35 GMT From: Yuri Victorovich <yuri@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 4719d1e11f5e - main - misc/py-pytorch: Fix the problem that the cpuinfo library didn't support FreeBSD Message-ID: <202403220411.42M4BZjL052870@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=4719d1e11f5e300f686b174cf6ca9baf5c20e1b0 commit 4719d1e11f5e300f686b174cf6ca9baf5c20e1b0 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2024-03-22 02:53:33 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2024-03-22 02:56:13 +0000 misc/py-pytorch: Fix the problem that the cpuinfo library didn't support FreeBSD The symptoms included error messages and exceptions. Now the bundled cpuinfo directory is replaced with the cpuinfo patched with the pull request patch that fixes FreeBSD compatibility. --- misc/py-pytorch/Makefile | 11 +++++++++++ misc/py-pytorch/distinfo | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/misc/py-pytorch/Makefile b/misc/py-pytorch/Makefile index 8f556eab3bdb..bff54f2c9fc1 100644 --- a/misc/py-pytorch/Makefile +++ b/misc/py-pytorch/Makefile @@ -1,9 +1,11 @@ PORTNAME= pytorch DISTVERSIONPREFIX= v DISTVERSION= 2.2.1 +PORTREVISION= 1 CATEGORIES= misc # machine-learning MASTER_SITES= https://github.com/pytorch/pytorch/releases/download/v${DISTVERSION}/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTFILES= ${PORTNAME}-${DISTVERSIONFULL}${EXTRACT_SUFX} # the main tarball disappears when GH_xx tags are added w/out this line DIST_SUBDIR= ${PORTNAME} MAINTAINER= yuri@FreeBSD.org @@ -42,6 +44,9 @@ RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dill>0:devel/py-dill@${PY_FLAVOR} # optiona 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 + MAKE_ENV= USE_NINJA=no # ninja breaks for some reason MAKE_ENV+= BUILD_TEST=0 # ninja breaks for some reason MAKE_ENV+= USE_MKLDNN=0 # disable MKLDNN that doesn't exist, see https://github.com/pytorch/pytorch/issues/100957 @@ -58,6 +63,12 @@ POST_PLIST= fix-plist USES+= llvm:max=15 .endif +post-patch: + @cd ${WRKSRC} && \ + ${RM} -r third_party/cpuinfo third_party/fbgemm/third_party/cpuinfo && \ + ${CP} -r cpuinfo-with-freebsd-support third_party/cpuinfo && \ + ${CP} -r cpuinfo-with-freebsd-support third_party/fbgemm/third_party/cpuinfo + post-install: # strip binaries @${STRIP_CMD} \ ${STAGEDIR}${PYTHON_SITELIBDIR}/torch/bin/torch_shm_manager \ diff --git a/misc/py-pytorch/distinfo b/misc/py-pytorch/distinfo index 70054e4d3cfd..1bd8a1fbc0ce 100644 --- a/misc/py-pytorch/distinfo +++ b/misc/py-pytorch/distinfo @@ -1,3 +1,5 @@ -TIMESTAMP = 1708727478 +TIMESTAMP = 1711068042 SHA256 (pytorch/pytorch-v2.2.1.tar.gz) = 8069467387b8ab7a7279671b9144d80a5c5342b4fa022eb3c1db629a6fd806c9 SIZE (pytorch/pytorch-v2.2.1.tar.gz) = 287453242 +SHA256 (pytorch/pytorch-cpuinfo-3a3b76bc8845d0f4a2ea3108e256313458c5de03_GH0.tar.gz) = 658acaf67573484abc7a093066d3766f9a3b94aff5b77e0f4e9c72cee5ebaa4a +SIZE (pytorch/pytorch-cpuinfo-3a3b76bc8845d0f4a2ea3108e256313458c5de03_GH0.tar.gz) = 3534893
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202403220411.42M4BZjL052870>