git: 6065a43fa2cb - main - misc/py-pytorch: Add VULKAN option
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 22 Aug 2025 03:20:11 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=6065a43fa2cb4f414e0b20657f45d23ddc03c5dd
commit 6065a43fa2cb4f414e0b20657f45d23ddc03c5dd
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2025-08-21 16:41:09 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2025-08-22 03:20:07 +0000
misc/py-pytorch: Add VULKAN option
---
misc/py-pytorch/Makefile | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/misc/py-pytorch/Makefile b/misc/py-pytorch/Makefile
index 4713de8cc9e9..227e1ea21933 100644
--- a/misc/py-pytorch/Makefile
+++ b/misc/py-pytorch/Makefile
@@ -1,7 +1,7 @@
PORTNAME= pytorch
DISTVERSIONPREFIX= v
DISTVERSION= 2.8.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= misc # machine-learning
MASTER_SITES= https://github.com/pytorch/pytorch/releases/download/v${DISTVERSION}/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -72,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