aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2019-10-27 20:19:29 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2019-10-27 20:19:29 +0000
commit68f4f67e571b12a4d7570bab34589b714036445f (patch)
tree49968eb1389298dbf5788c81e0aa0bd2f64eb5b2 /math
parentd0942f522edd2c350a370d1912093a89e952cd69 (diff)
downloadports-68f4f67e571b12a4d7570bab34589b714036445f.tar.gz
ports-68f4f67e571b12a4d7570bab34589b714036445f.zip
New port: math/ideep: Chainer module for numpy-like API and DNN acceleration using MKL-DNN
Notes
Notes: svn path=/head/; revision=515823
Diffstat (limited to 'math')
-rw-r--r--math/Makefile1
-rw-r--r--math/ideep/Makefile28
-rw-r--r--math/ideep/distinfo3
-rw-r--r--math/ideep/files/patch-CMakeLists.txt22
-rw-r--r--math/ideep/files/patch-cmake_mkldnn.cmake45
-rw-r--r--math/ideep/files/patch-tests_CMakeLists.txt30
-rw-r--r--math/ideep/pkg-descr4
-rw-r--r--math/ideep/pkg-plist16
8 files changed, 149 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 1f5ccc03edee..33fd0f664628 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -284,6 +284,7 @@
SUBDIR += hpipm
SUBDIR += hs-Agda
SUBDIR += hs-semigroups
+ SUBDIR += ideep
SUBDIR += ignition-math
SUBDIR += igraph
SUBDIR += intervaltree
diff --git a/math/ideep/Makefile b/math/ideep/Makefile
new file mode 100644
index 000000000000..6507ed70b066
--- /dev/null
+++ b/math/ideep/Makefile
@@ -0,0 +1,28 @@
+# $FreeBSD$
+
+PORTNAME= ideep
+DISTVERSIONPREFIX= v
+DISTVERSION= 2.0.0-119
+DISTVERSIONSUFFIX= -gb57539e
+CATEGORIES= math # neural-networks
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Chainer module for numpy-like API and DNN acceleration using MKL-DNN
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+TEST_DEPENDS= ${LOCALBASE}/include/rapidcheck.h:devel/rapidcheck
+
+USES= cmake
+USE_GITHUB= yes
+GH_ACCOUNT= intel
+USE_LDCONFIG= yes
+
+do-test: # tests broken: https://github.com/intel/ideep/issues/34 and assume bundled mkl-dnn
+ @cd ${BUILD_WRKSRC} && \
+ ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DBUILD_TESTING:BOOL=ON ${CMAKE_SOURCE_PATH} && \
+ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \
+ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test
+
+.include <bsd.port.mk>
diff --git a/math/ideep/distinfo b/math/ideep/distinfo
new file mode 100644
index 000000000000..c5903a24ef42
--- /dev/null
+++ b/math/ideep/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1572203583
+SHA256 (intel-ideep-v2.0.0-119-gb57539e_GH0.tar.gz) = 1b3dc108a855cbf8c25a9a1ca68ebdf46bebac27e16a40abf9033c4c5ebfdecd
+SIZE (intel-ideep-v2.0.0-119-gb57539e_GH0.tar.gz) = 193900
diff --git a/math/ideep/files/patch-CMakeLists.txt b/math/ideep/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..81e00d987f72
--- /dev/null
+++ b/math/ideep/files/patch-CMakeLists.txt
@@ -0,0 +1,22 @@
+--- CMakeLists.txt.orig 2019-08-30 01:57:18 UTC
++++ CMakeLists.txt
+@@ -15,7 +15,7 @@ IF(APPLE)
+ SET(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
+ ENDIF(APPLE)
+
+-set(USE_MKLDNN_INTERNAL 1)
++set(USE_MKLDNN_INTERNAL 0)
+ include(cmake/profiling.cmake)
+ include(cmake/mkldnn.cmake)
+ include(cmake/mkl.cmake)
+@@ -26,7 +26,9 @@ include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}
+
+ install(DIRECTORY include/ DESTINATION include)
+
+-add_subdirectory(tests)
++if (BUILD_TESTING)
++ add_subdirectory(tests)
++endif()
+
+ if (multinode)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -mavx -Wall -Wextra -Werror")
diff --git a/math/ideep/files/patch-cmake_mkldnn.cmake b/math/ideep/files/patch-cmake_mkldnn.cmake
new file mode 100644
index 000000000000..744f377a763e
--- /dev/null
+++ b/math/ideep/files/patch-cmake_mkldnn.cmake
@@ -0,0 +1,45 @@
+--- cmake/mkldnn.cmake.orig 2019-08-30 01:57:18 UTC
++++ cmake/mkldnn.cmake
+@@ -17,7 +17,7 @@ if (USE_MKLDNN_INTERNAL)
+ else()
+ include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
+ # find mkldnn first
+- set(mkldnn_PREFIX ${PROJECT_SOURCE_DIR}/mkl-dnn)
++ set(mkldnn_PREFIX ${CMAKE_INSTALL_PREFIX})
+
+ if (UNIX)
+ set(MKLDNN_EXTRA_COMPILER_FLAGS "-fPIC")
+@@ -27,20 +27,20 @@ else()
+ set(MKLDNN_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${MKLDNN_EXTRA_COMPILER_FLAGS})
+ set(MKLDNN_C_FLAGS ${CMAKE_C_FLAGS} ${MKLDNN_EXTRA_COMPILER_FLAGS})
+
+- ExternalProject_Add(mkldnn_exernal
+- SOURCE_DIR ${mkldnn_PREFIX}
+- BUILD_IN_SOURCE 1
+- CMAKE_ARGS
+- "-DCMAKE_CCXX_FLAGS=${MKLDNN_CCXX_FLAGS}"
+- "-DCMAKE_CXX_FLAGS=${MKLDNN_CXX_FLAGS}"
+- "-DCMAKE_C_FLAGS=${MKLDNN_C_FLAGS}"
+- )
++ #ExternalProject_Add(mkldnn_exernal
++ # SOURCE_DIR ${mkldnn_PREFIX}
++ # BUILD_IN_SOURCE 1
++ # CMAKE_ARGS
++ # "-DCMAKE_CCXX_FLAGS=${MKLDNN_CCXX_FLAGS}"
++ # "-DCMAKE_CXX_FLAGS=${MKLDNN_CXX_FLAGS}"
++ # "-DCMAKE_C_FLAGS=${MKLDNN_C_FLAGS}"
++ #)
+
+- ExternalProject_Add_Step(mkldnn_exernal
+- prepare_mkl
+- DEPENDERS configure
+- COMMAND ${mkldnn_PREFIX}/script/prepare_mkl.sh
+- )
++ #ExternalProject_Add_Step(mkldnn_exernal
++ # prepare_mkl
++ # DEPENDERS configure
++ # COMMAND ${mkldnn_PREFIX}/script/prepare_mkl.sh
++ #)
+
+ set(MKLDNN_FOUND TRUE)
+ set(MKLDNN_INTERNAL TRUE)
diff --git a/math/ideep/files/patch-tests_CMakeLists.txt b/math/ideep/files/patch-tests_CMakeLists.txt
new file mode 100644
index 000000000000..32fa3f69c3d5
--- /dev/null
+++ b/math/ideep/files/patch-tests_CMakeLists.txt
@@ -0,0 +1,30 @@
+--- tests/CMakeLists.txt.orig 2019-10-27 18:01:06 UTC
++++ tests/CMakeLists.txt
+@@ -3,9 +3,9 @@ if (NOT WITH_TEST)
+ return()
+ endif()
+
+-add_subdirectory(googletest EXCLUDE_FROM_ALL)
+-add_subdirectory(rapidcheck EXCLUDE_FROM_ALL)
+-add_subdirectory(rapidcheck/extras/gtest EXCLUDE_FROM_ALL)
++#add_subdirectory(googletest EXCLUDE_FROM_ALL)
++#add_subdirectory(rapidcheck EXCLUDE_FROM_ALL)
++#add_subdirectory(rapidcheck/extras/gtest EXCLUDE_FROM_ALL)
+ include(../cmake/settings.cmake)
+ include(../cmake/profiling.cmake)
+
+@@ -13,10 +13,10 @@ include_directories(
+ ${PROJECT_SOURCE_DIR}/mkl-dnn/include
+ ${PROJECT_SOURCE_DIR}/mkl-dnn/tests/gtests
+ in
+- googletest/googletest/include
+- googletest/googlemock/include
+- rapidcheck/include
+- rapidcheck/extras/gtest/include
++ #googletest/googletest/include
++ #googletest/googlemock/include
++ #rapidcheck/include
++ #rapidcheck/extras/gtest/include
+ ${vtune_include}
+ )
+
diff --git a/math/ideep/pkg-descr b/math/ideep/pkg-descr
new file mode 100644
index 000000000000..656d0f830255
--- /dev/null
+++ b/math/ideep/pkg-descr
@@ -0,0 +1,4 @@
+Intel Optimization for Chainer, a Chainer module providing numpy like API and
+DNN acceleration using MKL-DNN.
+
+WWW: https://github.com/intel/ideep
diff --git a/math/ideep/pkg-plist b/math/ideep/pkg-plist
new file mode 100644
index 000000000000..a4f10738b49c
--- /dev/null
+++ b/math/ideep/pkg-plist
@@ -0,0 +1,16 @@
+include/TR_interface.h
+include/ideep.hpp
+include/ideep/abstract_types.hpp
+include/ideep/allocators.hpp
+include/ideep/computations.hpp
+include/ideep/distribute.hpp
+include/ideep/fast_math.hpp
+include/ideep/instruments.hpp
+include/ideep/lru_cache.hpp
+include/ideep/omp_ctrl.hpp
+include/ideep/scope_guard.hpp
+include/ideep/tensor.hpp
+include/ideep/utils.hpp
+include/ideep/web.hpp
+include/ideep_pin_singletons.hpp
+lib/libideep.so