misc/py-pytorch: Build with LAPACK

Some operations require LAPACK when no GPU is present.
This commit is contained in:
Yuri Victorovich 2024-06-20 03:13:06 -07:00
parent f0ad2d2b86
commit 69026a954a
2 changed files with 15 additions and 0 deletions

View file

@ -1,6 +1,7 @@
PORTNAME= pytorch
DISTVERSIONPREFIX= v
DISTVERSION= 2.3.1
PORTREVISION= 1
CATEGORIES= misc # machine-learning
MASTER_SITES= https://github.com/pytorch/pytorch/releases/download/v${DISTVERSION}/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -50,6 +51,7 @@ 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
MAKE_ENV+= USE_CUDNN=0
MAKE_ENV+= USE_LAPACK=1 # needed on FreeBSD to run w/out GPU
LDFLAGS+= -lexecinfo
BINARY_ALIAS= make=${GMAKE}

View file

@ -0,0 +1,13 @@
- otherwise USE_LAPACK=1 fails to find lapack
--- cmake/Modules/FindBLAS.cmake.orig 2024-06-20 08:11:50 UTC
+++ cmake/Modules/FindBLAS.cmake
@@ -20,7 +20,7 @@ SET(BLAS_F2C)
SET(BLAS_INFO)
SET(BLAS_F2C)
-SET(WITH_BLAS "" CACHE STRING "Blas type [accelerate/acml/atlas/blis/generic/goto/mkl/open/veclib]")
+SET(WITH_BLAS "open" CACHE STRING "Blas type [accelerate/acml/atlas/blis/generic/goto/mkl/open/veclib]")
# Old FindBlas
INCLUDE(CheckCSourceRuns)