math/openblas: fix build on powerpc64 with TARGET=PPC970 and switch to PPC970
This patch fixes build for PPC970 target. Since most people that run FreeBSD on powerpc64 use PowerPC 970 CPU's, switch to it by default and add non-default option to optimize for POWER6 (optimizing for newer POWER doesn't work on BE). Bump PORTREVISION because of package change. PR: 238868 Approved by: phd_kimberlite@yahoo.co.jp (maintainer), linimon (mentor) Differential Revision: https://reviews.freebsd.org/D21010
This commit is contained in:
parent
89a0617bbc
commit
2e85347e59
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=507634
3 changed files with 28 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
PORTNAME= openblas
|
||||
PORTVERSION= 0.2.20
|
||||
PORTREVISION= 9
|
||||
PORTREVISION= 10
|
||||
DISTVERSIONPREFIX= v
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= math
|
||||
|
@ -40,6 +40,7 @@ BUILDFLAGS= FCOMMON_OPT=-frecursive MAKE_NB_JOBS=-1
|
|||
OPTIONS_DEFINE= INTERFACE64 OPENMP
|
||||
OPTIONS_DEFINE_i386= DYNAMIC_ARCH AVX AVX2
|
||||
OPTIONS_DEFINE_amd64= ${OPTIONS_DEFINE_i386}
|
||||
OPTIONS_DEFINE_powerpc64= POWER6
|
||||
|
||||
.if defined(BATCH) || defined(PACKAGE_BUILDING)
|
||||
OPTIONS_DEFAULT_i386= DYNAMIC_ARCH
|
||||
|
@ -51,11 +52,16 @@ INTERFACE64_DESC= Use 8 byte integers on 64-bit architectures
|
|||
OPENMP_DESC= Use OpenMP for threading
|
||||
AVX_DESC= Support Advanced Vector Extensions (AVX)
|
||||
AVX2_DESC= Support Advanced Vector Extensions 2 (AVX2)
|
||||
POWER6_DESC= Optimize for POWER6, instead of the default PPC970
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${ARCH} == powerpc64
|
||||
. if ${PORT_OPTIONS:MPOWER6}
|
||||
TARGET_CPU_ARCH= POWER6
|
||||
.else
|
||||
TARGET_CPU_ARCH= PPC970
|
||||
. endif
|
||||
.endif
|
||||
|
||||
.if defined(TARGET_CPU_ARCH)
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
--- common_power.h.orig 2019-06-26 10:25:04 UTC
|
||||
--- common_power.h.orig 2017-07-24 04:03:35 UTC
|
||||
+++ common_power.h
|
||||
@@ -241,7 +241,7 @@ static inline int blas_quickdivide(blasint x, blasint
|
||||
#define HAVE_PREFETCH
|
||||
#endif
|
||||
|
||||
-#if defined(POWER3) || defined(POWER6) || defined(PPCG4) || defined(CELL) || defined(POWER8)
|
||||
+#if defined(POWER3) || defined(POWER6) || defined(PPCG4) || defined(CELL) || defined(POWER8) || defined(PPC970)
|
||||
#define DCBT_ARG 0
|
||||
#else
|
||||
#define DCBT_ARG 8
|
||||
@@ -499,7 +499,7 @@ static inline int blas_quickdivide(blasint x, blasint
|
||||
|
||||
#if defined(ASSEMBLER) && !defined(NEEDPARAM)
|
||||
|
|
11
math/openblas/files/patch-param.h
Normal file
11
math/openblas/files/patch-param.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- param.h.orig 2019-06-28 14:19:50 UTC
|
||||
+++ param.h
|
||||
@@ -1877,7 +1877,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILI
|
||||
#define ZGEMM_DEFAULT_UNROLL_M 2
|
||||
#define ZGEMM_DEFAULT_UNROLL_N 2
|
||||
|
||||
-#ifdef OS_LINUX
|
||||
+#if defined(OS_LINUX) || defined(OS_FREEBSD)
|
||||
#if L2_SIZE == 1024976
|
||||
#define SGEMM_DEFAULT_P 320
|
||||
#define DGEMM_DEFAULT_P 256
|
Loading…
Reference in a new issue