summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--math/Makefile1
-rw-r--r--math/libxsmm/Makefile28
-rw-r--r--math/libxsmm/distinfo3
-rw-r--r--math/libxsmm/files/patch-Makefile29
-rw-r--r--math/libxsmm/files/patch-Makefile.inc26
-rw-r--r--math/libxsmm/pkg-descr18
-rw-r--r--math/libxsmm/pkg-plist57
7 files changed, 162 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 4b83aa647326..217189487cd7 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -321,6 +321,7 @@
SUBDIR += libtsnnls
SUBDIR += libxls
SUBDIR += libxlsxwriter
+ SUBDIR += libxsmm
SUBDIR += linpack
SUBDIR += lll_spect
SUBDIR += lp_solve
diff --git a/math/libxsmm/Makefile b/math/libxsmm/Makefile
new file mode 100644
index 000000000000..557f4c364d64
--- /dev/null
+++ b/math/libxsmm/Makefile
@@ -0,0 +1,28 @@
+# $FreeBSD$
+
+PORTNAME= libxsmm
+DISTVERSION= 1.9
+CATEGORIES= math science
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Library for dense and sparse matrix operations and deep learning
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE.md
+
+BROKEN_i386= LIBXSMM is only supported on a 64-bit platform!
+
+BUILD_DEPENDS= bash:shells/bash
+
+USES= fortran gmake localbase:ldflags python:build shebangfix
+SHEBANG_GLOB= *.sh
+USE_GITHUB= yes
+GH_ACCOUNT= hfp
+USE_LDCONFIG= yes
+
+MAKE_ARGS= STATIC=0 DEPSTATIC=0 MAKE_PARALLEL=1
+LDFLAGS+= -lm
+
+BINARY_ALIAS= python=${PYTHON_CMD}
+
+.include <bsd.port.mk>
diff --git a/math/libxsmm/distinfo b/math/libxsmm/distinfo
new file mode 100644
index 000000000000..0eb4c2c962f5
--- /dev/null
+++ b/math/libxsmm/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1537456119
+SHA256 (hfp-libxsmm-1.9_GH0.tar.gz) = cd8532021352b4a0290d209f7f9bfd7c2411e08286a893af3577a43457287bfa
+SIZE (hfp-libxsmm-1.9_GH0.tar.gz) = 1881825
diff --git a/math/libxsmm/files/patch-Makefile b/math/libxsmm/files/patch-Makefile
new file mode 100644
index 000000000000..44a803c6d5cb
--- /dev/null
+++ b/math/libxsmm/files/patch-Makefile
@@ -0,0 +1,29 @@
+--- Makefile.orig 2018-03-15 13:08:45 UTC
++++ Makefile
+@@ -398,7 +398,7 @@ endif
+ lib: headers drytest lib_hst lib_mic
+
+ .PHONY: all
+-all: libxsmm samples
++all: libxsmm
+
+ .PHONY: headers
+ headers: cheader cheader_only fheader
+@@ -1502,7 +1502,7 @@ realclean-all: realclean
+
+ # Dummy prefix
+ ifneq (,$(strip $(PREFIX)))
+-INSTALL_ROOT = $(PREFIX)
++INSTALL_ROOT = $(DESTDIR)$(PREFIX)
+ else
+ INSTALL_ROOT = .
+ endif
+@@ -1581,7 +1581,7 @@ ifneq ($(abspath $(INSTALL_ROOT)),$(absp
+ endif
+
+ .PHONY: install-all
+-install-all: install samples
++install-all: install
+ ifneq ($(abspath $(INSTALL_ROOT)),$(abspath .))
+ @echo
+ @echo "LIBXSMM installing samples..."
diff --git a/math/libxsmm/files/patch-Makefile.inc b/math/libxsmm/files/patch-Makefile.inc
new file mode 100644
index 000000000000..dfe4142655ed
--- /dev/null
+++ b/math/libxsmm/files/patch-Makefile.inc
@@ -0,0 +1,26 @@
+--- Makefile.inc.orig 2018-03-15 13:08:45 UTC
++++ Makefile.inc
+@@ -53,9 +53,9 @@ MAKE ?= make
+ ENV ?= env
+
+ ifneq (Darwin,$(UNAME))
+- ifneq (,$(strip $(CP)))
+- CP += -u
+- endif
++ #ifneq (,$(strip $(CP)))
++ # CP += -u
++ #endif
+ DLIBEXT ?= so
+ SLIBEXT ?= a
+ else
+@@ -164,8 +164,8 @@ TBB_OLDRTL ?= 0
+ ifneq (Darwin,$(UNAME))
+ XGROUP_BEGIN = -Wl,--start-group
+ XGROUP_END = -Wl,--end-group
+- XLIB_BEGIN = -Wl,--as-needed
+- XLIB_END = -Wl,--no-as-needed
++ #XLIB_BEGIN = -Wl,--as-needed
++ #XLIB_END = -Wl,--no-as-needed
+ XRPATH = -Wl,--rpath=$(NULL)
+ else
+ XRPATH = -Xlinker -rpath -Xlinker $(NULL)
diff --git a/math/libxsmm/pkg-descr b/math/libxsmm/pkg-descr
new file mode 100644
index 000000000000..76f7fc28ae6d
--- /dev/null
+++ b/math/libxsmm/pkg-descr
@@ -0,0 +1,18 @@
+LIBXSMM is a library for specialized dense and sparse matrix operations as well
+as for deep learning primitives such as small convolutions targeting Intel
+Architecture. Small matrix multiplication kernels (SMMs) are generated for Intel
+SSE, Intel AVX, Intel AVX2, IMCI (KNCni) for Intel Xeon Phi coprocessors (KNC),
+and Intel AVX-512 as found in the Intel Xeon Phi processor family (KNL, KNM) and
+Intel Xeon processors (SKX). Highly optimized code for small convolutions is
+targeting Intel AVX2 and Intel AVX-512, whereas other targets can automatically
+leverage specialized SMMs to perform convolutions.
+
+The library supports statically generated code at configuration time (SMMs),
+uses optimized code paths based on compiler-generated code as well as Intrinsic
+functions, but mainly utilizes Just-In-Time (JIT) code specialization for
+compiler-independent performance (matrix multiplications, matrix transpose/copy,
+sparse functionality, and small convolutions). LIBXSMM is suitable for "build
+once and deploy everywhere" i.e., no special target flags are needed to exploit
+the available performance.
+
+WWW: https://github.com/hfp/libxsmm
diff --git a/math/libxsmm/pkg-plist b/math/libxsmm/pkg-plist
new file mode 100644
index 000000000000..556ba73bee0b
--- /dev/null
+++ b/math/libxsmm/pkg-plist
@@ -0,0 +1,57 @@
+bin/libxsmm_conv_generator
+bin/libxsmm_convwino_generator
+bin/libxsmm_gemm_generator
+include/libxsmm.f
+include/libxsmm.h
+include/libxsmm.mod
+include/libxsmm_bgemm.h
+include/libxsmm_config.h
+include/libxsmm_cpuid.h
+include/libxsmm_dnn.h
+include/libxsmm_frontend.h
+include/libxsmm_fsspmdm.h
+include/libxsmm_generator.h
+include/libxsmm_intrinsics_x86.h
+include/libxsmm_macros.h
+include/libxsmm_malloc.h
+include/libxsmm_math.h
+include/libxsmm_mhd.h
+include/libxsmm_source.h
+include/libxsmm_spmdm.h
+include/libxsmm_sync.h
+include/libxsmm_timer.h
+include/libxsmm_typedefs.h
+lib/libxsmm.so
+lib/libxsmm.so.1
+lib/libxsmm.so.1.9.0
+lib/libxsmmext.so
+lib/libxsmmext.so.1
+lib/libxsmmext.so.1.9.0
+lib/libxsmmf.so
+lib/libxsmmf.so.1
+lib/libxsmmf.so.1.9.0
+lib/libxsmmgen.so
+lib/libxsmmgen.so.1
+lib/libxsmmgen.so.1.9.0
+lib/libxsmmnoblas.so
+lib/libxsmmnoblas.so.1
+lib/libxsmmnoblas.so.1.9.0
+%%DATADIR%%/CODE_OF_CONDUCT.md
+%%DATADIR%%/CONTRIBUTING.md
+%%DATADIR%%/LICENSE.md
+%%DATADIR%%/README.md
+%%DATADIR%%/cp2k.md
+%%DATADIR%%/cp2k.pdf
+%%DATADIR%%/index.md
+%%DATADIR%%/libxsmm.pdf
+%%DATADIR%%/libxsmm_aux.md
+%%DATADIR%%/libxsmm_be.md
+%%DATADIR%%/libxsmm_dnn.md
+%%DATADIR%%/libxsmm_mm.md
+%%DATADIR%%/libxsmm_prof.md
+%%DATADIR%%/libxsmm_samples.md
+%%DATADIR%%/libxsmm_samples.pdf
+%%DATADIR%%/libxsmm_tune.md
+%%DATADIR%%/tensorflow.md
+%%DATADIR%%/tensorflow.pdf
+%%DATADIR%%/version.txt