summaryrefslogtreecommitdiff
path: root/misc/py-pytorch/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'misc/py-pytorch/Makefile')
-rw-r--r--misc/py-pytorch/Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/misc/py-pytorch/Makefile b/misc/py-pytorch/Makefile
index 19d73b755f1a..06d9acce8750 100644
--- a/misc/py-pytorch/Makefile
+++ b/misc/py-pytorch/Makefile
@@ -1,7 +1,7 @@
PORTNAME= pytorch
DISTVERSIONPREFIX= v
-DISTVERSION= 2.7.1
-PORTREVISION= 2
+DISTVERSION= 2.8.0
+PORTREVISION= 3
CATEGORIES= misc # machine-learning
MASTER_SITES= https://github.com/pytorch/pytorch/releases/download/v${DISTVERSION}/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -50,6 +50,7 @@ RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}astunparse>0:devel/py-astunparse@${PY_FLAVO
USES= compiler:c++17-lang localbase:ldflags python
USE_PYTHON= distutils autoplist
+USE_LDCONFIG= ${PYTHON_SITELIBDIR}/torch/lib
USE_GITHUB= nodefault
GH_TUPLE= pytorch:cpuinfo:1e83a2f:cpuinfo/cpuinfo-with-freebsd-support # https://github.com/pytorch/cpuinfo/pull/230/commits
@@ -71,6 +72,14 @@ POST_PLIST= fix-plist
TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
TEST_WRKSRC= ${WRKSRC}/test
+OPTIONS_DEFINE= VULKAN
+OPTIONS_DEFAULT= VULKAN # VULKAN is experimental in PyTorch and only simple computations work
+
+VULKAN_MAKE_ENV= USE_VULKAN=1 USE_VULKAN_SHADERC_RUNTIME=1 USE_VULKAN_WRAPPER=0 # see https://docs.pytorch.org/tutorials/unstable/vulkan_workflow.html
+VULKAN_BUILD_DEPENDS= glslc:graphics/shaderc \
+ vulkan-headers>0:graphics/vulkan-headers
+VULKAN_LIB_DEPENDS= libvulkan.so:graphics/vulkan-loader
+
.include <bsd.port.options.mk>
.if ${OPSYS} == FreeBSD
@@ -79,9 +88,9 @@ USES+= llvm:max=15
post-patch:
@cd ${WRKSRC} && \
- ${RM} -r third_party/cpuinfo third_party/fbgemm/third_party/cpuinfo && \
+ ${RM} -r third_party/cpuinfo third_party/fbgemm/external/cpuinfo && \
${CP} -r cpuinfo-with-freebsd-support third_party/cpuinfo && \
- ${CP} -r cpuinfo-with-freebsd-support third_party/fbgemm/third_party/cpuinfo
+ ${CP} -r cpuinfo-with-freebsd-support third_party/fbgemm/external/cpuinfo
post-install: # strip binaries
@${STRIP_CMD} \